| 1 |
name: Self-hosted runner with slow tests (scheduled) |
| 2 |
|
| 3 |
on: |
| 4 |
workflow_dispatch: |
| 5 |
schedule: |
| 6 |
- cron: "0 2 * * *" |
| 7 |
|
| 8 |
env: |
| 9 |
RUN_SLOW: "yes" |
| 10 |
IS_GITHUB_CI: "1" |
| 11 |
SLACK_API_TOKEN: ${{ secrets.SLACK_API_TOKEN }} |
| 12 |
|
| 13 |
|
| 14 |
jobs: |
| 15 |
run_tests: |
| 16 |
name: run_tests_${{ matrix.test_type }} |
| 17 |
strategy: |
| 18 |
fail-fast: false |
| 19 |
matrix: |
| 20 |
include: |
| 21 |
- test_type: single_gpu |
| 22 |
runner: aws-g6-4xlarge-plus |
| 23 |
image: huggingface/accelerate:gpu-nightly |
| 24 |
cuda_visible_devices: "0" |
| 25 |
targets: test test_examples |
| 26 |
- test_type: single_gpu_deepspeed |
| 27 |
runner: aws-g6-4xlarge-plus |
| 28 |
image: huggingface/accelerate:gpu-deepspeed-nightly |
| 29 |
cuda_visible_devices: "0" |
| 30 |
targets: test_deepspeed |
| 31 |
- test_type: multi_gpu |
| 32 |
runner: aws-g6-12xlarge-plus |
| 33 |
image: huggingface/accelerate:gpu-nightly |
| 34 |
cuda_visible_devices: "0,1" |
| 35 |
targets: test test_examples |
| 36 |
- test_type: multi_gpu_deepspeed |
| 37 |
runner: aws-g6-12xlarge-plus |
| 38 |
image: huggingface/accelerate:gpu-deepspeed-nightly |
| 39 |
cuda_visible_devices: "0,1" |
| 40 |
targets: test_deepspeed |
| 41 |
runs-on: |
| 42 |
group: ${{ matrix.runner }} |
| 43 |
env: |
| 44 |
CUDA_VISIBLE_DEVICES: ${{ matrix.cuda_visible_devices }} |
| 45 |
TEST_TYPE: ${{ matrix.test_type }} |
| 46 |
container: |
| 47 |
image: ${{ matrix.image }} |
| 48 |
options: --gpus all --shm-size "16gb" |
| 49 |
defaults: |
| 50 |
run: |
| 51 |
shell: bash |
| 52 |
steps: |
| 53 |
- name: Update clone & pip install |
| 54 |
run: | |
| 55 |
source activate accelerate |
| 56 |
git clone https://github.com/huggingface/accelerate; |
| 57 |
cd accelerate; |
| 58 |
git checkout ${{ github.sha }}; |
| 59 |
pip install -e . --no-deps |
| 60 |
pip install pytest-reportlog tabulate |
| 61 |
|
| 62 |
- name: Show installed libraries |
| 63 |
run: | |
| 64 |
source activate accelerate; |
| 65 |
pip freeze |
| 66 |
|
| 67 |
- name: Run test suites |
| 68 |
working-directory: accelerate |
| 69 |
run: | |
| 70 |
source activate accelerate |
| 71 |
status=0 |
| 72 |
for target in ${{ matrix.targets }}; do |
| 73 |
make $target || status=1 |
| 74 |
done |
| 75 |
exit $status |
| 76 |
|
| 77 |
- name: Generate Report |
| 78 |
working-directory: accelerate |
| 79 |
if: always() |
| 80 |
run: | |
| 81 |
pip install slack_sdk tabulate |
| 82 |
python utils/log_reports.py >> $GITHUB_STEP_SUMMARY |
| 83 |
|
| 84 |
run-integration-tests: |
| 85 |
if: always() |
| 86 |
uses: ./.github/workflows/self_hosted_integration_tests.yml |