MCPcopy Create free account
hub / github.com/LeapLabTHU/DAT / _update_config_from_file

Function _update_config_from_file

config.py:156–168  ·  view source on GitHub ↗
(config, cfg_file)

Source from the content-addressed store, hash-verified

154
155
156def _update_config_from_file(config, cfg_file):
157 config.defrost()
158 with open(cfg_file, 'r') as f:
159 yaml_cfg = yaml.load(f, Loader=yaml.FullLoader)
160
161 for cfg in yaml_cfg.setdefault('BASE', ['']):
162 if cfg:
163 _update_config_from_file(
164 config, os.path.join(os.path.dirname(cfg_file), cfg)
165 )
166 print('=> merge config from {}'.format(cfg_file))
167 config.merge_from_file(cfg_file)
168 config.freeze()
169
170
171def update_config(config, args):

Callers 1

update_configFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected