Commit ffcd152
committed
Fix incompatible types in assignment
Fix:
ms_mo/quant/quantizers.py:3933: error: Incompatible types in assignment (expression has type "int | float", variable has type "Tensor") [assignment]
fms_mo/quant/quantizers.py:3945: error: Incompatible types in assignment (expression has type "float", variable has type "Tensor | None") [assignment]
fms_mo/quant/quantizers.py:3947: error: Incompatible types in assignment (expression has type "Any | int", variable has type "Tensor | None") [assignment]
fms_mo/quant/quantizers.py:4190: error: Incompatible types in assignment (expression has type "Parameter", variable has type "None") [assignment]
fms_mo/quant/quantizers.py:4196: error: Incompatible types in assignment (expression has type "Size", variable has type "list[Any]") [assignment]
fms_mo/modules/linear.py:1341: error: Incompatible types in assignment (expression has type "tuple[int, int]", variable has type "tuple[int, int, int]") [assignment]
fms_mo/utils/torchscript_utils.py:58: error: Incompatible types in assignment (expression has type "list[str] | None", variable has type "list[str]") [assignment]
fms_mo/utils/qconfig_utils.py:167: error: Incompatible types in assignment (expression has type "int", target has type "dict[type, dict[str, type]]") [assignment]
fms_mo/utils/qconfig_utils.py:168: error: Incompatible types in assignment (expression has type "int", target has type "dict[type, dict[str, type]]") [assignment]
fms_mo/utils/qconfig_utils.py:169: error: Incompatible types in assignment (expression has type "str", target has type "dict[type, dict[str, type]]") [assignment]
fms_mo/utils/qconfig_utils.py:170: error: Incompatible types in assignment (expression has type "str", target has type "dict[type, dict[str, type]]") [assignment]
fms_mo/utils/qconfig_utils.py:171: error: Incompatible types in assignment (expression has type "None", target has type "dict[type, dict[str, type]]") [assignment]
fms_mo/utils/qconfig_utils.py:172: error: Incompatible types in assignment (expression has type "None", target has type "dict[type, dict[str, type]]") [assignment]
fms_mo/utils/qconfig_utils.py:173: error: Incompatible types in assignment (expression has type "int", target has type "dict[type, dict[str, type]]") [assignment]
fms_mo/utils/qconfig_utils.py:174: error: Incompatible types in assignment (expression has type "int", target has type "dict[type, dict[str, type]]") [assignment]
fms_mo/utils/qconfig_utils.py:175: error: Incompatible types in assignment (expression has type "str", target has type "dict[type, dict[str, type]]") [assignment]
fms_mo/utils/qconfig_utils.py:176: error: Incompatible types in assignment (expression has type "str", target has type "dict[type, dict[str, type]]") [assignment]
fms_mo/utils/qconfig_utils.py:178: error: Incompatible types in assignment (expression has type "str", target has type "dict[type, dict[str, type]]") [assignment]
fms_mo/utils/qconfig_utils.py:179: error: Incompatible types in assignment (expression has type "str", target has type "dict[type, dict[str, type]]") [assignment]
fms_mo/utils/qconfig_utils.py:180: error: Incompatible types in assignment (expression has type "tuple[float, float]", target has type "dict[type, dict[str, type]]") [assignment]
fms_mo/utils/qconfig_utils.py:183: error: Incompatible types in assignment (expression has type "list[Never]", target has type "dict[type, dict[str, type]]") [assignment]
fms_mo/utils/qconfig_utils.py:184: error: Incompatible types in assignment (expression has type "list[Never]", target has type "dict[type, dict[str, type]]") [assignment]
fms_mo/utils/qconfig_utils.py:188: error: Incompatible types in assignment (expression has type "None", target has type "dict[type, dict[str, type]]") [assignment]
fms_mo/utils/qconfig_utils.py:189: error: Incompatible types in assignment (expression has type "None", target has type "dict[type, dict[str, type]]") [assignment]
fms_mo/utils/qconfig_utils.py:190: error: Incompatible types in assignment (expression has type "None", target has type "dict[type, dict[str, type]]") [assignment]
fms_mo/utils/qconfig_utils.py:191: error: Incompatible types in assignment (expression has type "str", target has type "dict[type, dict[str, type]]") [assignment]
fms_mo/utils/qconfig_utils.py:192: error: Incompatible types in assignment (expression has type "str", target has type "dict[type, dict[str, type]]") [assignment]
fms_mo/utils/qconfig_utils.py:193: error: Incompatible types in assignment (expression has type "str", target has type "dict[type, dict[str, type]]") [assignment]
fms_mo/utils/qconfig_utils.py:194: error: Incompatible types in assignment (expression has type "str", target has type "dict[type, dict[str, type]]") [assignment]
fms_mo/utils/qconfig_utils.py:195: error: Incompatible types in assignment (expression has type "str", target has type "dict[type, dict[str, type]]") [assignment]
fms_mo/utils/qconfig_utils.py:196: error: Incompatible types in assignment (expression has type "str", target has type "dict[type, dict[str, type]]") [assignment]
fms_mo/utils/qconfig_utils.py:197: error: Incompatible types in assignment (expression has type "bool", target has type "dict[type, dict[str, type]]") [assignment]
fms_mo/utils/qconfig_utils.py:199: error: Incompatible types in assignment (expression has type "None", target has type "dict[type, dict[str, type]]") [assignment]
fms_mo/utils/qconfig_utils.py:203: error: Incompatible types in assignment (expression has type "None", target has type "dict[type, dict[str, type]]") [assignment]
fms_mo/utils/qconfig_utils.py:204: error: Incompatible types in assignment (expression has type "None", target has type "dict[type, dict[str, type]]") [assignment]
fms_mo/utils/qconfig_utils.py:205: error: Incompatible types in assignment (expression has type "None", target has type "dict[type, dict[str, type]]") [assignment]
fms_mo/utils/qconfig_utils.py:206: error: Incompatible types in assignment (expression has type "None", target has type "dict[type, dict[str, type]]") [assignment]
fms_mo/utils/qconfig_utils.py:207: error: Incompatible types in assignment (expression has type "None", target has type "dict[type, dict[str, type]]") [assignment]
fms_mo/utils/qconfig_utils.py:208: error: Incompatible types in assignment (expression has type "str", target has type "dict[type, dict[str, type]]") [assignment]
fms_mo/utils/qconfig_utils.py:210: error: Incompatible types in assignment (expression has type "bool", target has type "dict[type, dict[str, type]]") [assignment]
fms_mo/utils/qconfig_utils.py:213: error: Incompatible types in assignment (expression has type "bool", target has type "dict[type, dict[str, type]]") [assignment]
fms_mo/utils/qconfig_utils.py:214: error: Incompatible types in assignment (expression has type "bool", target has type "dict[type, dict[str, type]]") [assignment]
fms_mo/utils/qconfig_utils.py:215: error: Incompatible types in assignment (expression has type "bool", target has type "dict[type, dict[str, type]]") [assignment]
fms_mo/utils/qconfig_utils.py:216: error: Incompatible types in assignment (expression has type "bool", target has type "dict[type, dict[str, type]]") [assignment]
fms_mo/utils/qconfig_utils.py:217: error: Incompatible types in assignment (expression has type "int", target has type "dict[type, dict[str, type]]") [assignment]
fms_mo/utils/qconfig_utils.py:218: error: Incompatible types in assignment (expression has type "int", target has type "dict[type, dict[str, type]]") [assignment]
fms_mo/utils/qconfig_utils.py:219: error: Incompatible types in assignment (expression has type "int", target has type "dict[type, dict[str, type]]") [assignment]
fms_mo/utils/qconfig_utils.py:220: error: Incompatible types in assignment (expression has type "int", target has type "dict[type, dict[str, type]]") [assignment]
fms_mo/utils/qconfig_utils.py:221: error: Incompatible types in assignment (expression has type "str", target has type "dict[type, dict[str, type]]") [assignment]
fms_mo/utils/qconfig_utils.py:222: error: Incompatible types in assignment (expression has type "float", target has type "dict[type, dict[str, type]]") [assignment]
fms_mo/utils/qconfig_utils.py:223: error: Incompatible types in assignment (expression has type "float", target has type "dict[type, dict[str, type]]") [assignment]
fms_mo/utils/qconfig_utils.py:224: error: Incompatible types in assignment (expression has type "float", target has type "dict[type, dict[str, type]]") [assignment]
fms_mo/utils/qconfig_utils.py:226: error: Incompatible types in assignment (expression has type "list[Never]", target has type "dict[type, dict[str, type]]") [assignment]
fms_mo/utils/qconfig_utils.py:227: error: Incompatible types in assignment (expression has type "bool", target has type "dict[type, dict[str, type]]") [assignment]
fms_mo/utils/qconfig_utils.py:228: error: Incompatible types in assignment (expression has type "bool", target has type "dict[type, dict[str, type]]") [assignment]
fms_mo/utils/qconfig_utils.py:229: error: Incompatible types in assignment (expression has type "str", target has type "dict[type, dict[str, type]]") [assignment]
fms_mo/utils/qconfig_utils.py:230: error: Incompatible types in assignment (expression has type "list[Never]", target has type "dict[type, dict[str, type]]") [assignment]
fms_mo/utils/qconfig_utils.py:237: error: Incompatible types in assignment (expression has type "None", target has type "dict[type, dict[str, type]]") [assignment]
fms_mo/utils/qconfig_utils.py:238: error: Incompatible types in assignment (expression has type "int", target has type "dict[type, dict[str, type]]") [assignment]
fms_mo/utils/qconfig_utils.py:239: error: Incompatible types in assignment (expression has type "int", target has type "dict[type, dict[str, type]]") [assignment]
fms_mo/utils/qconfig_utils.py:240: error: Incompatible types in assignment (expression has type "int", target has type "dict[type, dict[str, type]]") [assignment]
fms_mo/utils/qconfig_utils.py:243: error: Incompatible types in assignment (expression has type "bool", target has type "dict[type, dict[str, type]]") [assignment]
fms_mo/utils/qconfig_utils.py:244: error: Incompatible types in assignment (expression has type "bool", target has type "dict[type, dict[str, type]]") [assignment]
fms_mo/utils/qconfig_utils.py:245: error: Incompatible types in assignment (expression has type "bool", target has type "dict[type, dict[str, type]]") [assignment]
fms_mo/utils/qconfig_utils.py:246: error: Incompatible types in assignment (expression has type "bool", target has type "dict[type, dict[str, type]]") [assignment]
fms_mo/utils/qconfig_utils.py:247: error: Incompatible types in assignment (expression has type "list[Never]", target has type "dict[type, dict[str, type]]") [assignment]
fms_mo/utils/qconfig_utils.py:248: error: Incompatible types in assignment (expression has type "bool", target has type "dict[type, dict[str, type]]") [assignment]
fms_mo/utils/qconfig_utils.py:249: error: Incompatible types in assignment (expression has type "bool", target has type "dict[type, dict[str, type]]") [assignment]
fms_mo/utils/qconfig_utils.py:250: error: Incompatible types in assignment (expression has type "bool", target has type "dict[type, dict[str, type]]") [assignment]
fms_mo/utils/qconfig_utils.py:251: error: Incompatible types in assignment (expression has type "bool", target has type "dict[type, dict[str, type]]") [assignment]
fms_mo/utils/qconfig_utils.py:252: error: Incompatible types in assignment (expression has type "bool", target has type "dict[type, dict[str, type]]") [assignment]
fms_mo/utils/qconfig_utils.py:253: error: Incompatible types in assignment (expression has type "int", target has type "dict[type, dict[str, type]]") [assignment]
fms_mo/utils/qconfig_utils.py:257: error: Incompatible types in assignment (expression has type "float", target has type "dict[type, dict[str, type]]") [assignment]
fms_mo/quant/ptq.py:2646: error: Incompatible types in assignment (expression has type "tuple[type[Conv2d], type[Linear]]", variable has type "tuple[type[Conv2d], type[Linear], type[DetQConv2d]]") [assignment]
Signed-off-by: Martin Hickey <[email protected]>1 parent 7f748af commit ffcd152
File tree
4 files changed
+6
-5
lines changed- fms_mo
- quant
- utils
4 files changed
+6
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2643 | 2643 | | |
2644 | 2644 | | |
2645 | 2645 | | |
2646 | | - | |
| 2646 | + | |
2647 | 2647 | | |
2648 | 2648 | | |
2649 | 2649 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4035 | 4035 | | |
4036 | 4036 | | |
4037 | 4037 | | |
4038 | | - | |
| 4038 | + | |
4039 | 4039 | | |
4040 | 4040 | | |
4041 | 4041 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
18 | | - | |
| 18 | + | |
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
| |||
149 | 149 | | |
150 | 150 | | |
151 | 151 | | |
152 | | - | |
| 152 | + | |
153 | 153 | | |
154 | 154 | | |
155 | 155 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
55 | 55 | | |
56 | 56 | | |
57 | 57 | | |
58 | | - | |
| 58 | + | |
| 59 | + | |
59 | 60 | | |
60 | 61 | | |
61 | 62 | | |
| |||
0 commit comments