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 }} permissions: contents: read jobs: check_tiny_models: name: Check tiny models runs-on: ubuntu-22.04 steps: - name: Checkout transformers uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1 with: fetch-depth: 2 persist-credentials: false - uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1 with: persist-credentials: false - name: Set up Python 3.10 uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0 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@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2 with: name: tiny_local_model_creation_reports path: tiny_local_models/reports