.. _f-utilsbackendcommon: module ``testing.test_utils.utils_backend_common`` ================================================== .. inheritance-diagram:: mlprodict.testing.test_utils.utils_backend_common Short summary +++++++++++++ module ``mlprodict.testing.test_utils.utils_backend_common`` Inspired from :epkg:`sklearn-onnx`, handles two backends. :githublink:`%|py|5` Classes +++++++ +----------------------------------------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+ | class | truncated documentation | +====================================================================================================================================================+========================================================================================================================+ | :class:`ExpectedAssertionError ` | Expected failure. | +----------------------------------------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+ | :class:`OnnxBackendAssertionError ` | Expected failure. | +----------------------------------------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+ | :class:`OnnxBackendMissingNewOnnxOperatorException ` | Raised when :epkg:`onnxruntime` or :epkg:`mlprodict` does not implement a new operator defined in the latest onnx. ... | +----------------------------------------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+ | :class:`OnnxRuntimeMissingNewOnnxOperatorException ` | Raised when a new operator was added but cannot be found. | +----------------------------------------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+ Functions +++++++++ +-------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------+ | function | truncated documentation | +=======================================================================================================+=============================================================================================================================+ | :func:`_compare_expected ` | Compares the expected output against the runtime outputs. This is specific to :epkg:`onnxruntime` or :epkg:`mlprodict`. ... | +-------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------+ | :func:`_create_column ` | Creates a column from values with dtype | +-------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------+ | :func:`_post_process_output ` | Applies post processings before running the comparison such as changing type from list to arrays. | +-------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------+ | :func:`compare_outputs ` | Compares expected values and output. Returns None if no error, an exception message otherwise. | +-------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------+ | :func:`evaluate_condition ` | Evaluates a condition such as ``StrictVersion(onnxruntime.__version__) <= StrictVersion('0.1.3')`` | +-------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------+ | :func:`extract_options ` | Extracts comparison option from filename. As example, ``Binarizer-SkipDim1`` means options *SkipDim1* is enabled. ... | +-------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------+ | :func:`is_backend_enabled ` | Tells if a backend is enabled. Raises an exception if backend != 'onnxruntime'. Unit tests only test models against ... | +-------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------+ | :func:`load_data_and_model ` | Loads every file in a dictionary {key: filename}. The extension is either *pkl* and *onnx* and determines how it ... | +-------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------+ Documentation +++++++++++++ .. automodule:: mlprodict.testing.test_utils.utils_backend_common :members: :special-members: __init__ :show-inheritance: