Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 3 additions & 27 deletions .github/workflows/checks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -131,40 +131,18 @@ jobs:
dir="$HOME/.cache/braintrust/livekit-server"
mkdir -p "$dir"
echo "BRAINTRUST_LIVEKIT_SERVER_DIR=$dir" >> "$GITHUB_ENV"
- name: Run nox tests (shard ${{ matrix.shard }}/6)
shell: bash
run: |
mise exec python@${{ matrix.python-version }} -- python ./py/scripts/nox-matrix.py ${{ matrix.shard }} 6 \
--exclude-static-checks \
--exclude-session-prefix test_transformers

transformers-py:
runs-on: ubuntu-24.04
timeout-minutes: 30
strategy:
fail-fast: false
# Serialize jobs so later Python versions can restore the model cache
# saved by the first job instead of downloading the same models in parallel.
max-parallel: 1
matrix:
python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"]
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: Setup Python environment
uses: ./.github/actions/setup-python-env
with:
python-version: ${{ matrix.python-version }}
- name: Cache Hugging Face models
uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
with:
path: ~/.cache/huggingface/hub
key: huggingface-transformers-${{ runner.os }}-${{ runner.arch }}-${{ matrix.python-version }}-${{ hashFiles('py/src/braintrust/integrations/transformers/test_transformers.py') }}
restore-keys: |
huggingface-transformers-${{ runner.os }}-${{ runner.arch }}-
- name: Test Transformers integration
- name: Run nox tests (shard ${{ matrix.shard }}/6)
shell: bash
run: |
mise exec -- uv run --project ./py nox -f ./py/noxfile.py -s test_transformers
mise exec python@${{ matrix.python-version }} -- python ./py/scripts/nox-matrix.py ${{ matrix.shard }} 6 \
--exclude-static-checks
Comment on lines +144 to +145

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Preserve serialized Transformers cache warmup

When the Hugging Face cache is cold—most notably on the first Windows run—the sharded matrix starts every Python/OS combination concurrently, so none can restore models saved by an earlier Python version. Checking checks.yaml and the parametrized test_transformers session in py/noxfile.py, up to eight jobs per OS can therefore fetch the same five models simultaneously, recreating the download stampede that the removed max-parallel: 1 explicitly prevented and risking Hugging Face throttling or CI timeouts; retain a serialized cache-warming/dedicated job before including these sessions in the shards.

AGENTS.md reference: AGENTS.md:L17-L21

Useful? React with 👍 / 👎.


adk-py:
uses: ./.github/workflows/adk-py-test.yaml
Expand Down Expand Up @@ -203,7 +181,6 @@ jobs:
- static_checks
- smoke
- nox
- transformers-py
- adk-py
- langchain-py
- upload-wheel
Expand All @@ -230,7 +207,6 @@ jobs:
check_result "static_checks" "${{ needs.static_checks.result }}"
check_result "smoke" "${{ needs.smoke.result }}"
check_result "nox" "${{ needs.nox.result }}"
check_result "transformers-py" "${{ needs['transformers-py'].result }}"
check_result "adk-py" "${{ needs['adk-py'].result }}"
check_result "langchain-py" "${{ needs['langchain-py'].result }}"
check_result "upload-wheel" "${{ needs['upload-wheel'].result }}"
Expand Down