Dump training config similar to mmdet. (#410)

pull/520/head
Lőrincz-Molnár Szabolcs-Botond 2022-08-09 10:50:16 +03:00 committed by Yixiao Fang
parent c2f4be1c8a
commit e826153b2d
1 changed files with 3 additions and 0 deletions

View File

@ -143,6 +143,9 @@ def main():
# create work_dir
mmcv.mkdir_or_exist(osp.abspath(cfg.work_dir))
# dump config
cfg.dump(osp.join(cfg.work_dir, osp.basename(args.config)))
# init the logger before other steps
timestamp = time.strftime('%Y%m%d_%H%M%S', time.localtime())
log_file = osp.join(cfg.work_dir, f'train_{timestamp}.log')