Skip to content

Commit

Permalink
Add nightly model tests against pytorch
Browse files Browse the repository at this point in the history
ghstack-source-id: 2ba43c22f12172c3b6acfe05e3c4b59f1b175935
Pull Request resolved: #1120
  • Loading branch information
kwen2501 committed May 29, 2024
1 parent 395801c commit d22532d
Show file tree
Hide file tree
Showing 3 changed files with 84 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/gpu_tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
- main
pull_request:
paths:
- '.github/workflows/**.yaml'
- '.github/workflows/gpu_tests.yaml'
- 'pippy/**'
- 'test/**'
- 'examples/**'
Expand Down
82 changes: 82 additions & 0 deletions .github/workflows/model_tests.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
name: Model Tests
# Run models in `examples` folder

# Run when any example is changed
on:
pull_request:
paths:
- '.github/workflows/model_tests.yaml'
- 'examples/**'

# Nightly run against pytorch nightly build
on:
schedule:
- cron: "30 11 * * *" # Everyday 11:30 am UTC, i.e. 4:30 am PST

defaults:
run:
shell: bash -l -eo pipefail {0}

jobs:
model_tests_4gpu:
runs-on: linux.g5.12xlarge.nvidia.gpu
strategy:
matrix:
python-version: ['3.10']
steps:
- name: Check out repo
uses: actions/checkout@v3
- name: Setup conda env
uses: conda-incubator/setup-miniconda@v2
with:
auto-update-conda: true
miniconda-version: "latest"
activate-environment: test
python-version: ${{ matrix.python-version }}
- name: Activate conda env
run: conda activate test
- name: Install dependencies
run: |
pip install --pre -r requirements.txt --find-links https://download.pytorch.org/whl/nightly/cu121/torch_nightly.html
- name: Install Transformers for getting models
run: pip install transformers
- name: Run GPT2
run: torchrun --nproc-per-node 4 examples/huggingface/pippy_gpt2.py
- name: Run BERT
run: torchrun --nproc-per-node 4 examples/huggingface/pippy_bert.py
- name: Run blenderbot
run: torchrun --nproc-per-node 4 examples/huggingface/pippy_blenderbot.py
- name: Run camemBert
run: torchrun --nproc-per-node 4 examples/huggingface/pippy_camemBert.py
- name: Run convBert
run: torchrun --nproc-per-node 4 examples/huggingface/pippy_convBert.py
- name: Run deberta
run: torchrun --nproc-per-node 4 examples/huggingface/pippy_deberta.py
- name: Run debertaV2
run: torchrun --nproc-per-node 4 examples/huggingface/pippy_debertaV2.py
- name: Run distilBert
run: torchrun --nproc-per-node 4 examples/huggingface/pippy_distilBert.py
- name: Run electra
run: torchrun --nproc-per-node 4 examples/huggingface/pippy_electra.py
- name: Run fnet
run: torchrun --nproc-per-node 4 examples/huggingface/pippy_fnet.py
- name: Run gptNeo
run: torchrun --nproc-per-node 4 examples/huggingface/pippy_gptNeo.py
- name: Run layoutLM
run: torchrun --nproc-per-node 4 examples/huggingface/pippy_layoutLM.py
- name: Run mbart
run: torchrun --nproc-per-node 4 examples/huggingface/pippy_mbart.py
- name: Run megatronBert
run: torchrun --nproc-per-node 4 examples/huggingface/pippy_megatronBert.py
- name: Run mobileBert
run: torchrun --nproc-per-node 4 examples/huggingface/pippy_mobileBert.py
- name: Run opt
run: torchrun --nproc-per-node 2 examples/huggingface/pippy_opt.py
- name: Run trOCR
run: torchrun --nproc-per-node 4 examples/huggingface/pippy_trOCR.py
- name: Run unet
run: torchrun --nproc-per-node 2 examples/huggingface/pippy_unet.py
- name: Run xlnet
run: torchrun --nproc-per-node 4 examples/huggingface/pippy_xlnet.py
- name: Test CPU init + GPU run
run: torchrun --nproc-per-node 4 examples/cpu_init/gpt2_cpu_init.py
2 changes: 1 addition & 1 deletion .github/workflows/pippy_tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
- main
pull_request:
paths:
- '.github/workflows/**.yaml'
- '.github/workflows/pippy_tests.yaml'
- 'pippy/**'
- 'test/**'
- 'examples/**'
Expand Down

0 comments on commit d22532d

Please sign in to comment.