Wrong error for loading ONNX models
See original GitHub issueDescription I am trying to load the ONNX model and use the next type of config. It has the wrong type of input:
platform: "onnxruntime_onnx"
max_batch_size: 1000
input [
{
name: "users"
data_type: TYPE_FP32
dims: [-1]
}
]
output [
{
name: "output"
data_type: TYPE_FP32
dims: [-1]
}
]
The error I get:
UNAVAILABLE: Invalid argument: unable to load model 'recommendation, unexpected datatype INT64 for input 'users', expecting TYPE_FP32
As you might have noticed, TYPE_FP32
is the type I initially had. And when I change the type to TYPE_INT64
, everything works smoothly.
I’ve looked into code but couldn’t find where exactly this logging happens, so I am creating an issue instead of a PR.
Triton Information
docker run --rm -p8000:8000 -p8001:8001 -p8002:8002 -v $PWD:/models nvcr.io/nvidia/tritonserver:21.02-py3 tritonserver --model-repository=/models --model-control-mode=poll --repository-poll-secs=30
To Reproduce Try using some ONNX model of yours with the wrong data type on input or output. What you will see is a confusing error message.
Expected behavior
I expected the logger to return awaited type as expected
and the current type as unexpected
.
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (3 by maintainers)
Top GitHub Comments
The validation is checking the model against the model config, so I guess the error message is intended to be
unexpected datatype INT64 for input 'users', [model config] expects TYPE_FP32
. I think changing to that will clarify the confusion as in other places, it was called out that what is expected by the model config.@Raduan77 Yes the ORT backend is in a separate Github repository as you discovered, do you want to create a PR to improve the error message? Otherwise I can do that.
Yes the error reported by the backend is incorrect. It should be: unable to load model ‘recommendation’, unexpected datatype TYPE_FP32 for input ‘users’, expecting TYPE_INT64 @GuanLuo could you fix the same? The expecting datatype should be what the model expects and not what the model configuration specifies.