microsoft / microsoft/winml-cli
Each pipeline command should suggest the next step with the exact command to run
@fenghuaxueyue98 is already working on this.
Since May 29, 2026.
- Dominant language
- Python
- Stars
- 40
- Forks
- 11
- Avg merge
- 1d 8h
- Merged PRs (30d)
- 50
Description
Summary
Every command in the ModelKit pipeline completes and exits without telling the developer what to do next. winml inspect is a dead end — the developer sees model info but has to guess the next command, its flags, and the right values. Every stage should close with a "Next step" hint that carries forward the model ID, device, and EP context already established.
Motivation
ModelKit has two distinct pipelines with a clear step order, but nothing in the CLI output surfaces either of them:
Pipeline A — HuggingFace model, high-level:
inspect → config → build → perf → eval
Pipeline B — Low-level / advanced:
# From a HuggingFace model:
inspect → export → analyze → optimize → quantize → compile → perf → eval
# From an existing ONNX file (pipeline starts at analyze):
analyze → optimize → quantize → compile → perf → eval
A developer who runs winml inspect dslim/bert-base-NER sees model info but receives no signal about which pipeline applies or what to run next.
Proposed "Next:" hints per command
Pipeline A — HuggingFace, high-level
winml inspect <hf_model> →
Next: winml config dslim/bert-base-NER --ep qnn --device npu
(for step-by-step control: winml export dslim/bert-base-NER -o ./build/)
winml config →
Next: winml build dslim/bert-base-NER -c dslim-bert-base-NER_config.json -o ./build/
winml build →
Next: winml perf ./build/model.onnx --device npu
Pipeline B — Low-level, HuggingFace model
winml export <hf_model> →
Next: winml analyze ./build/model.onnx --ep qnn
winml analyze →
Next: winml optimize ./build/model.onnx -o ./build/
winml optimize →
Next: winml quantize ./build/optimized.onnx -o ./build/
winml quantize →
Next: winml compile ./build/quantized.onnx --ep qnn -o ./build/
winml compile →
Next: winml perf ./build/compiled.onnx --device npu
Pipeline B — Low-level, ONNX file input (pipeline starts at analyze)
winml analyze model.onnx →
Next: winml optimize model.onnx -o ./build/
(same hints from optimize onward as above)
Shared tail
winml perf →
Next: winml eval ./build/model.onnx --device npu
Design Notes
- ONNX input skips
inspectandexport. For ONNX file inputs Pipeline B starts atanalyze— no inspect or export step is shown. inspectonly applies to HF models. It surfaces Pipeline A (config) as the primary path and Pipeline B (export) as the advanced alternative.- Carry context forward. Hints use the actual model ID, output path, EP, and device from the current invocation — never generic placeholders.
- Respect skipped stages. If a stage was skipped (e.g. quantize skipped because model is already QDQ), the hint points to the next applicable step.
--no-hintsflag. Suppress next-step hints for CI / scripted use.winml flowrelationship. Thewinml flowguided pipeline (#442) is the automated version of these same sequences — the hints are the manual-mode equivalent and share the same step-ordering logic.
Acceptance Criteria
Pipeline A (HF, high-level):
-
winml inspect <hf_model>hints towinml configwith Pipeline B option noted -
winml confighints towinml buildwith the generated config file path -
winml buildhints towinml perfwith the final artifact path
Pipeline B (HF model, low-level):
-
winml exporthints towinml analyzewith the exported ONNX path -
winml analyzehints towinml optimize -
winml optimizehints towinml quantizewith the optimized ONNX path -
winml quantizehints towinml compilewith the quantized ONNX path -
winml compilehints towinml perfwith the compiled artifact path
Pipeline B (ONNX file input):
-
winml analyze <onnx_file>hints towinml optimize(no inspect/export shown) - Remaining steps (
optimize→quantize→compile→perf) hint identically to HF path
Shared:
-
winml perfhints towinml eval - All hints use actual runtime values — model ID, output path, EP, device
-
--no-hintsflag suppresses the hint block on any command - Skipped stages are omitted from hints (next applicable step shown)
Related
- #442 —
winml flowguided pipeline (automated version of both sequences) - #447 — positional model argument (hints should use positional form for readability)
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.