Skip to content

Commit

Permalink
fix priority for eval hook
Browse files Browse the repository at this point in the history
  • Loading branch information
yangyifei authored and yangyifei committed Sep 29, 2021
1 parent 432850b commit ce6e4eb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mmgen/apis/train.py
Original file line number Diff line number Diff line change
Expand Up @@ -172,9 +172,9 @@ def train_model(model,
val_dataloader = build_dataloader(
val_dataset, dist=distributed, **val_loader_cfg)
eval_cfg = deepcopy(cfg.get('evaluation'))
priority = eval_cfg.pop('priority', 'LOW')
eval_cfg.update(dict(dist=distributed, dataloader=val_dataloader))
eval_hook = build_from_cfg(eval_cfg, HOOKS)
priority = eval_cfg.pop('priority', 'NORMAL')
runner.register_hook(eval_hook, priority=priority)

# user-defined hooks
Expand Down

0 comments on commit ce6e4eb

Please sign in to comment.