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

Include parent directory validation check for deepspeed #17795

Merged
merged 24 commits into from Jul 17, 2023

Conversation

ishandutta0098
Copy link
Contributor

What does this PR do?

Included a check for the checkpoint parent directory and enhanced the error message making the checkpoint validation more robust

  • Added a check to see if the passed checkpoint directory is a valid deepspeed directory
  • Raised an error indicating the checkpoint directory to be passed should be the parent directory

Fixes #17763

Before submitting
  • Was this discussed/agreed 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:

Reviewer checklist
  • 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

…rror message

- Added a check to see if the passed checkpoint directory is a valid deepspeed directory
- Raised an error indicating the checkpoint directory to be passed should be the parent directory
@github-actions github-actions bot added pl Generic label for PyTorch Lightning package fabric lightning.fabric.Fabric labels Jun 9, 2023
@github-actions github-actions bot removed the fabric lightning.fabric.Fabric label Jun 10, 2023
@carmocca carmocca added checkpointing Related to checkpointing strategy: deepspeed community This PR is from the community labels Jun 11, 2023
@github-actions github-actions bot added the fabric lightning.fabric.Fabric label Jun 12, 2023
@codecov
Copy link

codecov bot commented Jun 12, 2023

Codecov Report

Merging #17795 (467f064) into master (080eaf3) will decrease coverage by 25%.
The diff coverage is 14%.

❗ Current head 467f064 differs from pull request most recent head 5d41cbf. Consider uploading reports for the commit 5d41cbf to get more accurate results

Additional details and impacted files
@@            Coverage Diff            @@
##           master   #17795     +/-   ##
=========================================
- Coverage      84%      59%    -25%     
=========================================
  Files         430      420     -10     
  Lines       32667    31977    -690     
=========================================
- Hits        27319    18862   -8457     
- Misses       5348    13115   +7767     

@awaelchli awaelchli added this to the 2.1 milestone Jul 16, 2023
Copy link
Member

@carmocca carmocca left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice improvement in usability

src/lightning/fabric/strategies/deepspeed.py Outdated Show resolved Hide resolved
@mergify mergify bot added the ready PRs ready to be merged label Jul 17, 2023
@awaelchli awaelchli merged commit 7116a9f into Lightning-AI:master Jul 17, 2023
102 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
checkpointing Related to checkpointing community This PR is from the community fabric lightning.fabric.Fabric pl Generic label for PyTorch Lightning package ready PRs ready to be merged strategy: deepspeed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Make check for valid deepspeed checkpoint more robust
4 participants