(config, cfg_file)
| 266 | |
| 267 | |
| 268 | def _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 | |
| 283 | def update_config(config, args): |