Optimum neuron / Test INF2 Transformers inference & pipelines (slow) #298
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: Optimum neuron / Test INF2 Transformers inference & pipelines (slow) | |
| on: | |
| push: | |
| branches: [ main ] | |
| paths: | |
| - 'pyproject.toml' | |
| - 'optimum/commands/export/neuronx.py' | |
| - 'optimum/exporters/**.py' | |
| - 'optimum/neuron/cache/**.py' | |
| - 'optimum/neuron/modeling_base.py' | |
| - 'optimum/neuron/modeling_traced.py' | |
| - 'optimum/neuron/models/inference/bert/**.py' | |
| - 'optimum/neuron/models/inference/clip/**.py' | |
| - 'optimum/neuron/models/inference/t5/**.py' | |
| - 'optimum/neuron/models/inference/whisper/**.py' | |
| - 'optimum/neuron/models/inference/yolos/**.py' | |
| - 'optimum/neuron/pipelines/transformers/**.py' | |
| - 'optimum/neuron/utils/**.py' | |
| - 'tests/inference/transformers/**.py' | |
| - '.github/workflows/test_inf2_slow.yml' | |
| pull_request: | |
| branches: [ main ] | |
| paths: | |
| - 'pyproject.toml' | |
| - 'optimum/commands/export/neuronx.py' | |
| - 'optimum/exporters/**.py' | |
| - 'optimum/neuron/cache/**.py' | |
| - 'optimum/neuron/modeling_base.py' | |
| - 'optimum/neuron/modeling_traced.py' | |
| - 'optimum/neuron/models/inference/bert/**.py' | |
| - 'optimum/neuron/models/inference/clip/**.py' | |
| - 'optimum/neuron/models/inference/t5/**.py' | |
| - 'optimum/neuron/models/inference/whisper/**.py' | |
| - 'optimum/neuron/models/inference/yolos/**.py' | |
| - 'optimum/neuron/pipelines/transformers/**.py' | |
| - 'optimum/neuron/utils/**.py' | |
| - 'tests/inference/transformers/**.py' | |
| - '.github/workflows/test_inf2_slow.yml' | |
| schedule: | |
| - cron: "0 1 * * *" # every day at 01:00 UTC | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.head_ref || github.ref_name || github.run_id }} | |
| cancel-in-progress: true | |
| jobs: | |
| sanity: | |
| name: Sanity | |
| runs-on: ubuntu-22.04 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Run sanity check | |
| uses: ./.github/actions/sanity-check | |
| with: | |
| hf_token: ${{ secrets.HF_TOKEN_OPTIMUM_NEURON_CACHE }} | |
| do-the-job: | |
| name: Run INF2 tests | |
| needs: sanity | |
| runs-on: | |
| group: aws-inf2-8xlarge | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Install Neuronx runtime | |
| uses: ./.github/actions/install_neuronx_runtime | |
| - name: Setup virtual environment | |
| uses: ./.github/actions/setup_venv | |
| - name: Install datasets dependencies | |
| run: | | |
| sudo apt-get install ffmpeg -y | |
| source aws_neuron_venv_pytorch/bin/activate | |
| uv pip install datasets[audio] | |
| - name: Run transformers inference slow tests | |
| run: | | |
| source aws_neuron_venv_pytorch/bin/activate | |
| export HF_TOKEN=${{ secrets.HF_TOKEN_OPTIMUM_NEURON_CI }} | |
| pytest -m slow tests/inference/transformers/test_modeling.py |