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] Remove checkpoint_dir and reporter deprecation notices #42698

Merged

Conversation

justinvyu
Copy link
Contributor

Why are these changes needed?

These were hard-deprecated in #39093. The _detect_checkpoint_function and _detect_reporter methods are incorrectly flagging some cases, which would throw this DeprecationWarning when it should not. Those APIs are long outdated, so the fix is just to remove all of this extra logic.

Example:

from ray import tune

kwargs = {"kwarg1": 1, "kwarg2": 2}


def train_fn(config, **trainable_kwargs):
    print(config, trainable_kwargs)


tune.Tuner(tune.with_parameters(train_fn, **kwargs)).fit()

Related issue number

Closes #41562

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>
Copy link
Contributor

@matthewdeng matthewdeng left a comment

Choose a reason for hiding this comment

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


via NFL on GIPHY

Signed-off-by: Justin Yu <justinvyu@anyscale.com>
@justinvyu justinvyu merged commit e22b4dc into ray-project:master Jan 26, 2024
9 checks passed
@justinvyu justinvyu deleted the remove_checkpoint_dir_deprecation branch January 26, 2024 02:42
khluu pushed a commit that referenced this pull request Jan 27, 2024
…2698)

These APIs were hard-deprecated in Ray 2.7, and the utility functions to detect them are incorrectly flagging some cases, causing users to run into DeprecationWarning errors when they shouldn't. This PR removes the deprecated APIs and these unnecessary checks.

---------

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

[Ray Tune] train_fn without checkpoint_dir kwarg raises a false deprecation warning
2 participants