I'm trying to convert a SageMaker XGBoost model to ONNX, in order to use the ONNX model in .Net application using ML.NET. I've tried to convert the model using winmltools
and onnxmltools
but both tools are returned similar error.
There is a good resource to use machine learning in business area. I've tried Using Machine Learning to Improve Sales in SageMaker to create the model and then convert the model to ONNX model. The example is working well in SageMaker.
After running the example, I got a model and the type of the model is sagemaker.estimator.Estimator
. I've tried to convert the model by using winmltools
and onnxmltools
. But both are returned same error.
ValueError: No proper operator name found for '<class 'sagemaker.estimator.Estimator'>'
I've tried to follow Convert ML models to ONNX with WinMLTools and ONNXMLTools enables conversion of models to ONNX to convert the SageMaker model to ONNX model.
After that, I used xgb.create_model()
command to create SageMaker model. Then used the tools to convert the model to ONNX. but no luck. I got same error this time. Just the model is different.
ValueError: No proper operator name found for '<class 'sagemaker.model.Model'>'
Then I load the model using pickle
and tried to convert the model. I got same error, just the model is different.
ValueError: No proper operator name found for '<class 'xgboost.core.Booster'>'
At this moment, I have no idea about the issues. How should I solve the issues. I've attached the Improve Sales Classification to ONNX notebook file for reference. Could you please take a look at the issues and let me know a way to solve the issues? Thanks in advance!