Skip to content

Commit e078385

Browse files
committed
fix ext
1 parent 26ee1ce commit e078385

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

onnx_diagnostic/_command_lines_parser.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -316,7 +316,11 @@ def _cmd_validate(argv: List[Any]):
316316
print(f" + {k.ljust(max_length)}: {_ds_clean(v)}")
317317
else:
318318
# Let's skip any invalid combination if known to be unsupported
319-
if "onnx" not in args.export and "custom" not in args.export and args.opt:
319+
if (
320+
"onnx" not in (args.export or "")
321+
and "custom" not in (args.export or "")
322+
and (args.opt or "")
323+
):
320324
print(f"validate - unsupported args: export={args.export!r}, opt={args.opt!r}")
321325
return
322326
summary, _data = validate_model(

onnx_diagnostic/ext_test_case.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -934,6 +934,8 @@ def assertEqualAny(
934934
elif expected.__class__.__name__ in ("Dim", "_Dim", "_DimHintType"):
935935
self.assertEqual(type(expected), type(value), msg=msg)
936936
self.assertEqual(expected.__name__, value.__name__, msg=msg)
937+
elif expected is None:
938+
self.assertEqual(expected, value, msg=msg)
937939
else:
938940
raise AssertionError(
939941
f"Comparison not implemented for types {type(expected)} and {type(value)}"

0 commit comments

Comments
 (0)