Skip to content

[air] Add *path properties to Result and ResultGrid - #33410

Merged
krfricke merged 22 commits into
ray-project:masterfrom
krfricke:tune/results-properties
Mar 24, 2023
Merged

[air] Add *path properties to Result and ResultGrid#33410
krfricke merged 22 commits into
ray-project:masterfrom
krfricke:tune/results-properties

Conversation

@krfricke

@krfricke krfricke commented Mar 17, 2023

Copy link
Copy Markdown
Contributor

Why are these changes needed?

Following #33370, this PR adds Result.path and ResultGrid.experiment_path to the respective classes. Further, we remove the public facing ExperimentAnalysis.local_path and ExperimentAnalysis.remote_path in favor of a unified ExperimentAnalysis.experiment_path.

Related issue number

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 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 :(

Kai Fricke added 7 commits March 16, 2023 19:43
Signed-off-by: Kai Fricke <kai@anyscale.com>
Signed-off-by: Kai Fricke <kai@anyscale.com>
Signed-off-by: Kai Fricke <kai@anyscale.com>
Signed-off-by: Kai Fricke <kai@anyscale.com>
Signed-off-by: Kai Fricke <kai@anyscale.com>
Signed-off-by: Kai Fricke <kai@anyscale.com>
Signed-off-by: Kai Fricke <kai@anyscale.com>
@krfricke krfricke added the tests-ok The tagger certifies test failures are unrelated and assumes personal liability. label Mar 17, 2023
@richardliaw

Copy link
Copy Markdown
Contributor

Hey, did we end up going through #api-changes for this? Also, this doesn't seem to correspond with our discussion on the PRD..?

Signed-off-by: Kai Fricke <kai@anyscale.com>
@krfricke krfricke removed the tests-ok The tagger certifies test failures are unrelated and assumes personal liability. label Mar 19, 2023
Kai Fricke added 3 commits March 19, 2023 16:43
Signed-off-by: Kai Fricke <kai@anyscale.com>
Signed-off-by: Kai Fricke <kai@anyscale.com>
@krfricke krfricke added the tests-ok The tagger certifies test failures are unrelated and assumes personal liability. label Mar 20, 2023
Comment thread python/ray/tune/analysis/experiment_analysis.py Outdated
Signed-off-by: Kai Fricke <kai@anyscale.com>
@krfricke krfricke removed the tests-ok The tagger certifies test failures are unrelated and assumes personal liability. label Mar 22, 2023
Kai Fricke added 2 commits March 21, 2023 17:50
Signed-off-by: Kai Fricke <kai@anyscale.com>
Signed-off-by: Kai Fricke <kai@anyscale.com>
Comment thread python/ray/air/checkpoint.py Outdated
Signed-off-by: Kai Fricke <kai@anyscale.com>
@krfricke
krfricke requested a review from ericl March 22, 2023 17:26
@krfricke krfricke assigned richardliaw and unassigned justinvyu Mar 22, 2023

@justinvyu justinvyu left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks! Just added a few questions:

Comment thread python/ray/tune/tests/test_result_grid.py
setattr(self, attr, value)

@property
def path(self) -> Optional[str]:

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Should checkpoint.uri get deprecated given this one?

Also, what if a user wants the local path for some reason when using cloud? Can only access through private property right now.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I think we should keep URI to have counterparts to to_uri and from_uri for now. But I agree, we should probably see if we want to move to to_path and from_path instead.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

For accessing the local path, if a checkpoint has a URI, the checkpoint object does not have a local path stored. There may be cached data somewhere on the local node, but it doesn't have to be (e.g. if the checkpoint was stored on a worker node). The user can use checkpoint.to_directory() to download the data to a target directory.

Comment thread python/ray/air/checkpoint.py
Comment thread python/ray/air/checkpoint.py
Comment thread python/ray/tune/tests/test_result_grid.py
Comment thread python/ray/tune/result_grid.py Outdated
Signed-off-by: Kai Fricke <kai@anyscale.com>
@krfricke
krfricke merged commit fe730c5 into ray-project:master Mar 24, 2023
@krfricke
krfricke deleted the tune/results-properties branch March 24, 2023 06:51
elliottower pushed a commit to elliottower/ray that referenced this pull request Apr 22, 2023
…t#33410)

Following ray-project#33370, this PR adds `Result.path` and `ResultGrid.experiment_path` to the respective classes. Further, we remove the public facing `ExperimentAnalysis.local_path` and `ExperimentAnalysis.remote_path` in favor of a unified `ExperimentAnalysis.experiment_path`.

Signed-off-by: Kai Fricke <kai@anyscale.com>
Signed-off-by: elliottower <elliot@elliottower.com>
ProjectsByJackHe pushed a commit to ProjectsByJackHe/ray that referenced this pull request May 4, 2023
…t#33410)

Following ray-project#33370, this PR adds `Result.path` and `ResultGrid.experiment_path` to the respective classes. Further, we remove the public facing `ExperimentAnalysis.local_path` and `ExperimentAnalysis.remote_path` in favor of a unified `ExperimentAnalysis.experiment_path`.

Signed-off-by: Kai Fricke <kai@anyscale.com>
Signed-off-by: Jack He <jackhe2345@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants