f9c3511ae53fbc2c9fc69cadd22397f9ddfe2fb5,src/trainer.py,SamplingMultiTaskTrainer,_save_checkpoint,#SamplingMultiTaskTrainer#Any#Any#Any#Any#,621
Before Change
// Don"t save embeddings here.
// TODO: There has to be a prettier way to do this.
keys_to_skip = []
for key in model_state:
if "token_embedder_words" in key:
keys_to_skip.append(key)
for key in keys_to_skip:
del model_state[key]
torch.save(model_state, model_path)
After Change
// Don"t save embeddings here.
// TODO: There has to be a prettier way to do this.
keys_to_skip = [key for key in model_state if dont_save(key)]
for key in keys_to_skip:
del model_state[key]
torch.save(model_state, model_path)
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 11
Instances
Project Name: jsalt18-sentence-repl/jiant
Commit Name: f9c3511ae53fbc2c9fc69cadd22397f9ddfe2fb5
Time: 2018-06-29
Author: wang.alex.c@gmail.com
File Name: src/trainer.py
Class Name: SamplingMultiTaskTrainer
Method Name: _save_checkpoint
Project Name: markovmodel/PyEMMA
Commit Name: 044f5f26e1b661c74c6cb60aef2906a6e372a2f1
Time: 2018-09-10
Author: m.scherer@fu-berlin.de
File Name: doc/nbconvert_filter.py
Class Name: RemoveWidgetNotice
Method Name: preprocess_cell
Project Name: rlworkgroup/garage
Commit Name: 0c2457ead494e84985aec5fd8d5df4ba399e919c
Time: 2019-04-30
Author: naeioi@hotmail.com
File Name: garage/tf/samplers/off_policy_vectorized_sampler.py
Class Name: OffPolicyVectorizedSampler
Method Name: process_samples