-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
Fix overfit_batches > 0 on distributed_backend = "ddp" #3534
Conversation
Hello @awaelchli! Thanks for updating this PR. There are currently no PEP 8 issues detected in this Pull Request. Cheers! 🍻 Comment last updated at 2020-09-19 12:01:51 UTC |
@@ -155,7 +155,7 @@ def _get_distributed_sampler(self, dataloader, train): | |||
assert self.distributed_backend is not None | |||
kwargs = dict(num_replicas=world_size[self.distributed_backend], rank=self.global_rank) | |||
|
|||
kwargs['shuffle'] = train | |||
kwargs['shuffle'] = train and not self.overfit_batches |
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.
should we have a test for this?
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.
@SkafteNicki I tried to find a way but the problem is that this bug affects only ddp, and don't know how to test this due to the multiprocessing.
This pull request is now in conflict... :( |
2093e52
to
9335769
Compare
Codecov Report
@@ Coverage Diff @@
## master #3534 +/- ##
======================================
Coverage 91% 91%
======================================
Files 109 109
Lines 8080 8080
======================================
Hits 7340 7340
Misses 740 740 |
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.
LGTM
…3534) * example * ex * example * sampler * fix * fix * remove example * changelog
What does this PR do?
Fixes #2311
Continuation of #3501
This bug is only present in ddp, it only applies to the case when we replace the distributed sampler
Before submitting
PR review
Anyone in the community is free to review the PR once the tests have passed.
If we didn't discuss your PR in Github issues there's a high chance it will not be merged.
Did you have fun?
Make sure you had fun coding 🙃