MCPcopy
hub / github.com/THUDM/CogDL / set_best_config

Function set_best_config

cogdl/experiments.py:79–89  ·  view source on GitHub ↗
(args)

Source from the content-addressed store, hash-verified

77
78
79def set_best_config(args):
80 if args.model not in BEST_CONFIGS:
81 return args
82 configs = BEST_CONFIGS[args.model]
83 for key, value in configs["general"].items():
84 args.__setattr__(key, value)
85 if args.dataset not in configs:
86 return args
87 for key, value in configs[args.dataset].items():
88 args.__setattr__(key, value)
89 return args
90
91
92def train(args): # noqa: C901

Callers 2

test_set_best_configFunction · 0.90
trainFunction · 0.85

Calls

no outgoing calls

Tested by 1

test_set_best_configFunction · 0.72