Skip to content

Commit bb82e5d

Browse files
committed
fix
1 parent b756784 commit bb82e5d

File tree

1 file changed

+4
-4
lines changed
  • onnx_diagnostic/torch_onnx

1 file changed

+4
-4
lines changed

onnx_diagnostic/torch_onnx/sbs.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ class RunAlignedRecord:
178178
The side-by-side ran by function :func:`run_aligned
179179
<onnx_diagnostic.torch_onnx.sbs.run_aligned>`
180180
yields instances of this type. If both `ep_name`
181-
and `onnx_name` are speficied, then both results
181+
and `onnx_name` are specified, then both results
182182
appear in the exported program (torch) and the onnx model.
183183
184184
:param ep_id_node: node index in the exported program
@@ -261,7 +261,7 @@ def to_str(self) -> str:
261261
)
262262

263263
def update(self, err_abs: float):
264-
"Udpates all attributes with the latest measure."
264+
"Updates all attributes with the latest measure."
265265
if np.isinf(err_abs) or np.isnan(err_abs):
266266
self.n_inf += 1
267267
elif err_abs > 1e6:
@@ -450,7 +450,7 @@ def forward(self, x):
450450
-v 1 --atol=0.1 --rtol=1
451451
"""
452452
assert callable(run_cls), f"run_cls={run_cls} not a callable"
453-
reset_names: Set[str] = set(reset_names) if reset_names else set()
453+
reset_names = set(reset_names) if reset_names else set() # type: ignore[assignment]
454454
str_kws = dict(with_shape=True, with_device=True)
455455
has_cuda = any(
456456
(isinstance(t, torch.Tensor) and t.is_cuda)
@@ -873,7 +873,7 @@ def _gemm_linear(node, feeds, sess):
873873
if k in torch_results and k not in skip_mapping_torch_onnx
874874
]
875875
if new_names and len(new_names) == 1:
876-
new_name = new_names[0] # type: ignore[assignment]
876+
new_name = new_names[0] # type: ignore[assignment, index]
877877
t = torch_results[new_name]
878878
if (
879879
t.shape == tuple(init.dims)

0 commit comments

Comments
 (0)