We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 19a76a8 commit 70526e6Copy full SHA for 70526e6
onnx_diagnostic/helpers/dot_helper.py
@@ -1,4 +1,4 @@
1
-from typing import Set
+from typing import Dict, Set
2
import onnx
3
from .onnx_helper import onnx_dtype_name, pretty_onnx
4
@@ -83,7 +83,7 @@ def to_dot(model: onnx.ModelProto) -> str:
83
dot = to_dot(em.model_proto)
84
print("DOT-SECTION", dot)
85
"""
86
- _unique = {}
+ _unique: Dict[int, int] = {}
87
88
def _mkn(obj: object) -> int:
89
id_obj = id(obj)
@@ -169,7 +169,7 @@ def _mkn(obj: object) -> int:
169
if att.type == onnx.AttributeProto.GRAPH:
170
unique |= _get_hidden_inputs(att.g)
171
for i in unique:
172
- edge = name_to_ids[i], _mkn(node)
+ edge = name_to_ids[i], _mkn(node) # type: ignore[assignment]
173
if edge in done:
174
continue
175
done.add(edge)
0 commit comments