Data Input format other than ndarray to predict function

70 views
Skip to first unread message

rishikesh bansod

unread,
Mar 28, 2018, 8:41:04 AM3/28/18
to Seldon Users
Hi,
       As shown in link while defining model in seldon-core https://github.com/cliveseldon/seldon-core/blob/s2i/wrappers/s2i/python/test/model-template-app/MyModel.py . We need to pass X as  ndarray to predict function. But If my data is in json format then how can I pass it?
       Also what is difference/advantage of passing data with/without tensor as shown in link https://github.com/SeldonIO/seldon-core/blob/master/docs/reference/internal-api.md


Thanks,
Rishikesh

Clive Cox

unread,
Mar 28, 2018, 8:50:19 AM3/28/18
to rishikesh bansod, Seldon Users
Hi,

 If you are using the wrappers we provide then they will pass X as a numpy array having converted from JSON or protobuf incoming data.
 Tensor is good for pure float data, ndarray for ease of use in JSON/REST scenarios and for multi-type data.


--
You received this message because you are subscribed to the Google Groups "Seldon Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to seldon-users+unsubscribe@googlegroups.com.
To post to this group, send email to seldon...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/seldon-users/22ca5f59-3684-4665-a3f8-c29affcdafc3%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages