-
Notifications
You must be signed in to change notification settings - Fork 6.1k
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
[Serve] Upgrade deprecated calls #31839
[Serve] Upgrade deprecated calls #31839
Conversation
Signed-off-by: Shreyas Krishnaswamy <shrekris@anyscale.com>
Signed-off-by: Shreyas Krishnaswamy <shrekris@anyscale.com>
Signed-off-by: Shreyas Krishnaswamy <shrekris@anyscale.com>
Signed-off-by: Shreyas Krishnaswamy <shrekris@anyscale.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for doing this! One comment related to the Java codepath.
python/ray/serve/controller.py
Outdated
if isinstance(deployer_job_id, bytes): | ||
deployer_job_id = ray.JobID.from_int( | ||
int.from_bytes(deployer_job_id, "little") | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think deployer_job_id
might still be bytes if called from the Java codepath.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great catch! I put the if
statement back in, and I added a comment.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hm, doesn't seem like the Java CI test is triggered... I'm not sure why or how to get it to run 😕
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@sihanwang41 found today that they aren't triggered by Serve code changes (which is a bug). I believe he's filing a PR to fix this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @shrekris-anyscale, do you mind directly adding RAY_CI_JAVA_AFFECTED = 1 in https://github.com/ray-project/ray/blob/master/ci/pipeline/determine_tests_to_run.py#L181 . I am not 100% percent sure it can fix (only based on ci code reading), you can directly help to verify :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice catch! I added it. Let's see if it kicks off the Java test.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like it kicked off the Java test.
Signed-off-by: Shreyas Krishnaswamy <shrekris@anyscale.com>
Signed-off-by: Shreyas Krishnaswamy <shrekris@anyscale.com>
The documentation failure is unrelated: writing output... [100%] workflows/package-refst_data_in_and_outistization_utilse_examplexampleetcorTypey
--
| /ray/doc/source/rllib/rllib-fault-tolerance.rst:68: WARNING: undefined label: tune-two-types-of-ckpt
| generating indices... genindex py-modindex done
| highlighting module code... [100%] tune_sklearn.tune_searcharchestionuhsearchduler_bufferereplay_buffer
| writing additional pages... search done
| copying images... [100%] workflows/trip.pngg.pngnsorboard.pngntal.png_analyze_results_35_1.pngzation_32_0.pngpng
| copying downloadable files... [100%] /python/ray/tune/examples/tune-default.yamlinable.py
| copying static files... done
| copying extra files... done
| dumping search index in English (code: en)... done
| dumping object inventory... done
| build finished with problems, 1 warning.
| sitemap.xml was generated for URL https://docs.ray.io/en/latest/ in /ray/doc/_build/html/sitemap.xml
| make: *** [Makefile:55: html] Error 1
| 🚨 Error: The command exited with status 2 |
@edoakes This change is ready to merge. |
@sihanwang41 FYI this is getting merged including the java CI change |
Why are these changes needed?
Serve uses
ray.get_runtime_context().job_id
andray.get_runtime_context().node_id
, which are deprecated. This raises longRayDeprecationWarning
in the Serve CLI:This change makes Serve use
get_job_id()
andget_node_id()
as recommended. It also updates Serve internals to always treat thejob_id
andnode_id
as a string. This removes the warnings:Related issue number
N/A
Checks
git commit -s
) in this PR.scripts/format.sh
to lint the changes in this PR.