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

Conversation

MilkClouds
Copy link

@MilkClouds MilkClouds commented Dec 11, 2022

Co-authored-by: WangYudong yudong.wang@akane.waseda.jp

Thanks for your contribution and we appreciate it a lot. The following instructions would make your pull request more healthy and more easily get feedback. If you do not understand some items, don't worry, just make the pull request and seek help from maintainers.

Motivation

Bug report on mmseg: #2137
Bug report on mmdet: open-mmlab/mmdetection#8145.

deadlock occurs on both mmseg and mmdet, for the same reason.

To summarize problem, when we use MMSegWandbHook after TextLoggerHook, deadlock problem occurs. These are because of same reason and I summarized the reason in open-mmlab/mmdetection#8145 (comment) here.

Modification

Made MMSegWandbHook to clear runner.log_buffer on every process, including process for GPU 1,2,3...

BC-breaking (Optional)

Does the modification introduce changes that break the backward-compatibility of the downstream repos?
If so, please describe how it breaks the compatibility and how the downstream projects should modify their code to keep compatibility with this PR.

Use cases (Optional)

If this PR introduces a new feature, it is better to list some use cases here, and update the documentation.

Checklist

  1. Pre-commit or other linting tools are used to fix the potential lint issues.
  2. The modification is covered by complete unit tests. If not, please add more unit test to ensure the correctness.
  3. If the modification has potential influence on downstream projects, this PR should be tested with downstream projects, like MMDet or MMDet3D.
  4. The documentation has been modified accordingly, like docstring or example tutorials.

@CLAassistant
Copy link

CLAassistant commented Dec 11, 2022

CLA assistant check
All committers have signed the CLA.

@MilkClouds
Copy link
Author

MilkClouds commented Dec 11, 2022

There was already a similar commit on mmcls open-mmlab/mmpretrain#1242, which I didn't know! (this commit was only 5 days ago, too.)
I spent quite a long time trying to figure out the cause of the bug, but there was someone who already figured out the causes :(
Anyway, please merge this PR. Even though detailed implementation is different with open-mmlab/mmpretrain#1242, purpose is the same.

@codecov
Copy link

codecov bot commented Dec 12, 2022

Codecov Report

Base: 88.97% // Head: 88.97% // Decreases project coverage by -0.00% ⚠️

Coverage data is based on head (e2fd5c0) compared to base (77dbecd).
Patch coverage: 66.66% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2398      +/-   ##
==========================================
- Coverage   88.97%   88.97%   -0.01%     
==========================================
  Files         146      146              
  Lines        8747     8749       +2     
  Branches     1474     1474              
==========================================
+ Hits         7783     7784       +1     
- Misses        722      723       +1     
  Partials      242      242              
Flag Coverage Δ
unittests 88.97% <66.66%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
mmseg/core/hook/wandblogger_hook.py 17.93% <66.66%> (+0.44%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@MeowZheng
Copy link
Collaborator

Thanks for your contribution, we're working on testing this modification.

Co-authored-by: WangYudong <yudong.wang@akane.waseda.jp>
@MilkClouds
Copy link
Author

MilkClouds commented Dec 12, 2022

I've verified my commit. Nothing else has changed.

(Edit)
Since I accidentally removed my commit on mmsegwandbhook_deadlock_fix branch, PR was automatically closed. I've recovered my commit and reopened my PR. Sorry for the confusion.

@xiexinch
Copy link
Collaborator

Thanks for your contribution, we're working on testing this modification.

This modification works well.

@MeowZheng MeowZheng merged commit 2cbff70 into open-mmlab:master Dec 13, 2022
MeowZheng pushed a commit that referenced this pull request Jan 11, 2023
Co-authored-by: WangYudong <yudong.wang@akane.waseda.jp>
aravind-h-v pushed a commit to aravind-h-v/mmsegmentation that referenced this pull request Mar 27, 2023
* add: inversion to pix2pix zero docs.

* add: comment to emphasize the use of flan to generate.

* more nits.
huajiangjiangLi pushed a commit to pytorchuser/HD-Seg that referenced this pull request Apr 12, 2023
Co-authored-by: WangYudong <yudong.wang@akane.waseda.jp>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants