-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
[air] pyarrow.fs
persistence (14/n): Simplified ExperimentAnalysis
implementation
#38648
[air] pyarrow.fs
persistence (14/n): Simplified ExperimentAnalysis
implementation
#38648
Conversation
Signed-off-by: Justin Yu <justinvyu@anyscale.com>
Signed-off-by: Justin Yu <justinvyu@anyscale.com>
Signed-off-by: Justin Yu <justinvyu@anyscale.com>
Signed-off-by: Justin Yu <justinvyu@anyscale.com>
Signed-off-by: Justin Yu <justinvyu@anyscale.com>
Signed-off-by: Justin Yu <justinvyu@anyscale.com>
Signed-off-by: Justin Yu <justinvyu@anyscale.com>
Signed-off-by: Justin Yu <justinvyu@anyscale.com>
Signed-off-by: Justin Yu <justinvyu@anyscale.com>
Signed-off-by: Justin Yu <justinvyu@anyscale.com>
Signed-off-by: Justin Yu <justinvyu@anyscale.com>
Signed-off-by: Justin Yu <justinvyu@anyscale.com>
Signed-off-by: Justin Yu <justinvyu@anyscale.com>
Signed-off-by: Justin Yu <justinvyu@anyscale.com>
Signed-off-by: Justin Yu <justinvyu@anyscale.com>
Signed-off-by: Justin Yu <justinvyu@anyscale.com>
Signed-off-by: Justin Yu <justinvyu@anyscale.com>
Signed-off-by: Justin Yu <justinvyu@anyscale.com>
Signed-off-by: Justin Yu <justinvyu@anyscale.com>
Signed-off-by: Justin Yu <justinvyu@anyscale.com>
Signed-off-by: Justin Yu <justinvyu@anyscale.com>
Signed-off-by: Justin Yu <justinvyu@anyscale.com>
Signed-off-by: Justin Yu <justinvyu@anyscale.com>
Signed-off-by: Justin Yu <justinvyu@anyscale.com>
…ne.run Signed-off-by: Justin Yu <justinvyu@anyscale.com>
Signed-off-by: Justin Yu <justinvyu@anyscale.com>
Signed-off-by: Justin Yu <justinvyu@anyscale.com>
Signed-off-by: Justin Yu <justinvyu@anyscale.com>
Signed-off-by: Justin Yu <justinvyu@anyscale.com>
@@ -52,6 +64,645 @@ | |||
DEFAULT_FILE_TYPE = "csv" | |||
|
|||
|
|||
@PublicAPI(stability="beta") | |||
class NewExperimentAnalysis: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Most of this class is the same, except the init logic is simplified, we now read the json/csv files from the filesystem directly (instead of downloading), and modified the internal data structures a bit.
Signed-off-by: Justin Yu <justinvyu@anyscale.com>
Signed-off-by: Justin Yu <justinvyu@anyscale.com>
Signed-off-by: Justin Yu <justinvyu@anyscale.com>
…persistence/exp_analysis
Signed-off-by: Justin Yu <justinvyu@anyscale.com>
Signed-off-by: Justin Yu <justinvyu@anyscale.com>
Signed-off-by: Justin Yu <justinvyu@anyscale.com>
…persistence/exp_analysis Signed-off-by: Justin Yu <justinvyu@anyscale.com>
Signed-off-by: Justin Yu <justinvyu@anyscale.com>
Signed-off-by: Justin Yu <justinvyu@anyscale.com>
…persistence/exp_analysis Signed-off-by: Justin Yu <justinvyu@anyscale.com>
location (path on the head node).""" | ||
return self._experiment_analysis.experiment_path |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yup thx! Will use this in the followup PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks very good. I only have minor questions. I'm happy to proceed with this assuming tests pass.
What is the plan to switch from NewExperimentAnalysis to ExperimentAnalysis? This may be a breaking change for libraries that interface with it. Are we going to support the old way longer?
Should we call them ExperimentAnalysis
and LegacyExperimentAnalysis
instead?
assert info["info"] == 4 | ||
|
||
|
||
def test_best_result(ray_start_2_cpus): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This PR removes quite a few tests - is the functionality covered somewhere else? Do we have to migrate this later?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Most of these have been consolidated in the new tests. I've also removed some that were just testing behavior that was passing through from ExperimentAnalysis
.
Plan is to completely remove the old one once all CI has been converted. For API compatibility, let's just add dummy methods for all the old "public" methods raising an error with the new workarounds. We can even re-implement the I'm just keeping the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm approving now pending the changes discussed above as this PR is 95% where it should be.
Signed-off-by: Justin Yu <justinvyu@anyscale.com>
Signed-off-by: Justin Yu <justinvyu@anyscale.com>
…persistence/exp_analysis Signed-off-by: Justin Yu <justinvyu@anyscale.com>
@krfricke Ok to merge. |
…` implementation (ray-project#38648) This PR simplifies the implementation of `ExperimentAnalysis` so that it works in the new codepath. While updating all tests/examples, this will be called `NewExperimentAnalysis`. The main reasons why this couldn't be minimally updated: 1. Previously, the internal (private) data-structures of `ExperimentAnalysis` indexed trial configs, results, and checkpoints with the local path. Tying checkpoints to their local path doesn't really make sense to do anymore, so it was hard to just modify the code in a few places. 2. There were APIs that didn't make so much sense in the new codepath. For example, `get_best_logdir` also returns a local path. 3. ray-project#34461 added support for initializing the `ExperimentAnalysis` from a URI, but this was very tied to the old codepath (using the old `remote_storage` utils). The new implementation handles the remote URI case the same as the local case (just reading files from the `storage_filesystem`). APIs removed: * `get_best_logdir` <- Workaround = `analysis.get_best_trial(...).local_path` * `best_logdir` <- Workaround = `analysis.best_trial.local_path` * `get_trial_checkpoints_paths` <- This was pretty much an internal method, but was public for some reason. Signed-off-by: Justin Yu <justinvyu@anyscale.com> Signed-off-by: e428265 <arvind.chandramouli@lmco.com>
…` implementation (ray-project#38648) This PR simplifies the implementation of `ExperimentAnalysis` so that it works in the new codepath. While updating all tests/examples, this will be called `NewExperimentAnalysis`. The main reasons why this couldn't be minimally updated: 1. Previously, the internal (private) data-structures of `ExperimentAnalysis` indexed trial configs, results, and checkpoints with the local path. Tying checkpoints to their local path doesn't really make sense to do anymore, so it was hard to just modify the code in a few places. 2. There were APIs that didn't make so much sense in the new codepath. For example, `get_best_logdir` also returns a local path. 3. ray-project#34461 added support for initializing the `ExperimentAnalysis` from a URI, but this was very tied to the old codepath (using the old `remote_storage` utils). The new implementation handles the remote URI case the same as the local case (just reading files from the `storage_filesystem`). APIs removed: * `get_best_logdir` <- Workaround = `analysis.get_best_trial(...).local_path` * `best_logdir` <- Workaround = `analysis.best_trial.local_path` * `get_trial_checkpoints_paths` <- This was pretty much an internal method, but was public for some reason. Signed-off-by: Justin Yu <justinvyu@anyscale.com> Signed-off-by: Victor <vctr.y.m@example.com>
Why are these changes needed?
This PR simplifies the implementation of
ExperimentAnalysis
so that it works in the new codepath. While updating all tests/examples, this will be calledNewExperimentAnalysis
.The main reasons why this couldn't be minimally updated:
ExperimentAnalysis
indexed trial configs, results, and checkpoints with the local path. Tying checkpoints to their local path doesn't really make sense to do anymore, so it was hard to just modify the code in a few places.get_best_logdir
also returns a local path.tune.ExperimentAnalysis
to pull experiment checkpoint files from the cloud if needed #34461 added support for initializing theExperimentAnalysis
from a URI, but this was very tied to the old codepath (using the oldremote_storage
utils). The new implementation handles the remote URI case the same as the local case (just reading files from thestorage_filesystem
).APIs removed:
get_best_logdir
<- Workaround =analysis.get_best_trial(...).local_path
best_logdir
<- Workaround =analysis.best_trial.local_path
get_trial_checkpoints_paths
<- This was pretty much an internal method, but was public for some reason.Related issue number
Closes #38567
Checks
git commit -s
) in this PR.scripts/format.sh
to lint the changes in this PR.method in Tune, I've added it in
doc/source/tune/api/
under thecorresponding
.rst
file.