Skip to content
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

Fix JSON output format #281

Merged
merged 1 commit into from
Apr 20, 2022
Merged

Fix JSON output format #281

merged 1 commit into from
Apr 20, 2022

Conversation

dewan-c
Copy link
Contributor

@dewan-c dewan-c commented Apr 20, 2022

Description

We recently enabled prediction response in JSON(accept=application/json), for algorithm mode, but the output doesn't match expected format in our documentation. This PR updates the output format.

existing output sample: b'[0.43861907720565796, 0.4533972144126892, 0.06351257115602493]'
new output sample: b'{"predictions": [{"score": 0.43861907720565796}, {"score": 0.4533972144126892}, {"score": 0.06351257115602493}]}'

Note that this doesn't include output format update for json format.

The change in tox.ini is needed for me to run unit tests locally(Mac). Without specific dependency versions mlio doesn't properly load.

Testing

Unit tests

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@dewan-c dewan-c merged commit fc5a8ed into 1.2-2 Apr 20, 2022
@dewan-c dewan-c deleted the fix_json_out_1_2 branch April 20, 2022 21:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants