(config, cfg_file)
| 184 | |
| 185 | |
| 186 | def _update_config_from_file(config, cfg_file): |
| 187 | config.defrost() |
| 188 | with open(cfg_file, 'r') as f: |
| 189 | yaml_cfg = yaml.load(f, Loader=yaml.FullLoader) |
| 190 | |
| 191 | for cfg in yaml_cfg.setdefault('BASE', ['']): |
| 192 | if cfg: |
| 193 | _update_config_from_file( |
| 194 | config, os.path.join(os.path.dirname(cfg_file), cfg) |
| 195 | ) |
| 196 | print('=> merge config from {}'.format(cfg_file)) |
| 197 | config.merge_from_file(cfg_file) |
| 198 | config.freeze() |
| 199 | |
| 200 | |
| 201 | def update_config(config, args): |
no test coverage detected