Fix CUDA CI: HF writes fail on read-only /mnt/hf_cache (HF_TOKEN + writable HF_HOME)#20782
Merged
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/20782
Note: Links to docs will display an error until the docs builds have been completed. ❌ 3 New FailuresAs of commit 3d7cf15 with merge base 6018283 ( NEW FAILURES - The following jobs have failed:
This comment was automatically generated by Dr. CI and updates every 15 minutes. |
This PR needs a
|
…cache) The CUDA export/benchmark jobs on main fail in the Setup Huggingface step: + hf auth login --token *** Token is valid (permission: read). OSError: [Errno 30] Read-only file system: '/mnt/hf_cache/stored_tokens' The token itself is valid. hf auth login validates it, then tries to persist it to HF_HOME (which these ARC/k8s runners point at the read-only /mnt/hf_cache mount) and crashes, so the job exits non-zero. Replace 'hf auth login --token' with 'export HF_TOKEN' in the CUDA workflows (cuda.yml x2, cuda-perf.yml, cuda-windows.yml). huggingface_hub and transformers read HF_TOKEN directly, so authentication works without writing a token file to the read-only cache.
a0fc49e to
415786e
Compare
OSDC runners now mount a shared, read-only HF cache at /mnt/hf_cache and
default HF_HOME to it. executorch's CUDA jobs write to the HF cache (token,
model + tokenizer downloads via hf_hub_download / snapshot_download / optimum),
so they now fail with:
OSError: [Errno 30] Read-only file system: '/mnt/hf_cache/...'
Point HF_HOME at a writable ${RUNNER_TEMP}/hf_cache at the top of each CUDA
export/benchmark script (before the parakeet/dinov2 paths that skip the HF
setup block but still call hf_hub_download).
15059cf to
5976cf4
Compare
test-model-cuda-e2e (cuda.yml) and benchmark-cuda (cuda-perf.yml) run .ci/scripts/test_model_e2e.sh, which downloads a sample dataset via datasets.load_dataset -> hf_hub_download, writing to the HF cache. They were missing the HF_HOME redirect, so they still failed with: OSError: [Errno 30] Read-only file system: '/mnt/hf_cache/hub/datasets--...' Set the writable HF_HOME in these two jobs too.
The cuda-windows export job runs via 'docker exec' on an EC2 runner, where
RUNNER_TEMP (/home/ec2-user/.../_work/_temp) is not writable inside the
container, so 'mkdir -p ${RUNNER_TEMP}/hf_cache' fails with Permission denied.
ARC pods (the other CUDA jobs) can write RUNNER_TEMP. Try RUNNER_TEMP first and
fall back to /tmp/hf_cache when it isn't writable, so the writable HF_HOME
redirect works in both infra types.
JacobSzwejbka
approved these changes
Jul 8, 2026
digantdesai
approved these changes
Jul 8, 2026
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
Since pytorch/pytorch#188654 (landed 2026-07-03), the OSDC runner fleet mounts a shared, read-only HuggingFace cache at
/mnt/hf_cacheand defaultsHF_HOMEto it (to share a pre-seeded, S3-backed model cache). executorch's CUDA jobs were never adapted, so every HF write now lands on the read-only mount and fails:This broke the CUDA CI (
export-model-cuda-artifact,benchmark-cuda,export-model-cuda-windows-artifact,test-cuda-pybind) starting Jul 3. pytorch/pytorch updated its own workflows in the same PR (use the read-only mount only inTRANSFORMERS_OFFLINEmode, otherwise download into a writable${RUNNER_TEMP}/hf_cache); this PR does the equivalent for executorch.