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 MMSegWandbHook #2398

Merged
merged 1 commit into from
Dec 13, 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 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