[tune] Fix resume="AUTO"
compatibility with the new ResumeConfig
implementation
#43179
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 validResumeConfig
. For example,resume="AUTO+ERRORED" --> ResumeConfig(errored=RESUME)
.The bug:
resume="AUTO"
should map toResumeConfig()
, 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 changeThis 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 astune.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
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.