Cache Hugging Face tokenizers in CI#1542
Merged
Merged
Conversation
ApprovabilityVerdict: Approved CI-only change that adds caching for Hugging Face tokenizers to speed up test runs. Standard GitHub Actions caching pattern with no impact on production code or runtime behavior. You can customize Macroscope's approvability policy. Learn more. |
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
Context
This is the smaller follow-up for the Hugging Face 429 flake observed on #1529. It keeps the existing Test workflow topology and avoids the separate cache-warm job.
Validation
Note
Low Risk
Workflow-only changes (cache path, secrets env, cache step) with no application runtime or auth logic changes.
Overview
The Test workflow now pins Hugging Face artifacts under a workspace-local
HF_HOMEand restores/saves that directory withactions/cache, keyed offuv.lockand the renderer test files that drive tokenizer downloads.The main Verifiers matrix job also receives
HF_TOKENfrom repo secrets so Hub access is less likely to hit public rate limits (addressing CI 429 flakes on tokenizer loads).Reviewed by Cursor Bugbot for commit 1811e61. Bugbot is set up for automated code reviews on this repo. Configure here.
Note
Cache Hugging Face tokenizers in CI to speed up test runs
Adds a caching step in test.yml that stores and restores the Hugging Face tokenizer directory (
HF_HOME) across CI runs. The cache key is derived from the OS and hashes ofuv.lockand the relevant test files, with a fallback restore key.HF_TOKENis also now exposed to the job via repository secrets.Macroscope summarized 1811e61.