microsoft / microsoft/winml-cli

P1-FEATURE-DEBUG-001: Debug Command — Interactive Mode (experimental)

Open
#153 0 comments 0 reactions 1 assignee View on GitHub

@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 build runs 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 (or wmk build --debug-mode) command implemented
  • --step export|analyze|optimize|quantize flag: run only up to that stage
  • After each stage, dump ONNX graph summary (node count, op types, input/output shapes)
  • --inspect flag: 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.helper to 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 Mode
  • plans/release/0501_release_plan/feature-scale.md — P1.3 Debug Command
  • plans/release/0315_release_plan/P1_CHECKLIST.md — P1-FEATURE-001
  • plans/release/0501_release_plan/P0_CHECKLIST.md — P1-FEATURE-003
  • modelkit/cli.py — CLI entry point

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.