Transformers version bump #347
Workflow file for this run
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
name: ExecuTorch E2E / Python - Test | |
on: | |
push: | |
branches: [main] | |
pull_request: | |
branches: [main] | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} | |
cancel-in-progress: true | |
jobs: | |
discover-tests: | |
runs-on: ubuntu-22.04 | |
outputs: | |
model_names: ${{ steps.set-matrix.outputs.model_names }} | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Find model tests | |
id: set-matrix | |
run: | | |
# Find all test files and extract model names correctly | |
MODEL_NAMES=$(find tests/models -name "test_modeling_*.py" -type f | sed 's|tests/models/test_modeling_||' | sed 's|\.py$||' | paste -sd "," -) | |
echo "model_names=[\"${MODEL_NAMES//,/\",\"}\"]" >> $GITHUB_OUTPUT | |
# Display all discovered models | |
echo "Discovered models:" | |
echo "$MODEL_NAMES" | tr ',' '\n' | sort | awk '{print "- " $0}' | |
run-tests: | |
needs: discover-tests | |
strategy: | |
fail-fast: false | |
matrix: | |
test-modeling: ${{ fromJson(needs.discover-tests.outputs.model_names) }} | |
executorch-version: ['0.6.0', 'nightly'] | |
python-version: ['3.11'] | |
os: [macos-15, ubuntu-22.04] | |
# Custom job name, now shortened and cleaner | |
name: ${{ matrix.test-modeling }} (et=${{ matrix.executorch-version }}, py=${{ matrix.python-version }}, ${{ matrix.os }}) | |
runs-on: ${{ matrix.os }} | |
env: | |
MODEL_NAME: ${{ matrix.test-modeling }} | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Setup Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v2 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install dependencies for ExecuTorch | |
run: | | |
pip install '.[tests]' | |
if [ "${{ matrix.executorch-version }}" == "nightly" ]; then | |
export NIGHTLY_VERSION=dev20250523 | |
pip install executorch==0.7.0.${NIGHTLY_VERSION} \ | |
torch==2.8.0.${NIGHTLY_VERSION} \ | |
torchvision==0.22.0.${NIGHTLY_VERSION} \ | |
torchaudio==2.6.0.${NIGHTLY_VERSION} \ | |
torchao==0.12.0.dev20250528 \ | |
--extra-index-url "https://download.pytorch.org/whl/nightly/cpu" | |
pip install transformers==4.52.4 | |
else | |
pip install executorch==${{ matrix.executorch-version }} | |
fi | |
pip list | |
- name: Run tests | |
run: | | |
RUN_SLOW=1 pytest tests/models/test_modeling_${{ matrix.test-modeling }}.py -s -vvvv --durations=0 --log-cli-level=INFO |