fix: Skip val_check_interval validation when limit_val_batches=0 - #21560
fix: Skip val_check_interval validation when limit_val_batches=0#21560justusschock merged 13 commits into
Conversation
When limit_val_batches=0 (validation disabled), the val_check_interval sanity check is now skipped since validation will not run anyway. Fixes #21553
for more information, see https://pre-commit.ci
Codecov Report✅ All modified and coverable lines are covered by tests.
Additional details and impacted files@@ Coverage Diff @@
## master #21560 +/- ##
=========================================
- Coverage 87% 79% -8%
=========================================
Files 270 267 -3
Lines 24077 24018 -59
=========================================
- Hits 20865 18961 -1904
- Misses 3212 5057 +1845 |
|
Addressed both review comments:
Thanks for the review @deependujha! |
for more information, see https://pre-commit.ci
|
thanks. Can you update the changelog too. |
|
Updated:
Thanks for the review! |
|
Hey @ManasVardhan, thanks for picking this up so quickly. I was planning to submit a PR as well. Since I opened the original issue and proposed the solution, would you be open to adding me as a co-author? |
Hi Taha, yes absolutely. |
|
Re: why not
|
Co-authored-by: Taha Yassine <40228615+taha-yassine@users.noreply.github.com>
|
not sure with your reasoning. |
|
@deependujha Re: why |
|
thanks for the clarification, but i believe, the line won't even get executed. pytorch-lightning/src/lightning/pytorch/loops/training_epoch_loop.py Lines 523 to 536 in a3a28b3
pytorch-lightning/src/lightning/pytorch/trainer/trainer.py Lines 1353 to 1360 in a3a28b3
|
|
Good catch @deependujha! You're right, when I went with |
|
thanks, but I believe the current changes are enough. Thanks to both of you for the great work. Should be landed soon. |
|
CI is all green -- ready to merge whenever you get a chance! Thanks for the review 🙏 |
Fixes #21553
When limit_val_batches=0 (validation disabled), the val_check_interval sanity check is now skipped since validation won't run anyway.
Changes
📚 Documentation preview 📚: https://pytorch-lightning--21560.org.readthedocs.build/en/21560/