doc: fix zero-shot tutorial minor typo #1021
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: Unit tests | |
| on: | |
| push: | |
| branches: | |
| - main | |
| - v*-release | |
| - v*-pre | |
| pull_request: | |
| branches: | |
| - main | |
| - v*-pre | |
| workflow_dispatch: | |
| env: | |
| TRANSFORMERS_IS_CI: 1 | |
| HF_HUB_DISABLE_PROGRESS_BARS: 1 # The Transformers v5 weight loading progress bars heavily expand the logs | |
| HF_TOKEN: ${{ secrets.HF_TOKEN }} # Read token to avoid rate limits when downloading from the Hub | |
| permissions: {} | |
| jobs: | |
| test_sampling: | |
| permissions: | |
| contents: read | |
| name: Run unit tests | |
| strategy: | |
| matrix: | |
| python-version: ['3.9', '3.10', '3.11', '3.12', '3.13'] | |
| os: [ubuntu-latest, windows-latest] | |
| requirements: ['.[tests]'] | |
| include: | |
| # The oldest supported dependency versions, pinned in setup.py | |
| - python-version: '3.9' | |
| os: ubuntu-latest | |
| requirements: '.[compat_tests]' | |
| - python-version: '3.9' | |
| os: windows-latest | |
| requirements: '.[compat_tests]' | |
| # The last dependency generation before transformers v5 | |
| - python-version: '3.11' | |
| os: ubuntu-latest | |
| requirements: '.[compat_tests_v4]' | |
| - python-version: '3.11' | |
| os: windows-latest | |
| requirements: '.[compat_tests_v4]' | |
| fail-fast: false | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| - name: Setup Python environment | |
| uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@20cfd1bf945f4377ade1205e4dbc17946fc9a30d # v10.0.1 | |
| - name: Install dependencies | |
| run: | | |
| uv pip install '${{ matrix.requirements }}' '.[codecarbon]' --system | |
| python -m spacy download en_core_web_lg | |
| python -m spacy download en_core_web_sm | |
| - name: Run unit tests | |
| run: python -m pytest -v tests/ |