Repository navigation
Remove Hugging Face download dependency from test_dynamic_quantization_subgraph - #32443
Merged
Merged
Conversation
|
Azure Pipelines: There may be pipelines that require an authorized user to comment /azp run to run. |
Co-authored-by: tianleiwu <30328909+tianleiwu@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix flaky macOS CI failure in dynamic quantization subgraph test
Remove Hugging Face download dependency from test_dynamic_quantization_subgraph
Sep 4, 2026
Tianlei Wu (tianleiwu)
marked this pull request as ready for review
September 4, 2026 19:21
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
The deterministic fixture preserves the intended coverage, with no unresolved issues.
Pull request overview
Replaces a flaky Hugging Face model download with a deterministic local ONNX fixture while preserving subgraph quantization coverage.
Changes:
- Builds a merged-decoder-like
Ifmodel locally. - Removes the external network dependency.
- Retains initializer-hoisting assertions.
File summaries
| File | Description |
|---|---|
onnxruntime/test/python/quantization/test_subgraph.py |
Adds the local fixture and uses it in the quantization test. |
Review details
- Files reviewed: 1/1 changed files
- Comments generated: 0
- Review effort level: Balanced
💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Tianlei Wu (tianleiwu)
enabled auto-merge (squash)
September 4, 2026 21:11
Justin Chu (justinchuby)
approved these changes
Sep 4, 2026
Contributor
|
FYI you may also use the onnx textual format to simplify the fixture code |
adrastogi
pushed a commit
that referenced
this pull request
Oct 1, 2026
…n_subgraph (#32443) Backport the local ONNX fixture so the shared quantization test no longer depends on Hugging Face certificate trust in release CI. (cherry picked from commit 781a325) Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: tianleiwu <30328909+tianleiwu@users.noreply.github.com> Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
This was referenced Oct 5, 2026
52 tasks done
This was referenced Oct 12, 2026
Open
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
test_dynamic_quantization_subgraphdownloadeddecoder_model_merged.onnxfromhuggingface.coat test time and only caughturllib.error.HTTPError. DNS/connection failures raise the broaderurllib.error.URLError, which escaped and failed CI (e.g. macOS job 99624951799, run 33433704903).No trustworthy Microsoft/ONNX-Runtime-controlled GitHub copy of the exact unquantized model exists, so instead of adding a broader exception handler around a network call, the test now builds a minimal ONNX fixture locally, removing the network dependency entirely.
_make_merged_decoder_like_model()constructs a small model with a top-level float initializershared.weight_merged_0consumed by aGathernode inside each branch (then_branch/else_branch) of anIfnode — reproducing the structural property under test (outer-scope weight sharing across nested subgraphs), matching the real merged T5 decoder's with-past/without-past branches.extra_options={"EnableSubgraph": True}still must hoistshared.weight_merged_0_quantized/shared.weight_merged_0_scaleto the top-level graph and must not leakshared.weight*initializers into subgraphs.Motivation and Context
Eliminates a flaky, network-dependent CI failure and makes the test deterministic, while still covering the intended subgraph-quantization initializer-hoisting behavior.