Clean up unreferenced / orphaned modules in src/winml/modelkit
Maintainers usually reply within 1 day
@DingmaomaoBJTU is already working on this.
Since Jul 27, 2026.
Assessment
This issue has not been assessed yet.
Description
Background
An import-graph analysis of src/winml/modelkit (AST-parsed all modules; modeled dynamic command loading via LazyGroup, string-based _LAZY_IMPORTS, and parent-__init__ side-effect registration) found several modules that are not reachable from any CLI command.
The clearly-dead, zero-reference files were already removed in the accompanying PR:
analyze/console_writer.py,analyze/utils/table_utils.py,core/onnx_node_bucketizer.py,core/operation_config.py,core/strategy_selector.py,core/tag_utils.py
This issue tracks the remaining cases that need a decision rather than a straight delete.
1. Empty stub
models/hf/swin2sr.py— 13-line docstring-only placeholder, imported by nothing (not evenmodels/hf/__init__.py). Tracked for Swin2SR patches under #236. Decide: keep as a placeholder tied to #236, or remove until the work is picked up.
2. Dead islands (modules importing each other, unreachable from any command)
analyze/onnx_opset/—__init__.py,_impl/opset_ai_onnx_preview_training1.py,_impl/opset_com_microsoft1.py. Re-exports fromonnxscript; nothing in the codebase imports the package.analyze/pattern/—__init__.py+check_patterns.py.check_patternsimports live modules but nobody importscheck_patterns, and theanalyzecommand never wires it in.
Decide: wire into the analyze pipeline if intended, otherwise remove.
3. Product-dead, kept alive only by their own tests
No src importer — only a test imports each. Removing the module orphans the test:
analyze/runtime_checker/check_ops.py→tests/unit/analyze/test_check_ops.pyanalyze/runtime_checker/result_processor.py→tests/unit/analyze/runtime_checker/test_result_processor_per_op.pyonnx/inspection.py→tests/unit/onnx/test_onnx_inspection.py
Decide: remove module + test if the feature is abandoned, or re-wire into product code if intended.
Not dead (recorded to avoid re-flagging)
session/qairt/compile_qairt_bin.pyis executed as a subprocess script (Path(__file__).parent / "compile_qairt_bin.py"), not imported — keep.serve/anddata/are reachable only via the intentionally-disabledrun/servecommands — keep.
- Dominant language
- Python
- Stars
- 41
- Forks
- 12
- Avg merge
- 19h 32m
- Merged PRs (30d)
- 51
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from microsoft/winml-cli
-
bug P1
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
Maintainers usually reply within 1 day
-
bug P1 triaged
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
microsoft/winml-cli#1097 · 1 comment ·
Maintainers usually reply within 1 day
-
P2 refactor triaged
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
Maintainers usually reply within 1 day
-
bug P1
Difficulty 4/5 3-5 days Newbie friendliness 45/100
Maintainers usually reply within 1 day
-
[winml perf] Build output directory fails architecture resolutionPossibly taken A pull request linked to this issue is open or already merged. Openbug P1
Difficulty 3/5 1-2 days Newbie friendliness 65/100
Maintainers usually reply within 1 day
All issues in microsoft/winml-cli
Similar issues
-
enhancement P2
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Toloka/tolokaforge#1776 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
TencentCloud/Octop#1622 ·
Maintainers usually reply within 1 day
-
Independent PhaseMap objects share and leak their default mode groupingPossibly taken A pull request linked to this issue is open or already merged. Open
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 68/100
-
Rust: `const _` gets its file's node ID, so the file node is relabelled `_` and gains a self-loopOpen
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Graphify-Labs/graphify#4064 · 1 comment ·
Maintainers usually reply within 2 days