[Fix] Fix the log error (#766)

* set the priority of EvalHook to LOW

* add comment for priority change

* fix comment
This commit is contained in:
Junjun2016 2021-08-10 08:20:02 +08:00 committed by GitHub
parent 6ee419917f
commit b539a43dd7

View File

@ -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)