-
Notifications
You must be signed in to change notification settings - Fork 835
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
Sending an object dtype array as the request JSON for a Model API #461
Comments
You can send mix typed data with the ndarray payload: seldon-core/proto/prediction.proto Line 29 in a4013f6
A JSON payload for this would be for example
|
Thanks for the speedy response. Based on above, I tried to issue the following curl command
and I get the following error:
A more detailed log can be seen here. Any ideas on how to troubleshoot? |
When converting to a numpy array automatically its type is <U21 (unicode 21 chars). |
Thanks for the tip @cliveseldon . I have this working now. Basically had to modify the predict function to cast
PS: thanks for giving the community this awesome toolkit for model deployment! 👍 |
Glad its working. Keep us updated on how you're using Seldon Core. |
I am building an sklearn pipeline that involves some pre-processing (specifically one-hot-encoding categorical variables and scaling numeric variables) which then gets forwarded to a classifier. I have provided the pipeline below (inspired by this blog):
I am saving the trained model and then using that to create a Docker image to be deployed using s2i based on the model template app (link). I am able to successfully build the image and have it run locally.
Now I am trying to test by sending in a curl request to a predict endpoint. But I am not sure what the input format should be like. An example input to the model is an array like so:
All examples seemed to point to the use case were all input array was all numeric. I did not find an example where we can send this mixed object type.
Can you please let me know if this is possible in seldon-core or should I always assume that the input has to be numeric. If so, is there a recommended way of deploying this pipeline.
The text was updated successfully, but these errors were encountered: