From 48d315c05cb6bb17f09b6694d7446a502c807970 Mon Sep 17 00:00:00 2001 From: yivan Date: Mon, 9 Aug 2021 12:55:06 +0800 Subject: [PATCH 1/3] priority of EvalIterHook shold be lower then IterTimerHook --- mmedit/apis/train.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mmedit/apis/train.py b/mmedit/apis/train.py index d00ddd8bf0..c3f8293c21 100644 --- a/mmedit/apis/train.py +++ b/mmedit/apis/train.py @@ -304,7 +304,7 @@ def _non_dist_train(model, data_loader = build_dataloader(dataset, **val_loader_cfg) save_path = osp.join(cfg.work_dir, 'val_visuals') runner.register_hook( - EvalIterHook(data_loader, save_path=save_path, **cfg.evaluation)) + EvalIterHook(data_loader, save_path=save_path, **cfg.evaluation), priority=80) # user-defined hooks if cfg.get('custom_hooks', None): From 9e34050fcd2a12cf48b2deeadd48fb0919afffe9 Mon Sep 17 00:00:00 2001 From: lizz Date: Thu, 12 Aug 2021 07:34:40 +0800 Subject: [PATCH 2/3] Update mmedit/apis/train.py Co-authored-by: Zaida Zhou <58739961+zhouzaida@users.noreply.github.com> --- mmedit/apis/train.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mmedit/apis/train.py b/mmedit/apis/train.py index c3f8293c21..640ed72b94 100644 --- a/mmedit/apis/train.py +++ b/mmedit/apis/train.py @@ -304,7 +304,7 @@ def _non_dist_train(model, data_loader = build_dataloader(dataset, **val_loader_cfg) save_path = osp.join(cfg.work_dir, 'val_visuals') runner.register_hook( - EvalIterHook(data_loader, save_path=save_path, **cfg.evaluation), priority=80) + EvalIterHook(data_loader, save_path=save_path, **cfg.evaluation), priority='LOW') # user-defined hooks if cfg.get('custom_hooks', None): From 956a6227bcf5f0fc18afc833bcabd8b156887d8b Mon Sep 17 00:00:00 2001 From: lizz Date: Thu, 12 Aug 2021 07:38:39 +0800 Subject: [PATCH 3/3] Fix linting --- mmedit/apis/train.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/mmedit/apis/train.py b/mmedit/apis/train.py index 640ed72b94..37282d57da 100644 --- a/mmedit/apis/train.py +++ b/mmedit/apis/train.py @@ -304,7 +304,8 @@ def _non_dist_train(model, data_loader = build_dataloader(dataset, **val_loader_cfg) save_path = osp.join(cfg.work_dir, 'val_visuals') runner.register_hook( - EvalIterHook(data_loader, save_path=save_path, **cfg.evaluation), priority='LOW') + EvalIterHook(data_loader, save_path=save_path, **cfg.evaluation), + priority='LOW') # user-defined hooks if cfg.get('custom_hooks', None):