Skip to content

Commit

Permalink
[Fix]: Fix deadlock issue related with MMDetWandbHook (#9476)
Browse files Browse the repository at this point in the history
Co-authored-by: WangYudong <yudong.wang@akane.waseda.jp>

Co-authored-by: WangYudong <yudong.wang@akane.waseda.jp>
  • Loading branch information
MilkClouds and Fizzez committed Dec 12, 2022
1 parent 0dfe3f0 commit cc9513f
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion mmdet/core/hook/wandblogger_hook.py
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,8 @@ def after_train_epoch(self, runner):
# Log the table
self._log_eval_table(runner.epoch + 1)

@master_only
# for the reason of this double-layered structure, refer to
# https://github.com/open-mmlab/mmdetection/issues/8145#issuecomment-1345343076
def after_train_iter(self, runner):
if self.get_mode(runner) == 'train':
# An ugly patch. The iter-based eval hook will call the
Expand All @@ -245,7 +246,10 @@ def after_train_iter(self, runner):
return super(MMDetWandbHook, self).after_train_iter(runner)
else:
super(MMDetWandbHook, self).after_train_iter(runner)
self._after_train_iter(runner)

@master_only
def _after_train_iter(self, runner):
if self.by_epoch:
return

Expand Down

0 comments on commit cc9513f

Please sign in to comment.