e4eac21828a6b9037d314266908f4ba083b1940e,tgen/parallel_percrank_train.py,,dump_ranker,#,72
Before Change
def dump_ranker(ranker):
attribs = {"__class__": pickle.dumps(ranker.__class__)}
for key, val in ranker.__dict__.iteritems():
attribs[key] = make_serializable(val)
return msgpack.dumps(attribs)
After Change
def dump_ranker(ranker, work_dir):
fname = os.path.abspath(os.path.join(work_dir, "rdump.pickle"))
with open(fname, "wb") as fh:
pickle.dump(ranker, fh, protocol=pickle.HIGHEST_PROTOCOL)
return fname
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 3
Instances
Project Name: UFAL-DSG/tgen
Commit Name: e4eac21828a6b9037d314266908f4ba083b1940e
Time: 2015-12-15
Author: odusek@ufal.mff.cuni.cz
File Name: tgen/parallel_percrank_train.py
Class Name:
Method Name: dump_ranker
Project Name: MTG/freesound
Commit Name: 9bac81ea348e5780848b45965e5f43c9daf358e5
Time: 2020-02-11
Author: frederic.font@upf.edu
File Name: freesound/local_settings.example.py
Class Name:
Method Name:
Project Name: zhanghang1989/PyTorch-Encoding
Commit Name: c4d27a8f85f59fb63ebc3893f543e6ca1814a81e
Time: 2020-04-09
Author: zhang.hang@rutgers.edu
File Name: docs/source/conf.py
Class Name:
Method Name: