python_backend
python_backend copied to clipboard
fix: Add enumeration for tensor data type
Trying to do print(repr(request.inputs()[0].triton_dtype())) throws the following exception:
tritonclient.utils.InferenceServerException: [StatusCode.INTERNAL] Failed to process the request(s) for model 'example', message: TypeError: Unable to convert function return value to a Python type! The signature was
(self: c_python_backend_utils.Tensor) -> TRITONSERVER_datatype_enum
With this change you get something like <TritonDtype.TYPE_FP32: 11>.