Merge pull request #268 from ggozad/chore/fix-flaky-hf-tests

Fix flaky huggingface in tests by caching the tokenizer
This commit is contained in:
Yiorgis Gozadinos 2026-01-31 12:24:16 +02:00 committed by GitHub
commit b6431322cf
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 11 additions and 0 deletions

View file

@ -59,6 +59,13 @@ jobs:
python-version-file: "pyproject.toml"
- name: Install dependencies
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
run: uv run pytest -m "not integration" --cov=haiku --cov-report=xml
- name: Upload coverage to Codecov

View file

@ -1,6 +1,10 @@
# Changelog
## [Unreleased]
### Fixed
- **CI**: Cache HuggingFace tokenizer to prevent flaky test failures when HuggingFace has transient outages
## [0.28.0] - 2026-01-31
### Changed