onnx_light.onnx.checker#

exception onnx_light.onnx.checker.ValidationError#
onnx_light.onnx.checker.check_attribute(attribute: _C.AttributeProto) None#

Checks an attribute and raises checker.ValidationError on invalid content.

Raises:

ValidationError – If the attribute is invalid.

onnx_light.onnx.checker.check_graph(graph: GraphProto) None#

Checks a graph and raises checker.ValidationError on invalid content.

Raises:

ValidationError – If the graph is invalid.

onnx_light.onnx.checker.check_model(model: _C.ModelProto, *, full_check: bool = False, skip_opset_compatibility_check: bool = False, check_custom_domain: bool = False) None#

Checks a model and raises checker.ValidationError on invalid content.

Validates the model’s IR structure, including topological ordering of nodes, SSA form, schema compliance, and metadata consistency.

Raises:

ValidationError – If the model fails validation.

onnx_light.onnx.checker.check_sparse_tensor(sparse_tensor: SparseTensorProto) None#

Checks a sparse tensor and raises checker.ValidationError on invalid content.

Raises:

ValidationError – If the sparse tensor is invalid.