Skip to content

Commit

Permalink
[Fix] Fix the log error (open-mmlab#766)
Browse files Browse the repository at this point in the history
* set the priority of EvalHook to LOW

* add comment for priority change

* fix comment
  • Loading branch information
Junjun2016 authored Aug 10, 2021
1 parent 6ee4199 commit b539a43
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion mmseg/apis/train.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit b539a43

Please sign in to comment.