You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is possibly semi-related to #1625, but I'm submitting this as a separate issue because I think there is an additional issue that is specific to the docs and won't be solved with a solution to #1625.
I will fork and make a PR for fixing this, since it's just documentation-related, but I do think that PR should be conditional on #1625 also being closed as complete.
The tabs below it show the encoding for that payload, but neither one actually produces a "correct" encoding for that data that would be acceptable to e.g. a scikit-learn model without input modifications.
The "shape": [3] present in all three of those inputs is not the correct encoding of that DataFrame. While it does have 3 columns, the shape for each of the inputs should be at least the number of rows in the DataFrame. This is actually mentioned in the last bullet point above the example dataframe on that very page:
The shape field of each input (or output) entry will contain (at least)
the amount of rows included in the dataframe.
But if we actually run this code and get the output of that request, we see it doesn't match either of the JSON Payloads above. inference_request.dict() yields a dictionary that looks like this:
This is possibly semi-related to #1625, but I'm submitting this as a separate issue because I think there is an additional issue that is specific to the docs and won't be solved with a solution to #1625.
I will fork and make a PR for fixing this, since it's just documentation-related, but I do think that PR should be conditional on #1625 also being closed as complete.
The Pandas DataFrame section of the Codec docs provides an example DataFrame for encoding to the V2 inference protocol:
The tabs below it show the encoding for that payload, but neither one actually produces a "correct" encoding for that data that would be acceptable to e.g. a scikit-learn model without input modifications.
JSON Payload error
The JSON encoding provided is:
The
"shape": [3]
present in all three of those inputs is not the correct encoding of that DataFrame. While it does have 3 columns, the shape for each of the inputs should be at least the number of rows in the DataFrame. This is actually mentioned in the last bullet point above the example dataframe on that very page:So the true JSON encoding should be:
Pandas Request Codec Payload Error
The output of the Pandas Request Codec is also incorrect, as mentioned in #1625.
The following code snippet is presented:
But if we actually run this code and get the output of that request, we see it doesn't match either of the JSON Payloads above.
inference_request.dict()
yields a dictionary that looks like this:But, again, it would seem like the proper serialization here should probably be
"shape": [4]
, not[4, 1]
.The text was updated successfully, but these errors were encountered: