-
Notifications
You must be signed in to change notification settings - Fork 5.8k
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] Deprecate passing DeploymentResponse to handle #46806
Conversation
Signed-off-by: Cindy Zhang <cindyzyx9@gmail.com>
@@ -449,6 +449,13 @@ async def _resolve_deployment_responses( | |||
) | |||
elif isinstance(obj, DeploymentResponse): | |||
responses.append(obj) | |||
if obj not in request_args and obj not in request_kwargs.values(): |
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 assume you've tested that this check works and we don't spuriously print?
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.
Yup, this will only print for deployment response objects that weren't passed in as top level args/kwargs.
8e727cc
to
8e3aaa7
Compare
Why are these changes needed?
Deprecate passing a deployment response to a handle by reference (docs).
Supporting this requires using pyobjscanner to recursively process and pickle dump all args, which adds to the latency especially for large payloads.
Related issue number
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.