python_backend icon indicating copy to clipboard operation
python_backend copied to clipboard

fix: Add enumeration for tensor data type

Open larmoreg opened this issue 1 year ago • 0 comments

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>.

larmoreg avatar Oct 04 '24 20:10 larmoreg