Fix flaky huggingface in tests by caching the tokenizer
This commit is contained in:
parent
1e22937482
commit
35bed89717
2 changed files with 11 additions and 0 deletions
7
.github/workflows/test.yml
vendored
7
.github/workflows/test.yml
vendored
|
|
@ -59,6 +59,13 @@ jobs:
|
||||||
python-version-file: "pyproject.toml"
|
python-version-file: "pyproject.toml"
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: uv sync --all-extras
|
run: uv sync --all-extras
|
||||||
|
- name: Cache HuggingFace models
|
||||||
|
uses: actions/cache@v4
|
||||||
|
with:
|
||||||
|
path: ~/.cache/huggingface
|
||||||
|
key: huggingface-${{ runner.os }}-qwen-tokenizer-v1
|
||||||
|
- name: Pre-download tokenizer
|
||||||
|
run: uv run python -c "from transformers import AutoTokenizer; AutoTokenizer.from_pretrained('Qwen/Qwen3-Embedding-0.6B')"
|
||||||
- name: Run tests with coverage
|
- name: Run tests with coverage
|
||||||
run: uv run pytest -m "not integration" --cov=haiku --cov-report=xml
|
run: uv run pytest -m "not integration" --cov=haiku --cov-report=xml
|
||||||
- name: Upload coverage to Codecov
|
- name: Upload coverage to Codecov
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,10 @@
|
||||||
# Changelog
|
# Changelog
|
||||||
## [Unreleased]
|
## [Unreleased]
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
|
||||||
|
- **CI**: Cache HuggingFace tokenizer to prevent flaky test failures when HuggingFace has transient outages
|
||||||
|
|
||||||
## [0.28.0] - 2026-01-31
|
## [0.28.0] - 2026-01-31
|
||||||
|
|
||||||
### Changed
|
### Changed
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue