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

Add DistSamplerSeedHook for when runner is EpochBasedRunner #1449

Merged
merged 2 commits into from
Apr 6, 2022

Conversation

MeowZheng
Copy link
Collaborator

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

  • Add DistSamplerSeedHook to set epoch num to dataloader when runner is EpochBasedRunner

Modification

  • register DistSamplerSeedHook hook in apis/train.py

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.

@codecov
Copy link

codecov bot commented Apr 6, 2022

Codecov Report

Merging #1449 (6048333) into master (ecd2dc4) will decrease coverage by 0.03%.
The diff coverage is 25.00%.

@@            Coverage Diff             @@
##           master    #1449      +/-   ##
==========================================
- Coverage   90.34%   90.31%   -0.04%     
==========================================
  Files         139      139              
  Lines        8300     8303       +3     
  Branches     1393     1395       +2     
==========================================
  Hits         7499     7499              
- Misses        564      567       +3     
  Partials      237      237              
Flag Coverage Δ
unittests 90.31% <25.00%> (-0.04%) ⬇️

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

Impacted Files Coverage Δ
mmseg/apis/train.py 20.51% <25.00%> (-0.83%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update dfcc0b6...6048333. Read the comment docs.

@MeowZheng MeowZheng requested a review from Junjun2016 April 6, 2022 06:45
@MeowZheng MeowZheng requested a review from Junjun2016 April 6, 2022 12:11
@MeowZheng MeowZheng merged commit 3432ea9 into open-mmlab:master Apr 6, 2022
@MeowZheng MeowZheng deleted the dist-hook branch April 6, 2022 14:04
mob5566 pushed a commit to mob5566/mmsegmentation that referenced this pull request Apr 13, 2022
…ab#1449)

* Add DistSamplerSeedHook for when runner is EpochBasedRunner

* add comment
ZhimingNJ pushed a commit to AetrexTechnology/mmsegmentation that referenced this pull request Jun 29, 2022
…ab#1449)

* Add DistSamplerSeedHook for when runner is EpochBasedRunner

* add comment
aravind-h-v pushed a commit to aravind-h-v/mmsegmentation that referenced this pull request Mar 27, 2023
* Add test

* up

* no bfloat16 for mps

* fix

* rename test
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.

5 participants