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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix warning for Dataloader if num_workers = cpu count = 1 #19224

Merged
merged 5 commits into from Jan 8, 2024

Conversation

dipta007
Copy link
Contributor

@dipta007 dipta007 commented Jan 1, 2024

What does this PR do?

This PR checks if the num_workers of dataloader should be more than the assigned.
Previously even if the available num_worker was 1 and the value in the dataloader was given 1, there was a warning stating to give num_worker=1, which is wrong.

Fixes #19223

Before submitting
  • Was this discussed/agreed via a GitHub issue? (not for typos and docs) - Yes
  • Did you read the contributor guideline, Pull Request section?
  • Did you make sure your PR does only one thing, instead of bundling different changes together?
  • Did you make sure to update the documentation with your changes? (if necessary) - Not Necessary
  • Did you write any new necessary tests? (not for typos and docs) - No
  • Did you verify new and existing tests pass locally with your changes?
  • Did you list all the breaking changes introduced by this pull request? - Yes
  • Did you update the CHANGELOG? (not for typos, docs, test updates, or minor internal changes/refactors) - No

PR review

Anyone in the community is welcome to review the PR.
Before you start reviewing, make sure you have read the review guidelines. In short, see the following bullet-list:

Reviewer checklist
  • Is this pull request ready for review? (if not, please submit in draft mode)
  • Check that all items from Before submitting are resolved
  • Make sure the title is self-explanatory and the description concisely explains the PR
  • Add labels and milestones (and optionally projects) to the PR so it can be classified

馃摎 Documentation preview 馃摎: https://pytorch-lightning--19224.org.readthedocs.build/en/19224/

@github-actions github-actions bot added the pl Generic label for PyTorch Lightning package label Jan 1, 2024
@dipta007 dipta007 requested a review from Borda as a code owner January 1, 2024 23:50
@awaelchli awaelchli changed the title Fix For Issue: 19223 - Dataloader num_workers warning even if the num_workers available is 1 #19223 Fix warning for Dataloader if num_workers = cpu count = 1 Jan 1, 2024
@awaelchli awaelchli added data handling Generic data-related topic community This PR is from the community labels Jan 1, 2024
@awaelchli awaelchli added the bug Something isn't working label Jan 1, 2024
@awaelchli awaelchli added this to the 2.1.x milestone Jan 1, 2024
Copy link

codecov bot commented Jan 2, 2024

Codecov Report

Merging #19224 (75f83c7) into master (4d6acda) will decrease coverage by 34%.
The diff coverage is 100%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master   #19224      +/-   ##
==========================================
- Coverage      83%      49%     -34%     
==========================================
  Files         445      437       -8     
  Lines       37301    37148     -153     
==========================================
- Hits        31002    18238   -12764     
- Misses       6299    18910   +12611     

@mergify mergify bot added the ready PRs ready to be merged label Jan 2, 2024
@dipta007
Copy link
Contributor Author

dipta007 commented Jan 3, 2024

@awaelchli @carmocca any update here?
I think one of the tests has been failed due to timeout.
I tried to restart it but I think I dont have the permission to do so.

@awaelchli
Copy link
Member

@dipta007 We will merge the PR as soon as we fix the failing docs build. Thanks for your understanding.

@awaelchli awaelchli merged commit 8663460 into Lightning-AI:master Jan 8, 2024
92 checks passed
awaelchli added a commit that referenced this pull request Jan 30, 2024
Co-authored-by: awaelchli <aedu.waelchli@gmail.com>
lexierule pushed a commit that referenced this pull request Jan 31, 2024
Co-authored-by: awaelchli <aedu.waelchli@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working community This PR is from the community data handling Generic data-related topic pl Generic label for PyTorch Lightning package ready PRs ready to be merged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Dataloader num_workers warning even if the num_workers available is 1
3 participants