Additional ONNX Converters#

This packages implements or rewrites some of the existing converters. They can be registered and uses by sklearn-onnx by using the following function:

mlprodict.onnx_conv.register_converters (exc = True)

This functions registers additional converters to the list of converters sklearn-onnx declares.

mlprodict.onnx_conv.register_rewritten_operators (new_converters = None, new_shape_calculators = None)

Registers modified operators and returns the old values.

mlprodict.onnx_conv.to_onnx (model, X = None, name = None, initial_types = None, target_opset = None, options = None, rewrite_ops = False, white_op = None, black_op = None, final_types = None, rename_strategy = None, verbose = 0)

Converts a model using on sklearn-onnx.

LightGBM#

Converters for package lightgbm.

mlprodict.onnx_conv.operator_converters.conv_lightgbm.convert_lightgbm (scope, operator, container)

This converters reuses the code from LightGbm.py and makes some modifications. It implements converters for models in lightgbm.

scikit-learn#

A couple of custom converters were written to test scenarios not necessarily part of the official ONNX specifications.

mlprodict.onnx_conv.sklconv.tree_converters.new_convert_sklearn_decision_tree_classifier (scope, operator, container)

Rewrites the converters implemented in sklearn-onnx to support an operator supporting doubles.

mlprodict.onnx_conv.sklconv.tree_converters.new_convert_sklearn_decision_tree_regressor (scope, operator, container)

Rewrites the converters implemented in sklearn-onnx to support an operator supporting doubles.

mlprodict.onnx_conv.sklconv.tree_converters.new_convert_sklearn_gradient_boosting_classifier (scope, operator, container)

Rewrites the converters implemented in sklearn-onnx to support an operator supporting doubles.

mlprodict.onnx_conv.sklconv.tree_converters.new_convert_sklearn_gradient_boosting_regressor (scope, operator, container)

Rewrites the converters implemented in sklearn-onnx to support an operator supporting doubles.

mlprodict.onnx_conv.sklconv.svm_converters.new_convert_sklearn_random_forest_classifier

mlprodict.onnx_conv.sklconv.svm_converters.new_convert_sklearn_random_forest_regressor

SVM#

mlprodict.onnx_conv.sklconv.svm_converters.new_convert_sklearn_svm_classifier (scope, operator, container)

Rewrites the converters implemented in sklearn-onnx to support an operator supporting doubles.

mlprodict.onnx_conv.sklconv.svm_converters.new_convert_sklearn_svm_regressor (scope, operator, container)

Rewrites the converters implemented in sklearn-onnx to support an operator supporting doubles.

XGBoost#

Converters for package xgboost.

mlprodict.onnx_conv.operator_converters.conv_xgboost.convert_xgboost (scope, operator, container)

This converters reuses the code from XGBoost.py and makes some modifications. It implements converters for models in xgboost.