Skip to content
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

Fix to allow custom CheckpointIO with strategy classes #13785

Merged
merged 11 commits into from
Jul 22, 2022
Merged

Conversation

rohitgr7
Copy link
Contributor

@rohitgr7 rohitgr7 commented Jul 21, 2022

What does this PR do?

Earlier since we initialized accelerator specific CheckpointIO in the strategy init, user's don't have an option to plugin custom CheckpointIO due to this:
https://github.com/Lightning-AI/lightning/blob/0e5312833fa70fb744f316f3db19c78b38eb9683/src/pytorch_lightning/trainer/connectors/accelerator_connector.py#L348-L352

Found while working on #13658

Does your PR introduce any breaking changes? If yes, please list them.

Before submitting

  • Was this discussed/approved via a GitHub issue? (not for typos and docs)
  • Did you read the contributor guideline, Pull Request section?
  • Did you make sure your PR does only one thing, instead of bundling different changes together?
  • Did you make sure to update the documentation with your changes? (if necessary)
  • Did you write any new necessary tests? (not for typos and docs)
  • Did you verify new and existing tests pass locally with your changes?
  • Did you list all the breaking changes introduced by this pull request?
  • Did you update the CHANGELOG? (not for typos, docs, test updates, or minor internal changes/refactors)

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:

  • Is this pull request ready for review? (if not, please submit in draft mode)
  • Check that all items from Before submitting are resolved
  • Make sure the title is self-explanatory and the description concisely explains the PR
  • Add labels and milestones (and optionally projects) to the PR so it can be classified

Did you have fun?

Make sure you had fun coding 🙃

cc @Borda @awaelchli @ananthsub @ninginthecloud @rohitgr7 @otaj @akihironitta

@rohitgr7 rohitgr7 added bug Something isn't working checkpointing Related to checkpointing labels Jul 21, 2022
@rohitgr7 rohitgr7 added this to the pl:1.7 milestone Jul 21, 2022
@github-actions github-actions bot added the pl Generic label for PyTorch Lightning package label Jul 21, 2022
@rohitgr7 rohitgr7 marked this pull request as ready for review July 21, 2022 12:20
@rohitgr7
Copy link
Contributor Author

need help with mypy

@codecov
Copy link

codecov bot commented Jul 21, 2022

Codecov Report

Merging #13785 (12f0ac0) into master (4588a79) will increase coverage by 27%.
The diff coverage is 74%.

@@            Coverage Diff            @@
##           master   #13785     +/-   ##
=========================================
+ Coverage      49%      76%    +27%     
=========================================
  Files         327      327             
  Lines       25457    25540     +83     
=========================================
+ Hits        12437    19499   +7062     
+ Misses      13020     6041   -6979     

@rohitgr7 rohitgr7 requested a review from otaj July 21, 2022 12:59
@kaushikb11
Copy link
Contributor

Thanks!

@mergify mergify bot added the ready PRs ready to be merged label Jul 21, 2022
@rohitgr7 rohitgr7 enabled auto-merge (squash) July 21, 2022 14:02
@rohitgr7 rohitgr7 self-assigned this Jul 22, 2022
src/pytorch_lightning/CHANGELOG.md Outdated Show resolved Hide resolved
src/pytorch_lightning/strategies/hpu_parallel.py Outdated Show resolved Hide resolved
@mergify mergify bot removed the ready PRs ready to be merged label Jul 22, 2022
@rohitgr7 rohitgr7 requested a review from awaelchli July 22, 2022 11:50
@mergify mergify bot added the ready PRs ready to be merged label Jul 22, 2022
@rohitgr7 rohitgr7 merged commit 763fbf6 into master Jul 22, 2022
@rohitgr7 rohitgr7 deleted the fix/ckpt_strat branch July 22, 2022 14:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working checkpointing Related to checkpointing pl Generic label for PyTorch Lightning package ready PRs ready to be merged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants