Skip to content

Conversation

@jjenniferdai
Copy link
Contributor

@jjenniferdai jjenniferdai commented Sep 20, 2021

What does this PR do?

Along the lines of #9074, consolidate more fs calls from checkpoint callback. For non-empty directory warning:

  • move to after __resolve_ckpt_dir
  • rank zero only

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 internal minor changes/refactorings)

PR review

Anyone in the community is welcome to review the PR.
Before you start reviewing make sure you have read 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 🙃

@jjenniferdai jjenniferdai changed the title [wip] migrate more fs calls checkpoint callback --> io plugin Migrate more fs calls checkpoint callback --> io plugin Sep 21, 2021
@jjenniferdai jjenniferdai marked this pull request as ready for review September 21, 2021 18:27
@awaelchli awaelchli added the checkpointing Related to checkpointing label Sep 22, 2021
Copy link
Contributor

@ananthsub ananthsub left a comment

Choose a reason for hiding this comment

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

note for reviewers:

This PR is an optimization when using remote filesystems with lightning. this warning is currently called on every rank, which creates duplicate, bursty outbound network calls. in reality, we only needed to check this on global rank zero (assuming we have a common dirpath across nodes).

when training with larger configurations (e.g. 16 nodes x 8 gpus), we ran into quota limitations for our jobs. this will benefit anyone saving checkpoints using remote filesystems such as S3/GCS/azure storage

@ananthsub ananthsub added this to the v1.5 milestone Sep 24, 2021
@jjenniferdai jjenniferdai changed the title Migrate more fs calls checkpoint callback --> io plugin Checkpoint non-empty dir warning: after __resolve_ckpt_dir and global_zero only Sep 25, 2021
Copy link
Contributor

@ananthsub ananthsub left a comment

Choose a reason for hiding this comment

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

LGTM!

@mergify mergify bot added the ready PRs ready to be merged label Sep 25, 2021
@ananthsub ananthsub changed the title Checkpoint non-empty dir warning: after __resolve_ckpt_dir and global_zero only Optimize non-empty directory warning check in model checkpoint callback Sep 25, 2021
@codecov
Copy link

codecov bot commented Sep 25, 2021

Codecov Report

Merging #9615 (9353dd1) into master (45200fc) will decrease coverage by 4%.
The diff coverage is 100%.

@@           Coverage Diff           @@
##           master   #9615    +/-   ##
=======================================
- Coverage      93%     89%    -4%     
=======================================
  Files         180     179     -1     
  Lines       15116   15308   +192     
=======================================
- Hits        14043   13587   -456     
- Misses       1073    1721   +648     

@ananthsub ananthsub enabled auto-merge (squash) September 25, 2021 02:46
@ananthsub ananthsub disabled auto-merge September 25, 2021 02:47
@ananthsub ananthsub merged commit 444b21d into Lightning-AI:master Sep 25, 2021
@jjenniferdai jjenniferdai deleted the fs-to-ioplugin branch September 27, 2021 16:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

checkpointing Related to checkpointing ready PRs ready to be merged refactor

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants