86cff17e7ef1b355e1ab4862ccd664ed4c856227,python/ray/util/sgd/torch/torch_runner.py,TorchRunner,_get_model_state_dicts,#TorchRunner#,227
Before Change
// resume training while saving intermediate checkpoints.
cpu_state_dicts = []
for model in self.models:
state_dict = model.state_dict()
cpu_state_dicts += [{k: v.cpu() for k, v in state_dict.items()} ]
return cpu_state_dicts
def _set_model_state_dicts(self, models_state_dicts):
After Change
self.training_operator._set_timers(self.timers)
def _get_model_state_dicts(self):
return [model.state_dict() for model in self.models]
def _set_model_state_dicts(self, models_state_dicts):
for model, state_dict in zip(self.models, models_state_dicts):
model.load_state_dict(state_dict)
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 7
Instances Project Name: ray-project/ray
Commit Name: 86cff17e7ef1b355e1ab4862ccd664ed4c856227
Time: 2020-03-30
Author: rliaw@berkeley.edu
File Name: python/ray/util/sgd/torch/torch_runner.py
Class Name: TorchRunner
Method Name: _get_model_state_dicts
Project Name: ray-project/ray
Commit Name: 86cff17e7ef1b355e1ab4862ccd664ed4c856227
Time: 2020-03-30
Author: rliaw@berkeley.edu
File Name: python/ray/util/sgd/torch/distributed_torch_runner.py
Class Name: DistributedTorchRunner
Method Name: _get_model_state_dicts
Project Name: tryolabs/luminoth
Commit Name: 8a600f790ba68880e9a76a5eda33a3f4fccd22c4
Time: 2017-11-17
Author: javirey@gmail.com
File Name: luminoth/utils/config.py
Class Name:
Method Name: to_dict