Closed
Description
Failing Example
Iris Keras
Description
On line 117 of onnx_serve/api.py
:
np_arr = np_arr.reshape(target_shape)
target_shape
is
['None', 4]
Which causes this error:
2019-09-02,21:50:21.785453:cortex:ERROR:prediction failed
Traceback (most recent call last):
File "/src/cortex/onnx_serve/api.py", line 117, in transform_to_numpy
np_arr = np_arr.reshape(target_shape)
TypeError: 'str' object cannot be interpreted as an integer
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/src/cortex/onnx_serve/api.py", line 188, in predict
inference_input = convert_to_onnx_input(prepared_sample, input_metadata)
File "/src/cortex/onnx_serve/api.py", line 131, in convert_to_onnx_input
sample[input_metadata.name], input_metadata
File "/src/cortex/onnx_serve/api.py", line 120, in transform_to_numpy
raise UserException("failed to convert to numpy array", str(e)) from e
cortex.lib.exceptions.UserException: error: failed to convert to numpy array: 'str' object cannot be interpreted as an integer
2019-09-02,21:50:21.785873:cortex:ERROR:prediction failed: error: failed to convert to numpy array: 'str' object cannot be interpreted as an integer