do not save eval_only to config.yaml

pull/608/head
zuchen.wang 2021-11-24 16:01:04 +08:00
parent 3cad97418b
commit d1f8dbb308
1 changed files with 3 additions and 2 deletions

View File

@ -24,14 +24,15 @@ def setup(args):
cfg = get_cfg()
cfg.merge_from_file(args.config_file)
cfg.merge_from_list(args.opts)
setattr(cfg, 'eval_only', args.eval_only)
cfg.freeze()
default_setup(cfg, args)
return cfg
def main(args):
cfg = setup(args)
cfg.defrost()
setattr(cfg, 'eval_only', args.eval_only)
cfg.freeze()
if args.eval_only:
cfg.defrost()