Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed deadlock issue related with MMDetWandbHook #9476

Merged
merged 1 commit into from
Dec 12, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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