:orphan: |rss_image| **2021-05 - 1/1** :ref:`Blog ` :ref:`benchmark (4) ` :ref:`onnx (8) ` .. |rss_image| image:: feed-icon-16x16.png :target: ../_downloads/rss.xml :alt: RSS ---- .. index:: 2021-05 .. _ap-month-2021-05-0: 2021-05 - 1/1 +++++++++++++ .. blogpostagg:: :title: Numpy API for ONNX and scikit-learn (part II) :date: 2021-05-05 :keywords: ONNX,API,numpy,scikit-learn :categories: API :rawfile: 2021/2021-05-05_numpyapionnx2.rst This follows blog post :ref:`Numpy API for ONNX and scikit-learn (part I) `. It demonstrated how to insert a custom function in a pipeline and still be able to convert that pipeline into ONNX. This blog post shows how to implement a custom transformer. ... .. blogpostagg:: :title: Numpy API for ONNX and scikit-learn (part I) :date: 2021-05-05 :keywords: ONNX,API,numpy,scikit-learn :categories: API :rawfile: 2021/2021-05-05_numpyapionnx1.rst :epkg:`sklearn-onnx` converts most of the pipelines including numerical preprocessing or predictors but it fails whenever custom code is involved. That covers the use of `FunctionTransformer `_ or a new model inheriting from `BaseEstimator `_. To be successful, the conversion needs a way to convert the custom code into ONNX. The proposed solution here is bypass that complex steps (rewrite a python function with ONNX operators) by directly writing the custom code with ONNX operators. However, even though most of the operator are close to :epkg:`numpy` functions, they are not the same. To avoid spending time looking at them, many :epkg:`numpy` functions were implementing with ONNX operators. The custom function or predictor can then just be implemented with this API to build a unique ONNX graph executed with a runtime. ... ---- |rss_image| **2021-05 - 1/1** :ref:`2021-08 (3) ` :ref:`2022-02 (1) ` :ref:`2022-05 (1) ` :ref:`2022-06 (1) ` :ref:`2022-11 (1) `