Fixed deadlock issue related with MMSegWandbHook (#2398)
Co-authored-by: WangYudong <yudong.wang@akane.waseda.jp>pull/2489/head
parent
320d8c60f3
commit
c0515a1be5
|
@ -168,7 +168,8 @@ class MMSegWandbHook(WandbLoggerHook):
|
|||
# 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
|
||||
|
@ -178,7 +179,10 @@ class MMSegWandbHook(WandbLoggerHook):
|
|||
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
|
||||
|
||||
|
|
Loading…
Reference in New Issue