d01c29228db3bffb451be36e2d556262597971c9,base/base_trainer.py,BaseTrainer,__init__,#BaseTrainer#Any#Any#Any#Any#Any#Any#,14
Before Change
self.start_epoch = 1
self.checkpoint_dir = os.path.join(config["trainer"]["save_dir"], self.name)
ensure_dir(self.checkpoint_dir)
json.dump(config, open(os.path.join(self.checkpoint_dir, "config.json"), "w"),
indent=4, sort_keys=False)
if resume:
self._resume_checkpoint(resume)
def train(self):
After Change
// Save configuration into checkpoint directory:
ensure_dir(self.checkpoint_dir)
with open(self.checkpoint_dir, "config.json", "w") as handle:
json.dump(config, handle, indent=4, sort_keys=False)
if resume:
self._resume_checkpoint(resume)
def train(self):
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 4
Instances
Project Name: victoresque/pytorch-template
Commit Name: d01c29228db3bffb451be36e2d556262597971c9
Time: 2018-09-21
Author: borgesan@ifi.uio.no
File Name: base/base_trainer.py
Class Name: BaseTrainer
Method Name: __init__
Project Name: victoresque/pytorch-template
Commit Name: 39cc03ca3193a4ec8c2b20a55be31ab38da72e1d
Time: 2018-09-21
Author: borgesan@ifi.uio.no
File Name: base/base_trainer.py
Class Name: BaseTrainer
Method Name: __init__
Project Name: adobe/NLP-Cube
Commit Name: 3e80a81f04091891e065fae96ad33075a41a19ba
Time: 2019-01-21
Author: dumitrescu.stefan@gmail.com
File Name: cube/io_utils/model_store.py
Class Name: ModelMetadata
Method Name: save