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] Fix resume="AUTO" compatibility with the new ResumeConfig implementation #43179

Merged
merged 7 commits into from Feb 15, 2024

Conversation

justinvyu
Copy link
Contributor

@justinvyu justinvyu commented Feb 14, 2024

Why are these changes needed?

#42853 updated the internal implementation to be centered around ResumeConfig, and the other resume options are now translated to a valid ResumeConfig. For example, resume="AUTO+ERRORED" --> ResumeConfig(errored=RESUME).

The bug: resume="AUTO" should map to ResumeConfig(), but it was not being handled properly by the adapter code. This PR fixes that issue and also adds a test so that CI will catch issues in the future.

resume=True behavior change

This bug also highlights a slight behavior change of resume=True. Prior to the PR mentioned above, this configuration would raise an error if no previous experiment was found at {storage_path}/{name}. Now, tune.run(resume=True) behaves the same as tune.run(resume="AUTO") and will start a new run if a previous one is not found.

Tuner.restore(...) is not impacted in the same way, because that API is explicit and will raise an error immediately if the experiment checkpoint is not found.

Related issue number

Closes #43160

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: 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>
@justinvyu justinvyu merged commit 29a924d into ray-project:master Feb 15, 2024
9 checks passed
@justinvyu justinvyu deleted the tune_restore_bug branch February 15, 2024 23:31
kevin85421 pushed a commit to kevin85421/ray that referenced this pull request Feb 17, 2024
…implementation (ray-project#43179)

Fixes an issue where `resume="AUTO"` should map to `ResumeConfig()` but was not being handled properly by the API adapter code. Adds a test so that CI will catch these issues in the future.

---------

Signed-off-by: Justin Yu <justinvyu@anyscale.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.

Release test tune_cloud_durable_upload.aws failed
2 participants