Skip to content

Commit

Permalink
ci: isolate LLM tests
Browse files Browse the repository at this point in the history
These tests are taking some time, so it is better to have them
separated.
  • Loading branch information
dacorvo committed Feb 5, 2025
1 parent 4c624fc commit 1128d75
Show file tree
Hide file tree
Showing 2 changed files with 52 additions and 5 deletions.
6 changes: 1 addition & 5 deletions .github/workflows/test_inf2.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,11 +53,7 @@ jobs:
run: |
source aws_neuron_venv_pytorch/bin/activate
HF_TOKEN=${{ secrets.HF_TOKEN_OPTIMUM_NEURON_CI }} pytest -m is_inferentia_test tests/cli
- name: Run decoder tests
run: |
source aws_neuron_venv_pytorch/bin/activate
HF_TOKEN=${{ secrets.HF_TOKEN_OPTIMUM_NEURON_CI }} pytest -m is_inferentia_test tests/decoder
- name: Run other generation tests
- name: Run non-llm generation tests
run: |
source aws_neuron_venv_pytorch/bin/activate
HF_TOKEN=${{ secrets.HF_TOKEN_OPTIMUM_NEURON_CI }} pytest -m is_inferentia_test --ignore=tests/generation/test_parallel.py tests/generation
Expand Down
51 changes: 51 additions & 0 deletions .github/workflows/test_inf2_llm.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: Optimum neuron / Test INF2 LLM

on:
push:
branches: [ main ]
paths:
- "setup.py"
- "optimum/**.py"
- ".github/workflows/test_inf2_llm.yml"
pull_request:
branches: [ main ]
paths:
- "setup.py"
- "optimum/**.py"
- ".github/workflows/test_inf2_llm.yml"

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true

jobs:
do-the-job:
name: Run INF2 LLM tests
runs-on:
group: aws-inf2-8xlarge
steps:
- name: Install Neuron runtime
run: |
. /etc/os-release
sudo tee /etc/apt/sources.list.d/neuron.list > /dev/null <<EOF
deb https://apt.repos.neuron.amazonaws.com ${VERSION_CODENAME} main
EOF
wget -qO - https://apt.repos.neuron.amazonaws.com/GPG-PUB-KEY-AMAZON-AWS-NEURON.PUB | sudo apt-key add -
sudo apt-get update -y
sudo apt-get install aws-neuronx-tools=2.19.0.0 aws-neuronx-runtime-lib=2.22.19.0-5856c0b42 aws-neuronx-collectives=2.22.33.0-d2128d1aa -y
export PATH=/opt/aws/neuron/bin:$PATH
- name: Checkout
uses: actions/checkout@v2
- name: Install python dependencies
run: |
sudo apt install python3-venv python3-dev -y
python3 -m venv aws_neuron_venv_pytorch
source aws_neuron_venv_pytorch/bin/activate
python -m pip install -U pip
pip install --upgrade setuptools==69.5.1
python -m pip config set global.extra-index-url https://pip.repos.neuron.amazonaws.com
python -m pip install .[neuronx,tests]
- name: Run decoder tests
run: |
source aws_neuron_venv_pytorch/bin/activate
HF_TOKEN=${{ secrets.HF_TOKEN_OPTIMUM_NEURON_CI }} pytest -m is_inferentia_test tests/decoder

0 comments on commit 1128d75

Please sign in to comment.