.. _f-utilsbackendpython: module ``testing.test_utils.utils_backend_python`` ================================================== .. inheritance-diagram:: mlprodict.testing.test_utils.utils_backend_python Short summary +++++++++++++ module ``mlprodict.testing.test_utils.utils_backend_python`` Inspired from sklearn-onnx, handles two backends. :githublink:`%|py|5` Classes +++++++ +------------------------------------------------------------------------------------------------------------------+----------------------------------+ | class | truncated documentation | +==================================================================================================================+==================================+ | :class:`MockVariableName ` | A string. | +------------------------------------------------------------------------------------------------------------------+----------------------------------+ | :class:`MockVariableNameShape ` | A string and a shape. | +------------------------------------------------------------------------------------------------------------------+----------------------------------+ | :class:`MockVariableNameShapeType ` | A string and a shape and a type. | +------------------------------------------------------------------------------------------------------------------+----------------------------------+ | :class:`OnnxInference2 ` | onnxruntime API | +------------------------------------------------------------------------------------------------------------------+----------------------------------+ Functions +++++++++ +---------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------+ | function | truncated documentation | +=============================================================================================+============================================================================================================================+ | :func:`compare_runtime ` | The function compares the expected output (computed with the model before being converted to ONNX) and the ONNX output ... | +---------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------+ Properties ++++++++++ +--------------------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------+ | property | truncated documentation | +================================================================================================================================+=================================================================================================================+ | :meth:`input_names ` | Returns the names of all inputs. It does not include the optional inputs. | +--------------------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------+ | :meth:`input_names_shapes ` | Returns the names and shapes of all inputs. This method assumes all inputs are tensors. It does not include ... | +--------------------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------+ | :meth:`input_names_shapes_types ` | Returns the names, shapes, types of all inputs. This method assumes all inputs are tensors. It does not ... | +--------------------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------+ | :meth:`optional_inputs ` | Returns the list of optional inputs (the model has an initalizer of the same name as one input). | +--------------------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------+ | :meth:`output_names ` | Returns the names of all outputs. | +--------------------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------+ | :meth:`output_names_shapes ` | Returns the names and shapes of all outputs. This method assumes all inputs are tensors. | +--------------------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------+ | :meth:`output_names_shapes_types ` | Returns the names, shapes, types of all outputs. This method assumes all inputs are tensors. It does not ... | +--------------------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------+ | :meth:`shape ` | returns shape | +--------------------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------+ | :meth:`shape ` | returns shape | +--------------------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------+ | :meth:`shape ` | returns shape | +--------------------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------+ | :meth:`type ` | returns type | +--------------------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------+ | :meth:`type ` | returns type | +--------------------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------+ | :meth:`type ` | returns type | +--------------------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------+ Methods +++++++ +------------------------------------------------------------------------------------------------------------+-----------------------------------+ | method | truncated documentation | +============================================================================================================+===================================+ | :py:meth:`__init__ ` | | +------------------------------------------------------------------------------------------------------------+-----------------------------------+ | :py:meth:`__init__ ` | | +------------------------------------------------------------------------------------------------------------+-----------------------------------+ | :py:meth:`__init__ ` | | +------------------------------------------------------------------------------------------------------------+-----------------------------------+ | :meth:`get_inputs ` | onnxruntime API | +------------------------------------------------------------------------------------------------------------+-----------------------------------+ | :meth:`get_outputs ` | onnxruntime API | +------------------------------------------------------------------------------------------------------------+-----------------------------------+ | :meth:`run ` | onnxruntime API | +------------------------------------------------------------------------------------------------------------+-----------------------------------+ | :meth:`run_in_scan ` | Instance to run in operator scan. | +------------------------------------------------------------------------------------------------------------+-----------------------------------+ Documentation +++++++++++++ .. automodule:: mlprodict.testing.test_utils.utils_backend_python :members: :special-members: __init__ :show-inheritance: