-
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 shuffle for distributed sampler #2789
Conversation
could you also add a test for this? maybe mark it as wip in the meantime |
Codecov Report
@@ Coverage Diff @@
## master #2789 +/- ##
======================================
Coverage 91% 91%
======================================
Files 76 76
Lines 6787 6788 +1
======================================
+ Hits 6150 6151 +1
Misses 637 637 |
@awaelchli need a little help here with the test. Not sure why is it giving this error.
Can't test it locally. |
Yes, the train_dataloader is None because the test that runs in the main process never sees the trainer state getting updated. When using ddp, the fit and test is running in subprocesses. You can create a callback and put your assertions in e.g. on_train_start and on_test_start methods. Also, remember to skip ddp related tests on the windows platform. |
Oh! okay. Thanks :) |
@rohitgr7 I drafted it here in the latest commit. Need to wait for CI since I also can't test distributed things locally. |
Nice! It passed. |
What happens in the case where the user does not want to shuffle train data? |
Add this sampler manually and pass |
yes. Mind updating that? |
What does this PR do?
Fixes #2703
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 🙃