MCPcopy
hub / github.com/onnx/onnx / _run_case

Function _run_case

onnx/test/inference_function_test.py:48–62  ·  view source on GitHub ↗
(
    schema: OpSchema,
    input_names: list[str],
    output_names: list[str],
    input_types: dict[str, TypeProto],
    input_data: dict[str, np.ndarray] | None = None,
)

Source from the content-addressed store, hash-verified

46
47
48def _run_case(
49 schema: OpSchema,
50 input_names: list[str],
51 output_names: list[str],
52 input_types: dict[str, TypeProto],
53 input_data: dict[str, np.ndarray] | None = None,
54) -> dict[str, TypeProto]:
55 if input_data is None:
56 input_data = {}
57 return infer_node_outputs(
58 schema,
59 make_node(schema.name, input_names, output_names, domain=schema.domain),
60 input_types,
61 {key: from_array(arr) for key, arr in input_data.items()},
62 )
63
64
65class TestInferenceFunctionCall(unittest.TestCase):

Calls 3

infer_node_outputsFunction · 0.90
make_nodeFunction · 0.90
from_arrayFunction · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…