Skip to content

Commit ace236c

Browse files
committed
2 parents 77863a6 + bf98384 commit ace236c

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

onnx_array_api/_command_lines_parser.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,8 +123,14 @@ def _cmd_compare(argv: List[Any]):
123123

124124
parser = get_parser_compare()
125125
args = parser.parse_args(argv[1:])
126+
if args.verbose in ("1", 1, "True", True):
127+
print(f"[compare] first model {args.model1!r}")
128+
print(f"[compare] second model {args.model2!r}")
126129
onx1 = onnx.load(args.model1)
127130
onx2 = onnx.load(args.model2)
131+
if args.verbose in ("1", 1, "True", True):
132+
print(f"[compare] first model has {len(onx1.graph.node)} nodes")
133+
print(f"[compare] second model has {len(onx2.graph.node)} nodes")
128134
res1, res2, align, dc = compare_onnx_execution(
129135
onx1,
130136
onx2,

onnx_array_api/reference/evaluator_yield.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -642,15 +642,16 @@ def compare_onnx_execution(
642642
print("[compare_onnx_execution] loading first model")
643643
proto1 = load(model1) if isinstance(model1, str) else model1
644644
if verbose:
645-
print("[compare_onnx_execution] loading first model")
645+
print("[compare_onnx_execution] loading second model")
646646
proto2 = load(model2) if isinstance(model2, str) else model2
647647
res1 = list(_enumerate_result_no_execution(proto1))
648648
res2 = list(_enumerate_result_no_execution(proto2))
649649
else:
650650
return
651651

652652
if verbose:
653-
print(f"[compare_onnx_execution] got {len(res2)} results")
653+
print(f"[compare_onnx_execution] got {len(res1)} results (first model)")
654+
print(f"[compare_onnx_execution] got {len(res2)} results (second model)")
654655
print("[compare_onnx_execution] compute edit distance")
655656
dc = DistanceExecution()
656657
_, align = dc.distance_sequence(res1, res2)

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy