Skip to content

Commit

Permalink
[Fix] fix potential bug (#647)
Browse files Browse the repository at this point in the history
  • Loading branch information
fangyixiao18 committed Dec 27, 2022
1 parent d731546 commit f73306d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mmselfsup/apis/train.py
Expand Up @@ -158,7 +158,7 @@ def train_model(model,
# register hooks
runner.register_training_hooks(cfg.lr_config, optimizer_config,
cfg.checkpoint_config, cfg.log_config)
if distributed:
if distributed and cfg.runner.type == 'EpochBasedRunner':
runner.register_hook(DistSamplerSeedHook())

# register custom hooks
Expand Down

0 comments on commit f73306d

Please sign in to comment.