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 RunConfig deprecation message in Tune being emitted in trainer.fit usage #51198

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

justinvyu
Copy link
Contributor

Summary

Train V1 creates a Tuner when calling trainer.fit(). The Trainer instance passes its own ray.train.RunConfig to Tune, which now emits a deprecation warning message about how the Tuner should take in a ray.tune.RunConfig. This warning should not be emitted in this case.

Signed-off-by: Justin Yu <[email protected]>
Signed-off-by: Justin Yu <[email protected]>
Comment on lines +140 to +142
if self._entrypoint == AirEntrypoint.TUNER and not isinstance(
self._run_config, ray.tune.RunConfig
):
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I did this instead of "casting" ray.train.RunConfig -> ray.tune.RunConfig because doing that would still emit the warning on the restoration flow and it was complicated to fix the problem for that case too. Adding this entrypoint condition + moving it to the "start from scratch" codepath solves the problem.

@justinvyu justinvyu removed their assignment Mar 9, 2025
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.

2 participants