MCPcopy
hub / github.com/microsoft/Swin-Transformer / _update_config_from_file

Function _update_config_from_file

config.py:268–280  ·  view source on GitHub ↗
(config, cfg_file)

Source from the content-addressed store, hash-verified

266
267
268def _update_config_from_file(config, cfg_file):
269 config.defrost()
270 with open(cfg_file, 'r') as f:
271 yaml_cfg = yaml.load(f, Loader=yaml.FullLoader)
272
273 for cfg in yaml_cfg.setdefault('BASE', ['']):
274 if cfg:
275 _update_config_from_file(
276 config, os.path.join(os.path.dirname(cfg_file), cfg)
277 )
278 print('=> merge config from {}'.format(cfg_file))
279 config.merge_from_file(cfg_file)
280 config.freeze()
281
282
283def update_config(config, args):

Callers 1

update_configFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected