I have a scikit-learn pipeline for heart disease prediction. I am successful in converting the same to ONNX representation.
I am unable to load this model for inference because of the following error: Fail: [ONNXRuntimeError] : 1 : FAIL : Load model from ./pipeline_xgboost.onnx failed:Node (LabelEncoder2) Op (LabelEncoder) [ShapeInferenceError] Input type is not int64 tensor but keys_int64s is set.
input_types = [
('age', FloatTensorType(shape=[None, 1])), #could not parse age as int
('sex', Int64TensorType(shape=[None, 1])),
('cp', Int64TensorType(shape=[None, 1])),
('trestbps', Int64TensorType(shape=[None, 1])),
('chol', Int64TensorType(shape=[None, 1])),
('fbs', Int64TensorType(shape=[None, 1])),
('restecg', Int64TensorType(shape=[None, 1])),
('thalach', Int64TensorType(shape=[None, 1])),
('exang', Int64TensorType(shape=[None, 1])),
('oldpeak', FloatTensorType(shape=[None, 1])),
('slope', Int64TensorType(shape=[None, 1])),
('ca', Int64TensorType(shape=[None, 1])),
('thal', StringTensorType(shape=[None, 1]))]