Skip to content

[winml quantize] [P0] --precision banana silently falls back to defaults, prints "Success!", exits 1 #555

@zhenchaoni

Description

@zhenchaoni

Severity: P0
Command: winml quantize


Category: Input Validation — reject unknown values at parse time; do not contradict the exit code.

Repro:

uv run winml quantize -m temp\cli-audit\resnet.onnx --precision banana -o temp\ux\bad.onnx

Actual:

Precision: banana          ← lying — actually used uint8/uint8
Weight type: uint8
Activation type: uint8
Success! Model quantized
QDQ nodes inserted: 256

Followed by two near-duplicate ORT WARNING lines (~7 s apart). Exit code 1 despite the Success! line in stdout.

Expected: Declare --precision as click.Choice([auto, fp32, fp16, int8, int16, w4a16, w8a8, w8a16]). Fail at parse time:

Error: Invalid value for --precision: 'banana' is not one of [auto, fp32, fp16, int8, int16, w4a16, w8a8, w8a16].

Exit 2.

Why it matters: Three things wrong at once: (a) the flag value is silently ignored; (b) stdout says "Success!"; (c) exit code is 1. Any one of those is a P1; together they form a P0.

Metadata

Metadata

Assignees

Labels

P0Critical — blocking, crash, data lossQDQQDQ quantizationbugSomething isn't workingqualityUse for quality control related issuestriagedIssue has been triaged

Type

No fields configured for Bug.

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions