-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
[Enchance] Support random seed for distributed sampler #1411
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
move mmseg/utils/dist_util.py to mmseg/core/utils/dist_util.py
Codecov Report
@@ Coverage Diff @@
## master #1411 +/- ##
==========================================
- Coverage 90.39% 90.22% -0.18%
==========================================
Files 133 136 +3
Lines 7906 7949 +43
Branches 1318 1323 +5
==========================================
+ Hits 7147 7172 +25
- Misses 536 552 +16
- Partials 223 225 +2
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
* support random seed for distributed sampler * move mmseg/utils/dist_util.py to mmseg/core/utils/dist_util.py * move mmseg/utils/dist_util.py to mmseg/core/utils/dist_util.py * change dist sampler * change dist sampler * fix docstring in sync_random_seed
* support random seed for distributed sampler * move mmseg/utils/dist_util.py to mmseg/core/utils/dist_util.py * move mmseg/utils/dist_util.py to mmseg/core/utils/dist_util.py * change dist sampler * change dist sampler * fix docstring in sync_random_seed
* call contiguous after permute Fixes for MPS device * Fix MPS UserWarning * make style * Revert "Fix MPS UserWarning" This reverts commit b46c32810ee5fdc4c16a8e9224a826490b66cf49.
Motivation
Modify distributed sampler and keep the manual_seed behavior same with pytorch original version
Refers to open-mmlab/mmdetection#7440, open-mmlab/mmdetection#7432 and open-mmlab/mmagic#815.
Modification
add seed to distributed sampler and apply
g.manual_seed(self.epoch + self.seed)
synchronize the seed in init function