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

[tune] Update pytorch-lightning integration API #38883

Merged
merged 2 commits into from
Aug 28, 2023

Conversation

krfricke
Copy link
Contributor

@krfricke krfricke commented Aug 25, 2023

Why are these changes needed?

Updates PTL callbacks to use new train.report API.

Related issue number

Closes #38837

Checks

  • I've signed off every commit(by using the -s flag, i.e., git commit -s) in this PR.
  • I've run scripts/format.sh to lint the changes in this PR.
  • I've included any doc changes needed for https://docs.ray.io/en/master/.
    • I've added any new APIs to the API Reference. For example, if I added a
      method in Tune, I've added it in doc/source/tune/api/ under the
      corresponding .rst file.
  • I've made sure the tests are passing. Note that there might be a few flaky tests, see the recent failures at https://flakey-tests.ray.io/
  • Testing Strategy
    • Unit tests
    • Release tests
    • This PR is not tested :(

Signed-off-by: Kai Fricke <kai@anyscale.com>
@krfricke krfricke added tests-ok The tagger certifies test failures are unrelated and assumes personal liability. Ray 2.7 labels Aug 25, 2023
Copy link
Contributor

@justinvyu justinvyu left a comment

Choose a reason for hiding this comment

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

Thanks! some nits

Comment on lines +168 to +171
if _use_storage_context():
checkpoint = Checkpoint.from_directory(checkpoint_dir)
else:
checkpoint = LegacyCheckpoint.from_directory(checkpoint_dir)
Copy link
Contributor

Choose a reason for hiding this comment

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

we can just use train.Checkpoint now -- the alias is now gated by the feature flag.

Comment on lines +190 to +191
"`ray.tune.integration.pytorch_lightning._TuneCheckpointCallback` "
"is deprecated."
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: Use TuneReportCheckpointCallback instead

python/ray/tune/integration/pytorch_lightning.py Outdated Show resolved Hide resolved
@zhe-thoughts
Copy link
Collaborator

@matthewdeng can I have your approval since it's late stage. Thanks

Co-authored-by: Justin Yu <justinvyu@anyscale.com>
Signed-off-by: matthewdeng <matthew.j.deng@gmail.com>
@zhe-thoughts zhe-thoughts removed their assignment Aug 28, 2023
@zhe-thoughts
Copy link
Collaborator

Please merge into master first and create cherry pick PR. Thanks

@krfricke krfricke merged commit d3b4edf into ray-project:master Aug 28, 2023
58 of 64 checks passed
@krfricke krfricke deleted the train/ptl-api branch August 28, 2023 15:16
krfricke added a commit to krfricke/ray that referenced this pull request Aug 28, 2023
Updates PTL callbacks to use new train.report API.

Signed-off-by: Kai Fricke <kai@anyscale.com>
Signed-off-by: matthewdeng <matthew.j.deng@gmail.com>
Co-authored-by: matthewdeng <matthew.j.deng@gmail.com>
Co-authored-by: Justin Yu <justinvyu@anyscale.com>
GeneDer pushed a commit that referenced this pull request Aug 28, 2023
Updates PTL callbacks to use new train.report API.

Signed-off-by: Kai Fricke <kai@anyscale.com>
Signed-off-by: matthewdeng <matthew.j.deng@gmail.com>
Co-authored-by: matthewdeng <matthew.j.deng@gmail.com>
Co-authored-by: Justin Yu <justinvyu@anyscale.com>
arvind-chandra pushed a commit to lmco/ray that referenced this pull request Aug 31, 2023
Updates PTL callbacks to use new train.report API.

Signed-off-by: Kai Fricke <kai@anyscale.com>
Signed-off-by: matthewdeng <matthew.j.deng@gmail.com>
Co-authored-by: matthewdeng <matthew.j.deng@gmail.com>
Co-authored-by: Justin Yu <justinvyu@anyscale.com>
Signed-off-by: e428265 <arvind.chandramouli@lmco.com>
LeonLuttenberger pushed a commit to jaidisido/ray that referenced this pull request Sep 5, 2023
Updates PTL callbacks to use new train.report API.

Signed-off-by: Kai Fricke <kai@anyscale.com>
Signed-off-by: matthewdeng <matthew.j.deng@gmail.com>
Co-authored-by: matthewdeng <matthew.j.deng@gmail.com>
Co-authored-by: Justin Yu <justinvyu@anyscale.com>
jimthompson5802 pushed a commit to jimthompson5802/ray that referenced this pull request Sep 12, 2023
Updates PTL callbacks to use new train.report API.

Signed-off-by: Kai Fricke <kai@anyscale.com>
Signed-off-by: matthewdeng <matthew.j.deng@gmail.com>
Co-authored-by: matthewdeng <matthew.j.deng@gmail.com>
Co-authored-by: Justin Yu <justinvyu@anyscale.com>
Signed-off-by: Jim Thompson <jimthompson5802@gmail.com>
vymao pushed a commit to vymao/ray that referenced this pull request Oct 11, 2023
Updates PTL callbacks to use new train.report API.

Signed-off-by: Kai Fricke <kai@anyscale.com>
Signed-off-by: matthewdeng <matthew.j.deng@gmail.com>
Co-authored-by: matthewdeng <matthew.j.deng@gmail.com>
Co-authored-by: Justin Yu <justinvyu@anyscale.com>
Signed-off-by: Victor <vctr.y.m@example.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Ray 2.7 tests-ok The tagger certifies test failures are unrelated and assumes personal liability.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[train][GA] Update tune.integration.pytorch_lightning
4 participants