Testing¶
- onnxscript.testing.assert_isomorphic(graph_or_function_1, graph_or_function_2)[source]¶
Assert two graphs or functions are isomorphic.
- onnxscript.testing.assert_isomorphic_function(fn1, fn2)[source]¶
Assert two functions are isomorphic.
- onnxscript.testing.assert_isomorphic_graph(graph1, graph2)[source]¶
Assert two graphs are isomorphic.
- onnxscript.testing.assert_onnx_proto_equal(actual: Message | Any, expected: Message | Any, ignore_initializer_value_proto: bool = False) None [source]¶
Assert that two ONNX protos are equal.
Equality is defined as having the same fields with the same values. When a field takes the default value, it is considered equal to the field not being set.
Sequential fields with name opset_import, value_info, and functions are compared disregarding the order of their elements.
- Parameters:
actual – The first ONNX proto.
expected – The second ONNX proto.
ignore_initializer_value_proto – Ignore value protos for initializers if there are extra ones in the actual proto.