-
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
avoid unnecessary workers with sequential CombinedLoader
#17639
avoid unnecessary workers with sequential CombinedLoader
#17639
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.
Good catch! Can you add a test in tests/tests_pytorch/utilities/test_combined_loader.py. Also a "Fixed" entry in src/lightning/pytorch/CHANGELOG.md
Alright, I think I've addressed these. |
CombinedLoader
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.
Thanks for fixing this!
Co-authored-by: Carlos Mocholí <[email protected]> Co-authored-by: Adrian Wälchli <[email protected]> (cherry picked from commit c3ad756)
Co-authored-by: Carlos Mocholí <[email protected]> Co-authored-by: Adrian Wälchli <[email protected]> (cherry picked from commit c3ad756)
What does this PR do?
This PR relates to behavior exhibited when training with multiple validation dataloaders. In this scenario, Lightning wraps the multiple dataloaders with a
CombinedLoader
. ThisCombinedLoader
currently initializes all of the dataloaders causing all of their workers to start up and prefetch data potentially introducing substantial overhead.Fixes #17641
Before submitting
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