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] Rename overwrite_trainable argument in Tuner restore to trainable #32059

Merged

Conversation

justinvyu
Copy link
Contributor

Why are these changes needed?

This deprecates the overwrite_trainable param and renames it to trainable, moving toward the goal state of looking like Tuner.restore(path, trainable=trainable, param_space=param_space). This also emits a warning if a trainable is not specified, as this will become a required argument starting in 2.5.

Context

The reason why trainable will become a required argument:

  1. User has access to their trainable, since restore will not be running independently but alongside the original script.
  2. There is currently special case warnings for with_parameters needing the trainable to be re-specified. Always requiring this argument would just simplify what the user needs to think about (when is it required, when is it not?).
  3. There are other cases where the trainable could hold object references that we don't catch. Requiring the parameter would prevent users from falling into this and getting confused by the errors.

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

@krfricke
Copy link
Contributor

krfricke commented Feb 1, 2023

Looks like test_restore_with_new_trainer is failing: https://buildkite.com/ray-project/oss-ci-build-pr/builds/10783#0186043e-33ae-48dd-bf41-517d33b1e808

@justinvyu
Copy link
Contributor Author

Fixed the test assertion to check for all warnings. Will ping again when tests are passing!

@gjoliver gjoliver merged commit 59f72cf into ray-project:master Feb 1, 2023
edoakes pushed a commit to edoakes/ray that referenced this pull request Mar 22, 2023
…inable` (ray-project#32059)

* Add trainable and deprecate overwrite_trainable

Signed-off-by: Justin Yu <[email protected]>
Signed-off-by: Edward Oakes <[email protected]>
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.

3 participants