-
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
introduce has_len_all_ranks() to check the length of dataloader across ranks #9827
introduce has_len_all_ranks() to check the length of dataloader across ranks #9827
Conversation
Codecov Report
@@ Coverage Diff @@
## master #9827 +/- ##
=======================================
- Coverage 92% 89% -4%
=======================================
Files 180 181 +1
Lines 16147 16170 +23
=======================================
- Hits 14934 14357 -577
- Misses 1213 1813 +600 |
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.
quick question. How does Detectron2 handles un-balanced batches as Lightning would definitely hanged otherwise.
9a9aa21
to
4ac7426
Compare
This will conflict with #9764, which one do we want to land first? |
Hey, just saw this. Sorry for the delay on my response. I won't merge #9764 until 1.5 is released because of our current feature freeze :) |
for more information, see https://pre-commit.ci
I noticed that |
70690d5
to
aa78bb5
Compare
nit: I think you wrote the wrong thing under "Does your PR introduce any breaking changes?" |
for more information, see https://pre-commit.ci
@ninginthecloud Any chance you can get this PR ready for tomorrow ? |
for more information, see https://pre-commit.ci
for more information, see https://pre-commit.ci
What does this PR do?
Fixes #9785
This PR has changed following:
has_len_all_ranks()
(I'm not sure if originalhas_len()
has been widely used by users in public, so I just add a new util function. Feel free to let me know if I just need to replacehas_len()
directly. ) cc: @tchaton @awaelchliallow_zero_length_dataloader_with_ddp
test_common.py:test_evaluate[trainer_kwargs2] pytest.param(dict(accelerator="ddp_spawn", gpus=2), marks=RunIf(min_gpus=2))
Does your PR introduce any breaking changes? If yes, please list them.
No.
Before submitting
PR review
Anyone in the community is welcome to review the PR.
Before you start reviewing make sure you have read Review guidelines. In short, see the following bullet-list:
Did you have fun?
Make sure you had fun coding 🙃