-
Notifications
You must be signed in to change notification settings - Fork 6k
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] Add to_object_ref
methods to ReplicaResult
#48544
[serve] Add to_object_ref
methods to ReplicaResult
#48544
Conversation
…es/to-obj-ref-validation
|
||
@_process_response | ||
async def get_async(self): | ||
assert ( | ||
self._obj_ref is not None or not self._is_streaming | ||
), "get_async() can only be called on a non-streaming ActorReplicaResult" | ||
not self._is_streaming |
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.
Do we need these assertion statements if they are all going to be caught in to_object_ref
and to_object_ref_async
?
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.
probably not, but being explicit doesn't hurt
Co-authored-by: Cindy Zhang <cindyzyx9@gmail.com> Signed-off-by: Edward Oakes <ed.nmi.oakes@gmail.com>
…8544) Formalizes the interface for these methods since non-actor `ReplicaResult` implementations like `LocalReplicaResult` won't implement them and need to explicitly raise a good error message when they occur. --------- Signed-off-by: Edward Oakes <ed.nmi.oakes@gmail.com> Co-authored-by: Cindy Zhang <cindyzyx9@gmail.com>
…8544) Formalizes the interface for these methods since non-actor `ReplicaResult` implementations like `LocalReplicaResult` won't implement them and need to explicitly raise a good error message when they occur. --------- Signed-off-by: Edward Oakes <ed.nmi.oakes@gmail.com> Co-authored-by: Cindy Zhang <cindyzyx9@gmail.com>
…8544) Formalizes the interface for these methods since non-actor `ReplicaResult` implementations like `LocalReplicaResult` won't implement them and need to explicitly raise a good error message when they occur. --------- Signed-off-by: Edward Oakes <ed.nmi.oakes@gmail.com> Co-authored-by: Cindy Zhang <cindyzyx9@gmail.com> Signed-off-by: mohitjain2504 <mohit.jain@dream11.com>
Why are these changes needed?
Formalizes the interface for these methods since non-actor
ReplicaResult
implementations likeLocalReplicaResult
won't implement them and need to explicitly raise a good error message when they occur.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.