Skip to content

Commit 517bef5

Browse files
committed
mypy
1 parent 2ea250c commit 517bef5

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

_doc/cmds/sbs.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
Description
55
+++++++++++
66

7-
It compares the intermediate results between an exported programm saved with
7+
It compares the intermediate results between an exported program saved with
88
:func:`torch.export.save` and an exported model on saved inputs
99
with :func:`torch.save`. It assumes intermediate results share the same
1010
names.

onnx_diagnostic/torch_onnx/sbs.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import inspect
22
import time
33
from dataclasses import dataclass
4-
from typing import Any, Callable, Dict, Iterator, List, Optional, Tuple, Union
4+
from typing import Any, Callable, Dict, Iterator, List, Optional, Set, Tuple, Union
55
import onnx
66
import onnx.helper as oh
77
import numpy as np
@@ -755,7 +755,7 @@ def _gemm_linear(node, feeds, sess):
755755

756756
# alias for initializers
757757
skip_onnx_name = set()
758-
init_aliases = {}
758+
init_aliases: Dict[str, str] = {}
759759
for init in onx.graph.initializer:
760760
new_names = {
761761
n
@@ -779,7 +779,7 @@ def _gemm_linear(node, feeds, sess):
779779
else:
780780
for new_name in new_names:
781781
init_aliases[new_name] = init.name
782-
rev_init_aliases = {}
782+
rev_init_aliases: Dict[str, Set[str]] = {}
783783
for k, v in init_aliases.items():
784784
if v in rev_init_aliases:
785785
rev_init_aliases[v].add(k)
@@ -860,7 +860,7 @@ def _gemm_linear(node, feeds, sess):
860860

861861
if verbose:
862862
print(f"[run_aligned] ep: starts side-by-side with {len(ep_graph_nodes)} nodes")
863-
already_run = set()
863+
already_run: Set[int] = set()
864864
ep_durations = {}
865865
status = StatusRunAligned()
866866
for i, node in loop:

0 commit comments

Comments
 (0)