Check Tiny Models #1
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: Check Tiny Models | |
| on: | |
| push: | |
| branches: | |
| - check_tiny_models* | |
| repository_dispatch: | |
| schedule: | |
| - cron: "0 2 * * *" | |
| env: | |
| TOKEN: ${{ secrets.TRANSFORMERS_HUB_BOT_HF_TOKEN }} | |
| HF_TOKEN: ${{ secrets.HF_HUB_READ_TOKEN }} | |
| jobs: | |
| check_tiny_models: | |
| name: Check tiny models | |
| runs-on: ubuntu-22.04 | |
| steps: | |
| - name: Checkout transformers | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 2 | |
| - uses: actions/checkout@v4 | |
| - name: Set up Python 3.10 | |
| uses: actions/setup-python@v5 | |
| with: | |
| # Semantic version range syntax or exact version of a Python version | |
| python-version: '3.10' | |
| # Optional - x64 or x86 architecture, defaults to x64 | |
| architecture: 'x64' | |
| - name: Install | |
| run: | | |
| sudo apt-get -y update && sudo apt-get install -y libsndfile1-dev espeak-ng cmake | |
| pip install --upgrade pip | |
| python -m pip install -U .[dev] | |
| # For `FastSpeech2ConformerConfig` and `FastSpeech2ConformerWithHifiGanConfig` | |
| python -m pip install g2p-en | |
| # For `Pop2PianoConfig` | |
| python -m pip install essentia==2.1b6.dev1034 | |
| # For `mamba` type models to avoid the error `self._specs = frozenset(specifiers) #TypeError: 'int' object is not iterable` | |
| python -m pip install -U "kernels>=0.12.2" "einops" | |
| # For `Pop2PianoProcessor` (otherwise multiprocess error with `Placeholder` unpickable issue) | |
| python -m pip install -U "pretty_midi" | |
| - name: Create all tiny models (locally) | |
| run: | | |
| python utils/create_dummy_models.py tiny_local_models --all --num_workers 4 | |
| - name: Local tiny model reports artifacts | |
| if: ${{ always() }} | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: tiny_local_model_creation_reports | |
| path: tiny_local_models/reports |