mirror of
https://github.com/huggingface/trl.git
synced 2025-10-20 10:03:51 +08:00
118 lines
2.9 KiB
YAML
118 lines
2.9 KiB
YAML
name: Slow tests (on push)
|
|
|
|
on:
|
|
push:
|
|
branches: [main]
|
|
paths:
|
|
# Run only when python files are modified
|
|
- "trl/**.py"
|
|
- "examples/**.py"
|
|
env:
|
|
RUN_SLOW: "yes"
|
|
IS_GITHUB_CI: "1"
|
|
SLACK_API_TOKEN: ${{ secrets.SLACK_CIFEEDBACK_BOT_TOKEN }}
|
|
|
|
jobs:
|
|
run_all_tests_single_gpu:
|
|
runs-on:
|
|
group: aws-g4dn-2xlarge
|
|
env:
|
|
CUDA_VISIBLE_DEVICES: "0"
|
|
TEST_TYPE: "single_gpu"
|
|
container:
|
|
image: pytorch/pytorch:2.8.0-cuda12.8-cudnn9-devel
|
|
options: --gpus all --shm-size "16gb"
|
|
defaults:
|
|
run:
|
|
shell: bash
|
|
steps:
|
|
- name: Git checkout
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Install system dependencies
|
|
run: |
|
|
apt-get update && apt-get install -y make git curl
|
|
|
|
- name: Install uv
|
|
run: |
|
|
curl -LsSf https://astral.sh/uv/install.sh | sh
|
|
|
|
- name: Create Python virtual environment
|
|
run: |
|
|
uv venv
|
|
uv pip install --upgrade setuptools wheel
|
|
|
|
- name: Install dependencies
|
|
run: |
|
|
source .venv/bin/activate
|
|
uv pip install ".[dev]"
|
|
uv pip install pytest-reportlog parameterized
|
|
|
|
- name: Run slow SFT tests on single GPU
|
|
if: always()
|
|
run: |
|
|
source .venv/bin/activate
|
|
make slow_tests
|
|
|
|
- name: Generate Report
|
|
if: always()
|
|
run: |
|
|
source .venv/bin/activate
|
|
uv pip install slack_sdk tabulate
|
|
python scripts/log_reports.py >> $GITHUB_STEP_SUMMARY
|
|
|
|
run_all_tests_multi_gpu:
|
|
runs-on:
|
|
group: aws-g4dn-2xlarge
|
|
env:
|
|
CUDA_VISIBLE_DEVICES: "0,1"
|
|
TEST_TYPE: "multi_gpu"
|
|
container:
|
|
image: pytorch/pytorch:2.8.0-cuda12.8-cudnn9-devel
|
|
options: --gpus all --shm-size "16gb"
|
|
defaults:
|
|
run:
|
|
shell: bash
|
|
steps:
|
|
- name: Git checkout
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Install system dependencies
|
|
run: |
|
|
apt-get update && apt-get install -y make git curl
|
|
|
|
- name: Install uv
|
|
run: |
|
|
curl -LsSf https://astral.sh/uv/install.sh | sh
|
|
|
|
- name: Create Python virtual environment
|
|
run: |
|
|
uv venv
|
|
uv pip install --upgrade setuptools wheel
|
|
|
|
- name: Install dependencies
|
|
run: |
|
|
source .venv/bin/activate
|
|
uv pip install ".[dev]"
|
|
uv pip install pytest-reportlog parameterized
|
|
|
|
- name: Run slow SFT tests on Multi GPU
|
|
if: always()
|
|
run: |
|
|
source .venv/bin/activate
|
|
make slow_tests
|
|
|
|
- name: Run end-to-end examples tests on multi GPU
|
|
if: always()
|
|
run: |
|
|
source .venv/bin/activate
|
|
uv pip install deepspeed
|
|
make test_examples
|
|
|
|
- name: Generate Reports
|
|
if: always()
|
|
run: |
|
|
source .venv/bin/activate
|
|
uv pip install slack_sdk tabulate
|
|
python scripts/log_reports.py >> $GITHUB_STEP_SUMMARY
|
|
rm *.txt |