hummingbird icon indicating copy to clipboard operation
hummingbird copied to clipboard

Document and write examples for working with our hb model containers (wrappers)

Open ksaur opened this issue 4 years ago • 1 comments

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.

ksaur avatar Nov 30 '20 23:11 ksaur

Yes documentation on the container topic is quite lagging.

interesaaat avatar Nov 30 '20 23:11 interesaaat