From 9155d9e9ed45994fc68372a31dbfb35cdd665bc2 Mon Sep 17 00:00:00 2001 From: Junjun2016 Date: Tue, 10 Aug 2021 08:20:02 +0800 Subject: [PATCH] [Fix] Fix the log error (#766) * set the priority of EvalHook to LOW * add comment for priority change * fix comment --- mmseg/apis/train.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/mmseg/apis/train.py b/mmseg/apis/train.py index 5f526df2b0..e1e771b697 100644 --- a/mmseg/apis/train.py +++ b/mmseg/apis/train.py @@ -107,7 +107,10 @@ def train_segmentor(model, eval_cfg = cfg.get('evaluation', {}) eval_cfg['by_epoch'] = cfg.runner['type'] != 'IterBasedRunner' eval_hook = DistEvalHook if distributed else EvalHook - runner.register_hook(eval_hook(val_dataloader, **eval_cfg)) + # In this PR (https://github.com/open-mmlab/mmcv/pull/1193), the + # priority of IterTimerHook has been modified from 'NORMAL' to 'LOW'. + runner.register_hook( + eval_hook(val_dataloader, **eval_cfg), priority='LOW') if cfg.resume_from: runner.resume(cfg.resume_from)