MCPcopy Create free account
hub / github.com/SwinTransformer/Transformer-SSL / _update_config_from_file

Function _update_config_from_file

config.py:200–212  ·  view source on GitHub ↗
(config, cfg_file)

Source from the content-addressed store, hash-verified

198
199
200def _update_config_from_file(config, cfg_file):
201 config.defrost()
202 with open(cfg_file, 'r') as f:
203 yaml_cfg = yaml.load(f, Loader=yaml.FullLoader)
204
205 for cfg in yaml_cfg.setdefault('BASE', ['']):
206 if cfg:
207 _update_config_from_file(
208 config, os.path.join(os.path.dirname(cfg_file), cfg)
209 )
210 print('=> merge config from {}'.format(cfg_file))
211 config.merge_from_file(cfg_file)
212 config.freeze()
213
214
215def update_config(config, args):

Callers 1

update_configFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected