Skip to content

Commit bb0c2fd

Browse files
fix: add type annotations to satisfy mypy var-annotated
1 parent 7852669 commit bb0c2fd

2 files changed

Lines changed: 4 additions & 2 deletions

File tree

src/winml/modelkit/build/hf.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -258,7 +258,8 @@ def _name(base: str) -> str:
258258
# Skip optimize entirely for pre-quantized models. ORT Level 2
259259
# optimization fuses QDQ patterns (e.g. DQ→Conv→Q → QLinearConv),
260260
# which breaks QNN/DML EP compatibility and causes CPU fallback.
261-
analyze_iterations, analyze_unsupported_nodes, analyze_details = 0, 0, {}
261+
analyze_iterations, analyze_unsupported_nodes = 0, 0
262+
analyze_details: dict[str, Any] = {}
262263
else:
263264
logger.info("Optimizing ONNX model...")
264265
(

src/winml/modelkit/build/onnx.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,8 @@ def build_onnx_model(
163163
# Skip optimize entirely for pre-quantized models. ORT Level 2
164164
# optimization fuses QDQ patterns (e.g. DQ→Conv→Q → QLinearConv),
165165
# which breaks QNN/DML EP compatibility and causes CPU fallback.
166-
analyze_iters, analyze_unsupported, analyze_details = 0, 0, {}
166+
analyze_iters, analyze_unsupported = 0, 0
167+
analyze_details: dict[str, Any] = {}
167168
else:
168169
logger.info("Optimizing ONNX model...")
169170
current_path, opt_elapsed, analyze_iters, analyze_unsupported, analyze_details = (

0 commit comments

Comments
 (0)