Skip to content

Commit ad3f491

Browse files
committed
fix clean
1 parent 4a9415a commit ad3f491

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

onnx_array_api/profiling.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -437,7 +437,8 @@ def add_rows(rows, d):
437437
stall = 0
438438
if verbose and fLOG is not None:
439439
fLOG(
440-
"[pstats] %s=%r" % (clean_text(k[0].replace("\\", "/"), *k[1:]), v)
440+
"[pstats] %s=%r"
441+
% ((clean_text(k[0].replace("\\", "/")), *k[1:]), v)
441442
)
442443
if len(v) < 5:
443444
continue

onnx_array_api/reference/__init__.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,10 @@
1313
)
1414
except ImportError:
1515
bfloat16 = None
16-
from onnx.reference.op_run import to_array_extended
16+
try:
17+
from onnx.reference.op_run import to_array_extended
18+
except ImportError:
19+
from onnx.numpy_helper import to_array as to_array_extended
1720
from .evaluator import ExtendedReferenceEvaluator
1821
from .evaluator_yield import (
1922
DistanceExecution,

0 commit comments

Comments
 (0)