-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
added warning for None dataloader #1745
Conversation
Hello @ybrovman! Thanks for updating this PR. There are currently no PEP 8 issues detected in this Pull Request. Cheers! 🍻 Comment last updated at 2020-05-06 15:17:45 UTC |
Codecov Report
@@ Coverage Diff @@
## master #1745 +/- ##
======================================
- Coverage 88% 88% -0%
======================================
Files 69 69
Lines 4156 4161 +5
======================================
+ Hits 3666 3670 +4
- Misses 490 491 +1 |
raise MisconfigurationException( | ||
f'Your {mode}_dataloader has shuffle=True, it is best practice to turn' | ||
' this off for validation and test dataloaders.') | ||
dataloadersClean.append(loader) |
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.
this should be dataloaders_clean
, i'm surprised our pep8speaks bot didn't mention this
https://www.python.org/dev/peps/pep-0008/#function-and-variable-names
f'Your {mode}_dataloader has shuffle=True, it is best practice to turn' | ||
' this off for validation and test dataloaders.') | ||
dataloaders_clean.append(loader) | ||
else: |
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.
I would keep the previous logic and here add simply:
if any([dl is None for dl in dataloaders]):
rank_zero_warn("One of given dataloaders is None and it will be skipped.")
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.
ok sure, makes sense
Before submitting
What does this PR do?
This is follow up PR from PR #1560. Logs a warning if there are any validation dataloaders that are None.
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 🙃