TutorialΒΆ
The tutorial goes from a simple example which converts a pipeline to a more complex example involving operator not actually implemented in ONNX operators or ONNX ML operators.
- The easy case
- Train and deploy a scikit-learn pipeline
- Benchmark ONNX conversion
- What is the opset number?
- One model, many possible conversions with options
- Choose appropriate output of a classifier
- Black list operators when converting
- Issues when switching to float
- Intermediate results and investigation
- Store arrays in one onnx graph
- Dataframe as an input
- Modify the ONNX graph
- Using converters from other libraries
- A custom converter for a custom model
- Advanced scenarios
- Write converters for other libraries
The tutorial was tested with following version:
<<<
try: import catboost except Exception as e: print("Unable to import catboost due to", e) catboost = None import numpy import scipy import sklearn import lightgbm import onnx import onnxmltools import onnxruntime import xgboost import skl2onnx mods = [ numpy, scipy, sklearn, lightgbm, xgboost, catboost, onnx, onnxmltools, onnxruntime, skl2onnx, ] mods = [(m.__name__, m.__version__) for m in mods if m is not None] mx = max(len(_[0]) for _ in mods) + 1 for name, vers in sorted(mods): print("%s%s%s" % (name, " " * (mx - len(name)), vers))
>>>
catboost 1.2.8 lightgbm 4.6.0 numpy 2.3.1 onnx 1.19.0 onnxmltools 1.14.0 onnxruntime 1.23.0 scipy 1.15.2 skl2onnx 1.19.1 sklearn 1.7.1 xgboost 3.0.2