MCPcopy Create free account
hub / github.com/modelscope/modelscope / load

Method load

modelscope/utils/nlp/space/args.py:39–46  ·  view source on GitHub ↗
(self, filename)

Source from the content-addressed store, hash-verified

37 json.dump(self, fp, ensure_ascii=False, indent=4, sort_keys=False)
38
39 def load(self, filename):
40 with open(filename, 'r', encoding='utf-8') as fp:
41 params_dict = json.load(fp)
42 for k, v in params_dict.items():
43 if isinstance(v, dict):
44 self[k].update(HParams(v))
45 else:
46 self[k] = v
47
48
49def parse_args(parser):

Callers 15

convert_single_pthFunction · 0.45
get_pluginFunction · 0.45
_load_by_rankFunction · 0.45
load_checkpointFunction · 0.45
parse_label_mappingFunction · 0.45
_startMethod · 0.45
get_task_input_examplesFunction · 0.45
get_task_schemasFunction · 0.45
pre_loadFunction · 0.45
_load_checkpointFunction · 0.45
from_json_fileMethod · 0.45

Calls 3

HParamsClass · 0.70
itemsMethod · 0.45
updateMethod · 0.45