update tutorials to use transformers integration #502
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: Verify tutorials generation | |
| on: | |
| pull_request: | |
| paths: | |
| - "tutorials/*.ipynb" | |
| - "index.toml" | |
| jobs: | |
| verify-markdown-generation: | |
| runs-on: ubuntu-slim | |
| steps: | |
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| - name: Setup Python and uv | |
| uses: astral-sh/setup-uv@37802adc94f370d6bfd71619e3f0bf239e1f3b78 # v7.6.0 | |
| with: | |
| python-version: "3.11" | |
| - name: Install dependencies | |
| env: | |
| UV_EXCLUDE_NEWER: P3D # reject packages uploaded within the last 3 days (supply chain protection) | |
| run: | | |
| uv venv | |
| uv pip install -r requirements.txt | |
| - name: Generate all tutorials | |
| run: | | |
| . .venv/bin/activate | |
| mkdir output | |
| python scripts/generate_markdowns.py --index index.toml --notebooks all --output ./output |