-
Notifications
You must be signed in to change notification settings - Fork 870
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
Custom handler request data #529
Comments
@bigswede74: The multiple request data is already supplied to the custom handler as a key-value pair in the Consider the following example which just dumps the raw binary data of the inputs sent in the request
|
eisen deploy might have what you need. you can pass whatever and receive whatever using torch serve. Moreover, you can get some metadata from the model, giving you info about what the model expects in terms of input keys, types and shape. Of course it all uses torch serve with a custom handler |
I'm using curl POST upload two images, and running handle function in torch serve. I found POST requests cost a large part of time.Input image size is 640*400 RGB channels. The model handle in serve cost about 600ms, but upload POST form cost 4s!I confused if it's the bug of pytorch serve of not. |
@buqing2009: Could you please share the output of your e.g.
Also, share the |
the output of time curl:
the access_log: |
i removed the batch_size=2&max_batch_delay=5000, it works now. |
The delay is because of the In your case, it will wait for either 2 (batch_size) inference requests or for 5 seconds (max_batch_delay) [whichever is earlier]. |
Cheers. |
@harshbafna Hi, Bafna. I have read the comments above and issues which mentioned this issue. |
Is there a mechanism to pass more than just the http request body to a custom handler? Currently the data is a dictionary with a single element containing the request body. I have the need to access more request data, the query string would suffice for my purposes.
Potential solution would be to pass the full request to the custom handler.
The text was updated successfully, but these errors were encountered: