.. _f-onnxcheckmodel: module ``onnx_tools._onnx_check_model`` ======================================= .. inheritance-diagram:: mlprodict.onnx_tools._onnx_check_model Short summary +++++++++++++ module ``mlprodict.onnx_tools._onnx_check_model`` Python implementation of `onnx.checker.check_model`. :githublink:`%|py|6` Classes +++++++ +---------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------+ | class | truncated documentation | +===============================================================================================================+=================================================================================================================================================+ | :class:`CheckerContext ` | Class hosting information about a graph. | +---------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------+ | :class:`CheckerContextDefaultRegistry ` | Registry. | +---------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------+ | :class:`LexicalScopeContext ` | Construct an instance with the lexical scope from the parent graph to allow lookup of names from that scope via this_or_ancestor_graph_has. ... | +---------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------+ | :class:`OnnxCheckError ` | Raised when a model fails check. | +---------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------+ | :class:`Schema ` | Wrapper around a schema. | +---------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------+ | :class:`UndefinedSchema ` | Undefined schema. | +---------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------+ Functions +++++++++ +----------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------+ | function | truncated documentation | +================================================================================================================+================================================================================================================================+ | :func:`_check_data_field ` | | +----------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------+ | :func:`_check_field ` | | +----------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------+ | :func:`_check_function ` | | +----------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------+ | :func:`_check_graph ` | | +----------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------+ | :func:`_check_map ` | | +----------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------+ | :func:`_check_model ` | | +----------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------+ | :func:`_check_model_local_functions ` | | +----------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------+ | :func:`_check_node ` | | +----------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------+ | :func:`_check_opset_compatibility ` | | +----------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------+ | :func:`_check_optional ` | | +----------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------+ | :func:`_check_sequence ` | | +----------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------+ | :func:`_check_sparse_tensor ` | | +----------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------+ | :func:`_check_sparse_tensor_indices_1 ` | Check that the index data stored in a SparseTensorProto is valid. indices: a 1-dimensional tensor; indices[i] represents ... | +----------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------+ | :func:`_check_sparse_tensor_indices_2 ` | Check that the index data stored in a SparseTensorProto is valid. indices: a 2-dimensional tensor; indices[i,j] represents ... | +----------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------+ | :func:`_check_tensor ` | | +----------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------+ | :func:`_check_value_info ` | | +----------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------+ | :func:`_enforce_has_field ` | | +----------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------+ | :func:`_enforce_has_repeated_field ` | | +----------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------+ | :func:`_enforce_non_empty_field ` | | +----------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------+ | :func:`_get_version_for_domain ` | | +----------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------+ | :func:`_parse_data ` | | +----------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------+ | :func:`check_attribute ` | NB: This is a generic "attribute well-formedness" check, it doesn't actually test if an attribute is valid per a schema. ... | +----------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------+ | :func:`check_is_experimental_op ` | Tells if an operator is experimentation. | +----------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------+ | :func:`check_model ` | Checks a model is consistent with ONNX language. The function fails if the model is not consistent. | +----------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------+ Properties ++++++++++ +------------------------------------------------------------------------------------------+-------------------------+ | property | truncated documentation | +==========================================================================================+=========================+ | :meth:`deprecated_ ` | Returns False. | +------------------------------------------------------------------------------------------+-------------------------+ Methods +++++++ +----------------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------+ | method | truncated documentation | +============================================================================================================================+===============================================================+ | :py:meth:`__getattr__ ` | | +----------------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------+ | :py:meth:`__init__ ` | | +----------------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------+ | :py:meth:`__init__ ` | | +----------------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------+ | :py:meth:`__init__ ` | | +----------------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------+ | :py:meth:`__init__ ` | | +----------------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------+ | :py:meth:`__init__ ` | | +----------------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------+ | :meth:`add ` | Adds a name to the context. | +----------------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------+ | :meth:`copy ` | Copies the instance. | +----------------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------+ | :meth:`get_ir_version ` | Accessor. | +----------------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------+ | :meth:`get_model_dir ` | Accessor. | +----------------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------+ | :meth:`get_opset_imports ` | Accessor. | +----------------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------+ | :meth:`get_schema ` | Accessor. | +----------------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------+ | :meth:`get_schema_registry ` | Accessor. | +----------------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------+ | :meth:`GetSchema ` | Accessor. | +----------------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------+ | :meth:`is_main_graph ` | Accessor. | +----------------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------+ | :meth:`num_inputs_allowed ` | Not implemented yet. | +----------------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------+ | :meth:`num_outputs_allowed ` | Not implemented yet. | +----------------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------+ | :meth:`set_ir_version ` | Accessor. | +----------------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------+ | :meth:`set_is_main_graph ` | Accessor. | +----------------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------+ | :meth:`set_model_dir ` | Accessor. | +----------------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------+ | :meth:`set_opset_imports ` | Accessor. | +----------------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------+ | :meth:`set_schema_registry ` | Accessor. | +----------------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------+ | :meth:`this_graph_has ` | Checks the context includes a specific name. | +----------------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------+ | :meth:`this_or_ancestor_graph_has ` | Checks the context and its ancestor includes a specific name. | +----------------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------+ | :meth:`verify ` | Verifies a node is consistent with ONNX language. | +----------------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------+ | :meth:`verify ` | Verifies a, undefined node is consistent with ONNX language. | +----------------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------+ Documentation +++++++++++++ .. automodule:: mlprodict.onnx_tools._onnx_check_model :members: :special-members: __init__ :show-inheritance: