hummingbird
hummingbird copied to clipboard
Document and write examples for working with our hb model containers (wrappers)
In working on #226 , I tried to run some of the user-code:
onnx_ml_model = convert_xgboost(model, initial_types=initial_types, target_opset=9)
onnx_model = convert(onnx_ml_model, "onnx", X)
session = ort.InferenceSession(onnx_model.SerializeToString())
which, with our latest updates (since that issue was posted) gives:
E AttributeError: 'ONNXSklearnContainerClassification' object has no attribute 'SerializeToString'
To fix this, we need to access the model with .model
:
session = ort.InferenceSession(onnx_model.model.SerializeToString())
This is fine, but we need to add this to the documentation to not confuse users.
Yes documentation on the container topic is quite lagging.