ci: add Lightning registry fallback for gated tokenizer tests#2271
Open
bhimrazy wants to merge 6 commits into
Open
ci: add Lightning registry fallback for gated tokenizer tests#2271bhimrazy wants to merge 6 commits into
bhimrazy wants to merge 6 commits into
Conversation
When HF_TOKEN is absent, gated repos now resolve from the public Lightning Model Registry mirror (lightning-ai/oss-litgpt) instead of skipping. The non-compiler leg of the Lightning workflow runs the tokenizer sweep explicitly with RUN_ONLY_CUDA_TESTS=0 and LITGPT_TOKENIZER_REGISTRY_FALLBACK=1 after the main pytest run. litmodels is added to the test extra. The fallback is off by default so GitHub Actions CPU tests are unchanged.
bhimrazy
requested review from
andyland,
k223kim,
lianakoleva and
t-vi
as code owners
June 24, 2026 01:58
The mirror download is swallowed by a bare except, so gated repos skip silently in CI even with the fallback enabled. Print the mirror name, the result, and any exception, and run the tokenizer step with -s -rs so the output and skip reasons are visible in the logs.
bhimrazy
force-pushed
the
ci/tokenizer-registry-fallback
branch
from
June 24, 2026 08:44
25b2a7b to
6137701
Compare
Collaborator
Author
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.

What does this PR do?
Follows up on #2268 (Phase 1): restores gated-tokenizer test coverage by falling back to the public Lightning Model Registry mirror (
lightning-ai/oss-litgpt) whenHF_TOKENis absent. Public mirrors download anonymously via guest login — no secrets needed.Changes:
tests/test_tokenizer.py— on a gated HF failure, falls back to the registry mirror (name derived from the HF repo slug) and loads the tokenizer from local files. Off by default; enabled withLITGPT_TOKENIZER_REGISTRY_FALLBACK=1..lightning/workflows/tests.yaml— non-compiler leg runstests/test_tokenizer.pywithRUN_ONLY_CUDA_TESTS=0and the fallback enabled after the main pytest run.pyproject.toml— addslitmodels>=0.1.8to thetestextra.