-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Make asyncio checkpointing work if validate/fit is called more than once #20952
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
Merged
Conversation
This file contains hidden or 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
let me know if this looks ok and then I'll fix the mypy errors. |
any feedback? is it worth spending time fixing mypy / conflict or there is no interest in this (I would say the more serious issue is the linked issue which seems like it could result in checkpoints which are degraded). |
Isalia20
reviewed
Aug 8, 2025
Borda
reviewed
Aug 12, 2025
Borda
reviewed
Aug 18, 2025
…rch-lightning into jhunt/fix-async-reset
for more information, see https://pre-commit.ci
Borda
approved these changes
Aug 18, 2025
…rch-lightning into jhunt/fix-async-reset
Isalia20
reviewed
Aug 18, 2025
bhimrazy
reviewed
Aug 18, 2025
Isalia20
approved these changes
Aug 19, 2025
Borda
added a commit
that referenced
this pull request
Aug 28, 2025
…nce (#20952) * Make asyncio checkpointing work if validate/fit is called more than once. * Apply suggestions from code review * Add assertion to ensure executor is initialized before saving checkpoint * update --------- Co-authored-by: Jirka Borovec <[email protected]> Co-authored-by: Jirka B <[email protected]> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: bhimrazy <[email protected]> (cherry picked from commit ff64a92)
lantiga
pushed a commit
that referenced
this pull request
Aug 29, 2025
…nce (#20952) * Make asyncio checkpointing work if validate/fit is called more than once. * Apply suggestions from code review * Add assertion to ensure executor is initialized before saving checkpoint * update --------- Co-authored-by: Jirka Borovec <[email protected]> Co-authored-by: Jirka B <[email protected]> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: bhimrazy <[email protected]> (cherry picked from commit ff64a92)
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?
Currently if using async checkpointing if fit or validate is called than once it will crash (because the threadpool is shutdown and never re-created).
This PR modifies the test to induce the crash and fixes it.
No.
Was this discussed/agreed via a GitHub issue? (not for typos and docs)
No, this is just a bugfix, not a behavior change. Should I create an issue?
Did you read the contributor guideline, Pull Request section?
Yes
Did you make sure your PR does only one thing, instead of bundling different changes together?
Yes
Did you make sure to update the documentation with your changes? (if necessary)
na
Did you write any new necessary tests? (not for typos and docs)
yes
Did you verify new and existing tests pass locally with your changes?
as best I could, I'm not very clear the recommended setup for testing pytorch lightning locally, I was only able to run the test I modified.
Did you list all the breaking changes introduced by this pull request?
na
Did you update the CHANGELOG? (not for typos, docs, test updates, or minor internal changes/refactors)
Yes
📚 Documentation preview 📚: https://pytorch-lightning--20952.org.readthedocs.build/en/20952/