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
- Transfer Learning with ONNX
- Using converters from other libraries
- A custom converter for a custom model
- Extend ONNX, extend runtime
- Advanced scenarios
- Write converters for other libraries
The tutorial was tested with following version:
<<<
import numpy
import scipy
import sklearn
import lightgbm
import onnx
import onnxmltools
import onnxruntime
import xgboost
import skl2onnx
import mlprodict
import pyquickhelper
mods = [numpy, scipy, sklearn, lightgbm, xgboost,
onnx, onnxmltools, onnxruntime,
skl2onnx, mlprodict, pyquickhelper]
mods = [(m.__name__, m.__version__) for m in mods]
mx = max(len(_[0]) for _ in mods) + 1
for name, vers in sorted(mods):
print("%s%s%s" % (name, " " * (mx - len(name)), vers))
>>>
lightgbm 3.3.4
mlprodict 0.9.1887
numpy 1.23.5
onnx 1.14.0
onnxmltools 1.11.2
onnxruntime 1.15.0+cpu
pyquickhelper 1.11.3776
scipy 1.10.0
skl2onnx 1.14.0
sklearn 1.3.dev0
xgboost 1.7.3