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
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 from onnxscript; nothing in the codebase imports the package.
analyze/pattern/ — __init__.py + check_patterns.py. check_patterns imports live modules but nobody imports check_patterns, and the analyze command 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.py
analyze/runtime_checker/result_processor.py → tests/unit/analyze/runtime_checker/test_result_processor_per_op.py
onnx/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.py is executed as a subprocess script (Path(__file__).parent / "compile_qairt_bin.py"), not imported — keep.
serve/ and data/ are reachable only via the intentionally-disabled run/serve commands — keep.
Background
An import-graph analysis of
src/winml/modelkit(AST-parsed all modules; modeled dynamic command loading viaLazyGroup, 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.pyThis 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 Update QDQ for p1 models #236. Decide: keep as a placeholder tied to Update QDQ for p1 models #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
srcimporter — 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.pyDecide: 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.