diff --git a/mmdet/core/hook/wandblogger_hook.py b/mmdet/core/hook/wandblogger_hook.py index 234506ce313..7bf252f0113 100644 --- a/mmdet/core/hook/wandblogger_hook.py +++ b/mmdet/core/hook/wandblogger_hook.py @@ -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 @@ -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