.. _f-onnxbackend: module ``testing.onnx_backend`` =============================== .. inheritance-diagram:: mlprodict.testing.onnx_backend Short summary +++++++++++++ module ``mlprodict.testing.onnx_backend`` Tests with onnx backend. :githublink:`%|py|5` Classes +++++++ +---------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------+ | class | truncated documentation | +===========================================================================+==========================================================================================================================+ | :class:`OnnxBackendTest ` | Definition of a backend test. It starts with a folder, in this folder, one onnx file must be there, then a subfolder ... | +---------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------+ Functions +++++++++ +------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------+ | function | truncated documentation | +================================================================================================+=====================================================================================================================+ | :func:`assert_almost_equal_string ` | Compares two arrays knowing they contain strings. Raises an exception if the test fails. | +------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------+ | :func:`enumerate_onnx_tests ` | Collects test from a sub folder of `onnx/backend/test`. Works as an enumerator to start processing them without ... | +------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------+ Properties ++++++++++ +--------------------------------------------------------------------+-------------------------+ | property | truncated documentation | +====================================================================+=========================+ | :meth:`name ` | Returns the test name. | +--------------------------------------------------------------------+-------------------------+ Static Methods ++++++++++++++ +---------------------------------------------------------------------------------------------------------+-------------------------+ | staticmethod | truncated documentation | +=========================================================================================================+=========================+ | :py:meth:`_load ` | | +---------------------------------------------------------------------------------------------------------+-------------------------+ | :py:meth:`_read_proto_from_file ` | | +---------------------------------------------------------------------------------------------------------+-------------------------+ | :py:meth:`_sort ` | | +---------------------------------------------------------------------------------------------------------+-------------------------+ Methods +++++++ +-----------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------+ | method | truncated documentation | +===============================================================================================+========================================================================================================+ | :py:meth:`__init__ ` | | +-----------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------+ | :py:meth:`__len__ ` | Returns the number of tests. | +-----------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------+ | :py:meth:`__repr__ ` | usual | +-----------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------+ | :py:meth:`_compare_results ` | Compares the expected output and the output produced by the runtime. Raises an exception if not equal. | +-----------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------+ | :meth:`is_random ` | Tells if a test is random or not. | +-----------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------+ | :meth:`run ` | Executes a tests or all tests if index is None. The function crashes if the tests fails. | +-----------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------+ | :meth:`to_python ` | Returns a python code equivalent to the ONNX test. | +-----------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------+ Documentation +++++++++++++ .. automodule:: mlprodict.testing.onnx_backend :members: :special-members: __init__ :show-inheritance: