(config, cfg_file)
| 212 | |
| 213 | |
| 214 | def _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 | |
| 228 | def update_config(config, args): |