.. _f-onnxnumpycompiler: module ``npy.onnx_numpy_compiler`` ================================== .. inheritance-diagram:: mlprodict.npy.onnx_numpy_compiler Short summary +++++++++++++ module ``mlprodict.npy.onnx_numpy_compiler`` Implements :epkg:`numpy` functions with onnx and a runtime. Classes +++++++ +------------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------+ | class | truncated documentation | +==================================================================================================================+==========================================================================================================+ | :class:`OnnxNumpyCompiler ` | Implements a class which runs onnx graph. | +------------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------+ | :class:`OnnxNumpyFunction ` | Class wrapping a function build with :class:`OnnxNumpyCompiler`. | +------------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------+ | :class:`OnnxNumpyFunctionInferenceSession ` | Overwrites :class:`OnnxNumpyFunction` to run an instance of `InferenceSession` from :epkg:`onnxruntime`. | +------------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------+ | :class:`OnnxNumpyFunctionOnnxInference ` | Overwrites :class:`OnnxNumpyFunction` to run an instance of :class:`OnnxInference`. | +------------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------+ Methods +++++++ +--------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------+ | method | truncated documentation | +==============================================================================================================+============================================================================================================================+ | :py:meth:`__call__ ` | Executes the function and returns the results. | +--------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------+ | :py:meth:`__call__ ` | | +--------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------+ | :py:meth:`__call__ ` | | +--------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------+ | :py:meth:`__getstate__ ` | Serializes everything but function `fct_`. Function `fct_` is used to build the onnx graph and is not needed ... | +--------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------+ | :py:meth:`__init__ ` | | +--------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------+ | :py:meth:`__init__ ` | | +--------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------+ | :py:meth:`__init__ ` | | +--------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------+ | :py:meth:`__init__ ` | | +--------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------+ | :py:meth:`__repr__ ` | usual | +--------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------+ | :py:meth:`__setstate__ ` | Restores serialized data. | +--------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------+ | :py:meth:`_build_runtime ` | Creates the runtime for the :epkg:`ONNX` graph. | +--------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------+ | :py:meth:`_check_ ` | | +--------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------+ | :py:meth:`_check_ ` | | +--------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------+ | :py:meth:`_check_ ` | | +--------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------+ | :py:meth:`_find_hidden_algebras ` | Subgraph are using inputs not linked to the others nodes. This function retrieves them as they are stored in ... | +--------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------+ | :py:meth:`_parse_annotation ` | Returns the annotations for function `fct_`. | +--------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------+ | :py:meth:`_to_onnx ` | Returns the onnx graph produced by function `fct_`. | +--------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------+ | :py:meth:`_to_onnx_shape ` | | +--------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------+ | :meth:`to_onnx ` | Returns the ONNX graph for the wrapped function. It takes additional arguments to distinguish between multiple graphs. ... | +--------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------+ Documentation +++++++++++++ .. automodule:: mlprodict.npy.onnx_numpy_compiler :members: :special-members: __init__ :show-inheritance: