7a3b076486126cd00818248fe3fd7b22730265aa,openrec/recommenders/recommender.py,Recommender,_save_and_load_for_serving,#Recommender#,194
Before Change
assert self._save_model_dir is not None, "save_model_dir is not specified"
if self._training:
self._tf_training_saver.save(self._tf_training_sess, os.path.join(self._save_model_dir, "model.ckpt"))
if self._serving:
self._tf_serving_saver.restore(self._tf_serving_sess, os.path.join(self._save_model_dir, "model.ckpt"))
def _optimistic_restore(self, session, save_file):
After Change
assert self._save_model_dir is not None, "save_model_dir is not specified"
if self._training:
self.save()
if self._serving:
self.restore(restore_serving=True)
def _optimistic_restore(self, session, save_file):
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 4
Instances Project Name: ylongqi/openrec
Commit Name: 7a3b076486126cd00818248fe3fd7b22730265aa
Time: 2018-06-18
Author: ylongqi@gmail.com
File Name: openrec/recommenders/recommender.py
Class Name: Recommender
Method Name: _save_and_load_for_serving
Project Name: snorkel-team/snorkel
Commit Name: b56a4b355dfc302fa449d223e065af3a7acac986
Time: 2018-05-03
Author: dnicholson329@gmail.com
File Name: snorkel/learning/pytorch/noise_aware_model.py
Class Name: TorchNoiseAwareModel
Method Name: save
Project Name: ncullen93/torchsample
Commit Name: 15ac1c2bb2627bb8fbb89b0b64709e9a50be02fd
Time: 2017-05-13
Author: ncullen.th@dartmouth.edu
File Name: torchsample/transforms/tensor_transforms.py
Class Name: ToFile
Method Name: __call__