Skip to content

Commit 8ac7f01

Browse files
committed
refly
1 parent 2437794 commit 8ac7f01

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

onnx_diagnostic/investigate/input_observer.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -607,7 +607,7 @@ def infer_arguments(
607607
# This is already checked by _build_inputs_completed_with_none_values
608608
# but this is not always well captured by tools checking types.
609609
self.align_inputs_none_values()
610-
torch._check(self._best_candidate is not None, lambda: "No input was captured.")
610+
assert self._best_candidate is not None, "No input was captured."
611611
candidate = None
612612
if index_or_candidate is None:
613613
for cand in self.inputs:
@@ -629,7 +629,7 @@ def infer_arguments(
629629
else:
630630
candidate = index_or_candidate
631631

632-
torch._check(candidate is not None, "No input was captured.")
632+
assert candidate is not None, "No input was captured."
633633
if candidate.aligned_flat_list is None:
634634
raise RuntimeError(
635635
f"Candidate {candidate} has no aligned flat list of tensors, "

0 commit comments

Comments
 (0)