Skip to content

fix(build): honor CLI optimization bypass - #1401

Draft
Qiong Wu (qiowu) (DingmaomaoBJTU) wants to merge 2 commits into
microsoft:mainfrom
DingmaomaoBJTU:dingmaomaobjtu/fix-cli-skip-optimize
Draft

Qiong Wu (qiowu) (DingmaomaoBJTU) wants to merge 2 commits into
microsoft:mainfrom
DingmaomaoBJTU:dingmaomaobjtu/fix-cli-skip-optimize

Conversation

@DingmaomaoBJTU

Copy link
Copy Markdown
Collaborator

Summary

CLI-only control-correctness fix; no recipes, model-specific logic, new graph optimization pass, or speedup claim.

  • Consume skip_optimize at the actual single-model HF and direct-ONNX CLI sinks, then pass CLI skip OR config.skip_optimize to the existing _run_optimize_stage helper.
  • Retain the helper and its intermediate-copy/config behavior. The existing shared loop suppresses optimization and analyzer/autoconf re-optimization when bypass is requested.
  • Preserve configured raw-model FP16/static quantization, compilation, and finalization. Direct-ONNX prequantization remains graph-driven (QDQ/QOperator); an ordinary bypass does not mark a raw model prequantized or clear its quantization config.

Exactly two changed paths: the CLI build command (+4/-1) and its regression tests (+252). No library, recipe, dependency, lockfile, or skill changes.

Validation

  • Reviewed and shipped commit: 4da82cde6c93894199f00e108f80be13f5dfe3bd; parent/base: dcad2f4a29cb34af71d7b138bcafc4276a70a4ed. Fetched origin/main still matched this base before shipment; no rebase or new commit.
  • Retained causal regression evidence: 14 failed / 26 passed -> 40 passed, with identical selected test identities. Retained committed affected-scope JUnit/logs: 358 passed, 0 failures/errors/skips; rechecked against the exact reviewed source/test blobs and case set.
  • Fresh shipment check at the same commit: 40 passed, 115 deselected in 8.54 s, with no failures/errors/skips and the same 40 regression identities. Read-only Ruff check, Ruff format check, and Git whitespace checks passed.
  • Explicit Python 3.11.16, verified worktree source origins, existing package/overlay environment, offline mode, and no new dependencies. The tests use actual Click dispatch and stage helpers with tiny pytest-generated raw/QDQ/QOperator graphs; expensive payloads and host/UI boundaries are mocked.
  • Independent local assessment: LOCAL_READY, no critical/important introduced-code defect. Nonblocking artifact-finalization test-hardening feedback remains; this is not a GitHub approval. Independent post-PR review is still required.

Scope and limits

  • Composite CLI-flag fan-out is covered. Array/module CLI mode, outer composite config-only inheritance, and optimized-bundle generic controls are pre-existing exclusions, not fixed or claimed supported here.
  • No full-repository suite, real-model export/calibration/inference, numerical-quality, provider/hardware, or performance validation is claimed. This PR does not establish unrelated VitPose recipe quality or latency, and does not certify FP16/static-quantized model outputs.

Overlap and integration

Overlaps the CLI portion of #1370 by ssss141414 (observed head 3cd22269dfbfaac8baef63cb221c44c9e803af91). That draft combines multilingual recipes with a repair that bypasses the entire optimize-stage helper; this standalone fix instead preserves the existing helper contract.

Proposed disposition, if this fix is adopted: use this as the canonical CLI repair in place of #1370's overlapping code/test change, while keeping its model recipes separate or adapting them to depend on the canonical repair. This acknowledges the prior overlapping work; it does not claim agreement from that author or declare #1370 superseded. #1370 has not been edited, commented on, closed, rebased, or pushed by this shipment.

Coordinate ownership before landing either overlapping implementation; do not merge both unchanged. Keep this PR draft pending independent post-PR review and integration coordination.

Comment thread tests/unit/commands/test_build.py Fixed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants