microsoft / microsoft/winml-cli

Each pipeline command should suggest the next step with the exact command to run

Open
#448 0 comments 0 reactions 2 assignees View on GitHub

@fenghuaxueyue98 is already working on this.

Since May 29, 2026.

dev experience P2 triaged
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 inspect and export. For ONNX file inputs Pipeline B starts at analyze — no inspect or export step is shown.
  • inspect only 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-hints flag. Suppress next-step hints for CI / scripted use.
  • winml flow relationship. The winml flow guided 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 to winml config with Pipeline B option noted
  • winml config hints to winml build with the generated config file path
  • winml build hints to winml perf with the final artifact path

Pipeline B (HF model, low-level):

  • winml export hints to winml analyze with the exported ONNX path
  • winml analyze hints to winml optimize
  • winml optimize hints to winml quantize with the optimized ONNX path
  • winml quantize hints to winml compile with the quantized ONNX path
  • winml compile hints to winml perf with the compiled artifact path

Pipeline B (ONNX file input):

  • winml analyze <onnx_file> hints to winml optimize (no inspect/export shown)
  • Remaining steps (optimizequantizecompileperf) hint identically to HF path

Shared:

  • winml perf hints to winml eval
  • All hints use actual runtime values — model ID, output path, EP, device
  • --no-hints flag suppresses the hint block on any command
  • Skipped stages are omitted from hints (next applicable step shown)

Related

  • #442 — winml flow guided pipeline (automated version of both sequences)
  • #447 — positional model argument (hints should use positional form for readability)

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.