Skip to content

Commit

Permalink
Fixed deadlock issue related with MMSegWandbHook (#2398)
Browse files Browse the repository at this point in the history
Co-authored-by: WangYudong <yudong.wang@akane.waseda.jp>
  • Loading branch information
2 people authored and MeowZheng committed Jan 11, 2023
1 parent 320d8c6 commit c0515a1
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion mmseg/core/hook/wandblogger_hook.py
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,8 @@ def before_run(self, runner):
# Log ground truth data
self._log_data_table()

@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 @@ -178,7 +179,10 @@ def after_train_iter(self, runner):
return super(MMSegWandbHook, self).after_train_iter(runner)
else:
super(MMSegWandbHook, 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 c0515a1

Please sign in to comment.