-
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
Add on_exception
to DataModule
#19601
Merged
awaelchli
merged 4 commits into
Lightning-AI:master
from
clumsy:fix/datamodule_on_exception
Mar 22, 2024
Merged
Add on_exception
to DataModule
#19601
awaelchli
merged 4 commits into
Lightning-AI:master
from
clumsy:fix/datamodule_on_exception
Mar 22, 2024
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
clumsy
requested review from
williamFalcon,
awaelchli,
carmocca,
justusschock and
Borda
as code owners
March 8, 2024 15:14
Please let me know if additional changes are necessary, @awaelchli |
awaelchli
added
feature
Is an improvement or enhancement
trainer
community
This PR is from the community
labels
Mar 9, 2024
awaelchli
changed the title
fix: Add on_exception to DataModule (#19594)
Add Mar 9, 2024
on_exception
to DataModule
awaelchli
approved these changes
Mar 9, 2024
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.
Hey @clumsy
The implementation looks good! Thanks for adding the test.
clumsy
force-pushed
the
fix/datamodule_on_exception
branch
from
March 11, 2024 14:22
7e2b99e
to
6fbba9a
Compare
Borda
approved these changes
Mar 13, 2024
carmocca
approved these changes
Mar 22, 2024
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## master #19601 +/- ##
==========================================
- Coverage 84% 53% -31%
==========================================
Files 424 416 -8
Lines 34910 34759 -151
==========================================
- Hits 29340 18438 -10902
- Misses 5570 16321 +10751 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What does this PR do?
Adds
on_exception
callback that lets us handle training termination due to an exception forLightningDataModule
, which is currently not available.Fixes #19594
The change is backward-compatible, but could be breaking if a type derived from
LightningDataModule
defineson_exception
method.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
📚 Documentation preview 📚: https://pytorch-lightning--19601.org.readthedocs.build/en/19601/