Skip to content

Commit e9c25fb

Browse files
committed
spell
1 parent 011f98e commit e9c25fb

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

.github/workflows/spell-check.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,4 +21,4 @@ jobs:
2121

2222
# Run codespell
2323
- name: Run codespell
24-
run: codespell --skip="*.png,*.jpg,*.jpeg,*.gif,*.svg,*.ico,*.pdf,*.js,*.css,*.map" --ignore-words-list="nd,te,OT" --check-filenames
24+
run: codespell --skip="*.png,*.jpg,*.jpeg,*.gif,*.svg,*.ico,*.pdf,*.js,*.css,*.map" --ignore-words-list="nd,te,OT,ags" --check-filenames

onnx_diagnostic/reference/torch_evaluator.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,7 @@ def run(
219219
# kernel execution
220220
inputs = [(self.runtime_info[i].value if i else None) for i in kernel.input]
221221
if kernel.has_subgraphs():
222-
res = kernel.run(*inputs, context=self.runtime_info)
222+
res = kernel.run(*inputs, context=self.runtime_info) # type: ignore[call-arg]
223223
else:
224224
res = kernel.run(*inputs)
225225
if isinstance(res, tuple):
@@ -271,6 +271,7 @@ def run_with_values(
271271
isinstance(a, torch_ops.OpRunValue) for a in args
272272
), f"Unexpected type in args: {[type(a) for a in args]}"
273273
outputs = self.output_names
274+
context = context or {}
274275

275276
# sets constants
276277
for k, v in self.constants.items():

onnx_diagnostic/reference/torch_ops/control_flow.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ def __init__(
1515
self,
1616
node: onnx.NodeProto,
1717
version: Optional[int] = None,
18-
parent: Optional["TorchOnnxEvaluator"] = None, # noqa: F821
18+
parent: Optional["onnx_diagnostic.reference.TorchOnnxEvaluator"] = None, # noqa: F821
1919
):
2020
super().__init__(node, version)
2121
assert (
@@ -36,5 +36,5 @@ class If_1(OpRunControlFlow):
3636
"If"
3737

3838
def run(self, cond, context: Optional[Dict[str, Any]] = None):
39-
rt = self.then_branch if cond.tensor.item() else self.else_branch
39+
rt = self.then_branch if cond.tensor.item() else self.else_branch # type: ignore[attr-defined]
4040
return rt.run_with_values(context=context)

0 commit comments

Comments
 (0)