I had the problem:
TypeError: Object of type InferenceRequest is not JSON serializable
with code similar to this:
request = PandasCodec.encode_request(data)
endpoint = ""
response = requests.post(endpoint, json=request)
Since the requests library doesn't know how to serialise an InferenceRequest object, it is needed to convert it to a dict, which is the expected value of the json kwarg on requests.post. We can do this with request.dict().
It would be useful if we can document it better on this page:
https://mlserver.readthedocs.io/en/latest/user-guide/content-type.html
because I think the problem with input data / codecs is a big blocker for many people that want to try mlserver.
I had the problem:
TypeError: Object of type InferenceRequest is not JSON serializablewith code similar to this:
Since the requests library doesn't know how to serialise an InferenceRequest object, it is needed to convert it to a dict, which is the expected value of the json kwarg on
requests.post. We can do this withrequest.dict().It would be useful if we can document it better on this page:
https://mlserver.readthedocs.io/en/latest/user-guide/content-type.html
because I think the problem with input data / codecs is a big blocker for many people that want to try mlserver.