MCPcopy Create free account
hub / github.com/OpenGVLab/InternVL / _update_config_from_file

Function _update_config_from_file

classification/config.py:214–225  ·  view source on GitHub ↗
(config, cfg_file)

Source from the content-addressed store, hash-verified

212
213
214def _update_config_from_file(config, cfg_file):
215 config.defrost()
216 with open(cfg_file, 'r') as f:
217 yaml_cfg = yaml.load(f, Loader=yaml.FullLoader)
218
219 for cfg in yaml_cfg.setdefault('BASE', ['']):
220 if cfg:
221 _update_config_from_file(
222 config, os.path.join(os.path.dirname(cfg_file), cfg))
223 print('=> merge config from {}'.format(cfg_file))
224 config.merge_from_file(cfg_file)
225 config.freeze()
226
227
228def update_config(config, args):

Callers 1

update_configFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected