Repository navigation
[ET-VK][CI] Retry rate-limited HF snapshot downloads - #24002
Merged
Merged
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/24002
Note: Links to docs will display an error until the docs builds have been completed. ❌ 2 New Failures, 1 Pending, 2 Unrelated FailuresAs of commit 7e86f65 with merge base c8b72ff ( NEW FAILURES - The following jobs have failed:
FLAKY - The following jobs failed but were likely due to flakiness present on trunk:
This comment was automatically generated by Dr. CI and updates every 15 minutes. |
shoumikhin
approved these changes
Oct 20, 2026
SS-JIA
force-pushed
the
ssjia/vulkan-hf-rate-limit
branch
from
October 20, 2026 07:00
b9f4837 to
acc5869
Compare
Summary: The Vulkan LLM job failed on PR #23892 when Hugging Face returned HTTP 429 while listing the pinned Phi-4-mini checkpoint. Qwen and five Llama recipes passed. Hub repository pagination bypasses its existing HTTP backoff helper. Retry snapshot downloads up to five times for HTTP 429. Honor Retry-After (seconds or HTTP-date) and exhausted RateLimit quota resets, with a one-second rounding margin. Use bounded exponential waits when reset headers are absent or invalid. Preserve pinned download arguments, checksum validation, and path-only stdout; retry messages go to stderr. Other errors still fail promptly. Read hf_download.py first, then test_export_vulkan_llm.py. Regression coverage uses the real Hub repository-listing client against a local HTTP server that returns 429 followed by success, and checks retry exhaustion/error propagation. Authored with OpenAI Codex. Test Plan: ## Observed Results | Correctness validation | Environment | Result | |---|---|---| | New retry tests against parent helper | Python 3.11, Hub 1.33.0, local HTTP fixture | 9 expected failures, 4 passed | | Retry/header/error/checksum subset | Python 3.11, Hub 1.33.0 (failed CI version) | 16 passed, 0 failed, 13 deselected | | Same subset with older Hub | Python 3.11, Hub 0.36.2 | 16 passed, 0 failed, 13 deselected | | Lintrunner on both changed files | macOS | Passed | | Seven-model NVIDIA workflow with this fix | GitHub CI | Pending at publication | | Performance validation | Result | |---|---| | Runtime/operator performance and end-to-end A/B | Not run; download retry change, no performance claim | ## Reproduction Guide ### Checkout and dependency setup Install Git and Python 3.11. These focused HTTP/download tests need no GPU, model checkpoint, native build, or full ExecuTorch installation. ```bash git clone https://github.com/pytorch/executorch.git cd executorch git checkout ssjia/vulkan-hf-rate-limit python3.11 -m venv .venv-hf-retry .venv-hf-retry/bin/python -m pip install pytest pyyaml httpx==0.28.1 huggingface_hub==1.33.0 ``` ### Fixed implementation Run the retry tests and existing pinned-download/checksum guards. The conftest cutoff isolates HTTP tests from the repository-wide PyTorch fixture. A local HTTP server emits the protocol responses; sleeps are recorded without waiting. ```bash .venv-hf-retry/bin/python -m pytest --confcutdir=.ci/scripts/tests -q .ci/scripts/tests/vulkan/test_export_vulkan_llm.py -k 'rate_limit or other_http_errors or existing_hf_download' ``` ### Parent reproducer Copy the current tests into a temporary directory and retrieve the parent helper. The retry cases fail because the parent aborts on the first 429. This keeps the checked-out implementation intact. ```bash ET_HF_PARENT=$(mktemp -d) mkdir -p "$ET_HF_PARENT/.ci/scripts/tests/vulkan" "$ET_HF_PARENT/examples/models/llama" cp .ci/scripts/tests/vulkan/test_export_vulkan_llm.py "$ET_HF_PARENT/.ci/scripts/tests/vulkan/test_export_vulkan_llm.py" git show HEAD^:examples/models/llama/hf_download.py > "$ET_HF_PARENT/examples/models/llama/hf_download.py" .venv-hf-retry/bin/python -m pytest --confcutdir="$ET_HF_PARENT/.ci/scripts/tests" -q "$ET_HF_PARENT/.ci/scripts/tests/vulkan/test_export_vulkan_llm.py" -k 'rate_limit or other_http_errors' ``` ### Older Hub compatibility ```bash .venv-hf-retry/bin/python -m pip install huggingface_hub==0.36.2 .venv-hf-retry/bin/python -m pytest --confcutdir=.ci/scripts/tests -q .ci/scripts/tests/vulkan/test_export_vulkan_llm.py -k 'rate_limit or other_http_errors or existing_hf_download' ``` ### Lint ```bash python3.11 -m pip install lintrunner lintrunner-adapters lintrunner init lintrunner lint --output oneline examples/models/llama/hf_download.py .ci/scripts/tests/vulkan/test_export_vulkan_llm.py ``` ### GPU workflow The existing Vulkan workflow installs dependencies, builds the runner, then exports/tests all seven pinned recipes on NVIDIA. Check its job and download the vulkan-llm-e2e artifact to inspect results.tsv and per-model download logs. The regression's failing run is internet-accessible: https://github.com/pytorch/executorch/actions/runs/39289788119/job/118187613858 No runtime performance validation was run. Reviewers:
SS-JIA
force-pushed
the
ssjia/vulkan-hf-rate-limit
branch
from
October 20, 2026 15:53
acc5869 to
7e86f65
Compare
This branch was successfully deployed
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.
Summary
Fix the Vulkan LLM job's Hugging Face HTTP 429 failure seen on PR #23892. Snapshot downloads now retry up to five times, respecting Retry-After and exhausted RateLimit quota resets. A one-second margin avoids rounded reset times; missing/invalid headers use exponential waits capped at five minutes. Other errors still propagate, and retry logs use stderr.
Review hf_download.py, then its regression tests in test_export_vulkan_llm.py. The tests exercise the actual Hub repository-listing client against a local HTTP server, plus bounded exhaustion and checksum/error guards.
Authored with OpenAI Codex.
Validation
Full reproduction commands are in the commit Test Plan.
URL lint follow-up
Synthetic HTTP-error request fixtures now use the reserved example.com domain. The exact URL checker returned HTTP 200 for both entries, seven affected tests passed, and CI URL lint passed.