-
Notifications
You must be signed in to change notification settings - Fork 834
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
Can we customize the outputs format of Model? #565
Comments
I think this would come under the area of allowing arbitrary JSON in the input and output for which there is an existing issues: #434 which is slated for the next release. |
That is what I want to do. The formats of inputs and outputs can get more user-friendly. The current formats seems sklearn-friendly. |
We plan to provide arbitrary JSON input and output in a field, e.g. |
I think so, as long as we can use a flexible format with arbitrary JSON. I don't stock to have a fixed format. Customizable input and output are more convenient. |
I want to know more detail about the specification of #434 . And I would be glad to join the discussion. Please keep me in the loop. |
Close as duplicate of #434 |
* Fix static image uris * further static fix for readthedocs
Motivation
When we want to return multiple values with
Model
, we can format the outputs and label them withclass_names
. The order of returned values should be kept. Consider if we want to modify the returned value. The order of existing names should be remained.Otherwise, I would like to know a better way to return multiple values.
tags
method can look good. But, I am not sure.I would like to customize the outputs format, since the current spec of outputs format is not useful from the requesters' point of view. Is there any way to customize that?
Current spec
Format I want
I would like to format the output as below. Expressing the returned values as a map would be much better flexible, even when we put additional values to the returned values. I understand the duplicated labels that are
class
andprobability
in the below case can increase the data size of returned value. In my opinion, it doesn't matter, since we usually request to the API with a data point. The duplication is not significant.The text was updated successfully, but these errors were encountered: