Repository navigation
ci: split offline checks from pinned model parity tests - #118
Merged
Merged
Conversation
hallerite
marked this pull request as ready for review
October 29, 2026 02:16
ApprovabilityVerdict: Approved at Macroscope's review found this PR approvable — This separates offline compatibility checks from pinned model parity tests and adds optional tokenizer revision selection without weakening trusted-code pins. Effects are concentrated in CI and test assets, with existing tokenizer defaults preserved. Notes:
You can add or adjust custom eligibility rules. 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.
Model tests depend on changing upstream assets, and CI repeats the expensive parity suite across every supported Python version. Pin the test assets and separate offline compatibility checks from model parity tests to make failures reproducible and avoid repeating the full suite four times.
Changes
Validation
All three local lanes passed with model downloads disabled:
The offline lane also passed with an empty asset cache and network sockets blocked. Collection checks confirm all 14,654 cases belong to exactly one lane. Ruff, pre-commit, type checks, and workflow/config parsing passed.
GitHub Actions: all four offline jobs, multimodal parity, style/type checks, and CodeQL have passed. Text parity is still running.
Note
Split CI into offline unit tests and pinned model parity test jobs
uv sync, and selects tests not markedmodel.modelandmultimodalpytest markers in pyproject.toml so pytest recognizes them.load_tokenizerin base.py with a keyword-onlyrevisionargument. It raisesValueErrorif the revision differs from a trusted revision already set in the load kwargs, otherwise passes it through.uv.locknow trigger the workflow; workflow permissions are nowcontents: read.Macroscope summarized e080f90.
Note
Medium Risk
Adds a public
load_tokenizerrevision knob tied to trusted-remote-code rules, and CI now downloads pinned Hub assets for large parity suites—behavior and infra change, not a core rendering logic rewrite.Overview
This PR restructures CI and test harness so fast, network-free checks run separately from heavy Hugging Face parity work, and model tests load immutable commit SHAs instead of whatever is on the Hub today.
GitHub Actions now has an offline unit job on Python 3.11–3.14 (
HF_HUB_OFFLINE/TRANSFORMERS_OFFLINE,pytest -m "not model",uv sync --locked) and a model parity job on 3.13 only, split into text (model and not multimodal) and multimodal (model and multimodal) with Hugging Face cache keyed ontests/model_assets.py. Workflow triggers also includeuv.lock.Pytest registers
modelandmultimodalmarkers; parametrized parity suites and most real-tokenizer tests are tagged so collection cleanly partitions the ~14k-case matrix.Pinned assets: new
tests/model_assets.pymaps ~53 public models to revision SHAs and exposesload_test_tokenizer/load_test_processor. Tests switch fromload_tokenizer+ “skip if not cached” to these helpers; public models are expected to download at pinned revisions in CI, while the optional private Nemotron VLM still skips unless metadata is cached locally.Library change:
load_tokenizer(..., revision=...)forwards a pin tofrom_pretrainedbut raisesValueErrorif callers try to override a Kimi trusted remote-code revision.Reviewed by Cursor Bugbot for commit e080f90. Bugbot is set up for automated code reviews on this repo. Configure here.