Skip to content

Commit c0515a1

Browse files
MilkCloudsFizzez
authored andcommitted
Fixed deadlock issue related with MMSegWandbHook (open-mmlab#2398)
Co-authored-by: WangYudong <[email protected]>
1 parent 320d8c6 commit c0515a1

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

mmseg/core/hook/wandblogger_hook.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,8 @@ def before_run(self, runner):
168168
# Log ground truth data
169169
self._log_data_table()
170170

171-
@master_only
171+
# for the reason of this double-layered structure, refer to
172+
# https://github.com/open-mmlab/mmdetection/issues/8145#issuecomment-1345343076
172173
def after_train_iter(self, runner):
173174
if self.get_mode(runner) == 'train':
174175
# An ugly patch. The iter-based eval hook will call the
@@ -178,7 +179,10 @@ def after_train_iter(self, runner):
178179
return super(MMSegWandbHook, self).after_train_iter(runner)
179180
else:
180181
super(MMSegWandbHook, self).after_train_iter(runner)
182+
self._after_train_iter(runner)
181183

184+
@master_only
185+
def _after_train_iter(self, runner):
182186
if self.by_epoch:
183187
return
184188

0 commit comments

Comments
 (0)