Open mfueller opened 8 months ago
I have also had this issue, and it's unclear from the docs if this is intended or not. There is a disclaimer about this in the Numpy Array section of the docs, but it is not present in the Pandas DataFrame section just after it, and the presented JSON Payload has other errors that make it unreliable for determining what the correct value should be (I have an MR out for that docs change at #1679)
We've merged in a contribution in https://github.com/SeldonIO/MLServer/pull/1751 that should fix this. If you're able to use MLServer from master
to get the latest change, could you please let us know if it fixes the issue for you.
We've merged in a contribution in #1751 that should fix this. If you're able to use MLServer from
master
to get the latest change, could you please let us know if it fixes the issue for you.
@jesse-c I just had a chance to test this with the new changes. TL;DR is that this works! But not quite in the way I expected it to, and I didn't think it would when I first serialized the new request.
This change is a welcome one for sure, since it removes the need for those workaround lines in code that might have to handle multiple request types! But I wasn't sure it was going to work when I noticed that my requests looked the same as they did before, so that might be beneficial to mention in release notes somewhere.
Thank you for this!
Hi!
My goal is to serve a mlflow model with a signature via mlserver and observed some issue with the signature enforcement and the request generated by
PandasCodec
.I followed the example from https://mlserver.readthedocs.io/en/latest/examples/mlflow/README.html
The model signature in the example is inferred by
and logged to mlflow via:
model serving is done with mlserver
I can test the inference via the given plain json example
However, if I create the inference request using
PandasCodec
like thisI get the following error response:
and mlserver shows the following stack trace:
I had a look on the difference between the plain json schema and the resulting
PandasCodec
schema. It seems that theshape
attribute for the input is different:plain json example
PandasCodec
resultThe
shape
is[1]
in the plain json example and[1,1]
in the resultingPandasCodec
request.I fixed the shape information and tested it successfully with:
Version Infos:
Is there any issue in the generated
shape
information generated byPandasCodec
or have I missed something?Thanks a lot for any help!