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 input shapes #1679

Merged
merged 1 commit into from
Apr 17, 2024
Merged

Conversation

ReveStobinson
Copy link
Contributor

Closes #1678

Fixes JSON Payload input shapes in Pandas DataFrame content type section of User Guide.

For example DataFrame:

A B C
a1 b1 c1
a2 b2 c2
a3 b3 c3
a4 b4 c4

All inputs in JSON payload had "shape": [3] (the number of columns in the DataFrame) instead of "shape": [4] (the number of rows in the DataFrame).

This PR assumes that #1625 is in fact a bug, and that the shape values should not have an extra dimension added to them. If that assumption is incorrect, I would recommend also adding a disclaimer to this section like the one seen in the Numpy Array section before it:

Note

By default, MLServer will always assume that an array with a single-dimensional shape, e.g. [N], is equivalent to [N, 1]. That is, each entry will be treated like a single one-dimensional data point (i.e. instead of a [1, D] array, where the full array is a single D-dimensional data point). To avoid any ambiguity, where possible, the Numpy codec will always explicitly encode [N] arrays as [N, 1].

Fix JSON Payload input shapes in Pandas DataFrame content type section of User Guide.
@sakoush sakoush merged commit 7b79e21 into SeldonIO:master Apr 17, 2024
20 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Docs specify Pandas DataFrame Codec input shapes incorrectly.
2 participants