microsoft / microsoft/winml-cli
P1-FEATURE-DEBUG-001: Debug Command — Interactive Mode (experimental)
Open
@tezheng is already working on this.
Since Mar 31, 2026.
feature scale
P1
triaged
- Dominant language
- Python
- Stars
- 40
- Forks
- 11
- Avg merge
- 1d 8h
- Merged PRs (30d)
- 50
Description
Summary
Implement an interactive debug mode for wmk build that lets users step through the pipeline stage by stage, inspect the ONNX graph at each step, and apply optimizations selectively.
Context
When a model build fails, users need to understand at which stage it failed and why. Interactive mode loads the model without triggering the full pipeline, allowing selective stage execution and graph inspection.
This is experimental for May 1. From:
plans/release/0315_release_plan/P1_CHECKLIST.md(P1-FEATURE-001)plans/release/0501_release_plan/P0_CHECKLIST.md(P1-FEATURE-003)
Current State
wmk buildruns the full pipeline non-interactively- No step-by-step mode or mid-pipeline inspection capability
- Build failures produce basic error messages without graph introspection
Desired State
wmk debug --step export(or similar) runs only the export stage and dumps the graph- User can inspect the ONNX graph after each stage: export, optimize, quantize
- Apply optimizations selectively:
--apply-fusion --skip-qdq - Useful for debugging "which optimization broke my model?"
Acceptance Criteria
-
wmk debug(orwmk build --debug-mode) command implemented -
--step export|analyze|optimize|quantizeflag: run only up to that stage - After each stage, dump ONNX graph summary (node count, op types, input/output shapes)
-
--inspectflag: show detailed graph before/after chosen stage - Experimental flag clearly communicated in CLI output and docs
- All existing tests pass
Technical Notes
- Load model without triggering full pipeline: decouple stage execution from main flow
- Graph inspection: use
onnx.helperto print node/op summary; optionally integrate with Netron - API design: the stage selection API must be clean enough to extend for future stages
Related Files
plans/release/0315_release_plan/feature-scale.md— P1.1 Debug Command Interactive Modeplans/release/0501_release_plan/feature-scale.md— P1.3 Debug Commandplans/release/0315_release_plan/P1_CHECKLIST.md— P1-FEATURE-001plans/release/0501_release_plan/P0_CHECKLIST.md— P1-FEATURE-003modelkit/cli.py— CLI entry point
Contributor 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.
Assessment
This issue has not been assessed yet.