server
server copied to clipboard
Load a new pytorch model but get an error: configuration expects 0 inputs, model provides 2
Description
Hello, I want to load a new pytorch(torchScript) model by using Model Control Mode EXPLICIT, and define the config as:
config = { "name": "test_load_model", "platform": "pytorch_libtorch", "inputs": [ { "name": "input__0", "datatype": "FP32", "shape": [6, 12, 2] }, { "name": "input__1", "datatype": "FP32", "shape": [6, 6, 1] } ], "outputs": [{ "name": "output__0", "datatype": "FP32", "shape": [6, 6] } ], "instance_group": { "count": 1, "kind": "KIND_CPU" } }
But I get an error info: tritonclient.utils.InferenceServerException: load failed for model 'test_load_model': version 1: Invalid argument: unable to load model 'test_load_model', configuration expects 0 inputs, model provides 2;
Triton Information triton-server 22.07
How can i solve this problem?
cc @tanmayv25
@ethanyys Sorry for missing this issue. @krishung5 This should be fixed by your config override fix right?
Yes, this should be fixed in our 22.09 release. @ethanyys The reason why it's not working should have something to do with the format of the configuration. For example, the data type fields in your config should be changed to "data_type": "TYPE_FP32". For the correct config, please refer to this section. If you use Triton 22.09 or later versions, you can see some error messages for the wrong configuration in the server log which may help with modifying the config override.