mirror of
https://github.com/hpcaitech/ColossalAI.git
synced 2026-03-18 19:03:50 +00:00
53 lines
1.4 KiB
YAML
53 lines
1.4 KiB
YAML
name: Run ChatGPT unit tests
|
|
|
|
on:
|
|
pull_request:
|
|
types: [synchronize, opened, reopened]
|
|
paths:
|
|
- 'applications/ColossalChat/coati/**'
|
|
- 'applications/ColossalChat/requirements.txt'
|
|
- 'applications/ColossalChat/setup.py'
|
|
- 'applications/ColossalChat/tests/**'
|
|
- 'applications/ColossalChat/pytest.ini'
|
|
|
|
jobs:
|
|
tests:
|
|
name: Run ChatGPT unit tests
|
|
if: |
|
|
github.event.pull_request.draft == false &&
|
|
github.base_ref == 'main' &&
|
|
github.event.pull_request.base.repo.full_name == 'hpcaitech/ColossalAI'
|
|
runs-on: [self-hosted, ubuntu-latest]
|
|
container:
|
|
image: image-cloud.luchentech.com/hpcaitech/pytorch-cuda:2.2.2-12.1.0
|
|
options: --gpus all --rm -v /data/scratch/examples-data:/data/scratch/examples-data
|
|
timeout-minutes: 180
|
|
defaults:
|
|
run:
|
|
shell: bash
|
|
steps:
|
|
- name: Checkout ColossalAI
|
|
uses: actions/checkout@v2
|
|
|
|
- name: Install ChatGPT
|
|
env:
|
|
CFLAGS: "-O1"
|
|
CXXFLAGS: "-O1"
|
|
MAX_JOBS: 4
|
|
run: |
|
|
pip install flash-attn --no-build-isolation
|
|
cd applications/ColossalChat
|
|
pip install -v .
|
|
pip install pytest
|
|
|
|
- name: Execute Unit Testing
|
|
run: |
|
|
cd applications/ColossalChat
|
|
rm -rf ~/.cache/colossalai
|
|
pytest tests/
|
|
cd ./tests
|
|
./test_templating.sh
|
|
env:
|
|
NCCL_SHM_DISABLE: 1
|
|
MAX_JOBS: 8
|