-
Notifications
You must be signed in to change notification settings - Fork 5
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
draft code with function signature and serialization, as reference as needed #522
base: master
Are you sure you want to change the base?
Conversation
…d stream in grpc servicer
------------------------------------------ | ||
|
||
|
||
def f(prompt: str, texts: List[str], images: List[Image]) -> Output(output=str): |
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.
what would an iterator look like to handle more than just the unary-unary case?
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.
is that what method_type is for? I see it being an int here, in a constant as UNARY_UNARY which matches some of the protos and the 'predict' in another spot.
@@ -0,0 +1,344 @@ | |||
import re |
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'm not sure I understand the difference betwee v1 and v2 without reading through everything
This is some code I came up with for (a) data serializers based on type, and (b) method signatures that can be used to align data fields with arguments. They are each independently up and running, but not put together. Note: there are different files, which I named using v1 and v2, for my two attempts at possible approaches so far. They aren't pieced together yet and neither one handles everything.
I also think they are too fancy, and might be difficult to maintain. Serializing using the runtime types (and checking the inspect arg types just for final casting the inputs), as is now done in #516 will be a simpler approach, particularly to start.
However, there are some cases where extracting a signature could make sense: