Skip to content

Commit 5fbb4d3

Browse files
authored
[CI] Slow Test Updates (#8870)
* update * update * update
1 parent d8bcb33 commit 5fbb4d3

File tree

7 files changed

+29
-148
lines changed

7 files changed

+29
-148
lines changed

.github/workflows/nightly_tests.yml

Lines changed: 17 additions & 84 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ on:
77

88
env:
99
DIFFUSERS_IS_CI: yes
10-
HF_HOME: /mnt/cache
10+
HF_HUB_ENABLE_HF_TRANSFER: 1
1111
OMP_NUM_THREADS: 8
1212
MKL_NUM_THREADS: 8
1313
PYTEST_TIMEOUT: 600
@@ -27,10 +27,6 @@ jobs:
2727
uses: actions/checkout@v3
2828
with:
2929
fetch-depth: 2
30-
- name: Set up Python
31-
uses: actions/setup-python@v4
32-
with:
33-
python-version: "3.8"
3430
- name: Install dependencies
3531
run: |
3632
pip install -e .
@@ -50,36 +46,34 @@ jobs:
5046
path: reports
5147

5248
run_nightly_tests_for_torch_pipelines:
53-
name: Torch Pipelines CUDA Nightly Tests
49+
name: Nightly Torch Pipelines CUDA Tests
5450
needs: setup_torch_cuda_pipeline_matrix
5551
strategy:
5652
fail-fast: false
53+
max-parallel: 8
5754
matrix:
5855
module: ${{ fromJson(needs.setup_torch_cuda_pipeline_matrix.outputs.pipeline_test_matrix) }}
5956
runs-on: [single-gpu, nvidia-gpu, t4, ci]
6057
container:
6158
image: diffusers/diffusers-pytorch-cuda
62-
options: --shm-size "16gb" --ipc host -v /mnt/cache/.cache/huggingface/diffusers:/mnt/cache/ --gpus 0
59+
options: --shm-size "16gb" --ipc host --gpus 0
6360
steps:
6461
- name: Checkout diffusers
6562
uses: actions/checkout@v3
6663
with:
6764
fetch-depth: 2
6865
- name: NVIDIA-SMI
6966
run: nvidia-smi
70-
7167
- name: Install dependencies
7268
run: |
7369
python -m venv /opt/venv && export PATH="/opt/venv/bin:$PATH"
7470
python -m uv pip install -e [quality,test]
7571
python -m uv pip install accelerate@git+https://github.com/huggingface/accelerate.git
7672
python -m uv pip install pytest-reportlog
77-
7873
- name: Environment
7974
run: |
8075
python utils/print_env.py
81-
82-
- name: Nightly PyTorch CUDA checkpoint (pipelines) tests
76+
- name: Pipeline CUDA Test
8377
env:
8478
HF_TOKEN: ${{ secrets.HF_TOKEN }}
8579
# https://pytorch.org/docs/stable/notes/randomness.html#avoiding-nondeterministic-algorithms
@@ -90,38 +84,36 @@ jobs:
9084
--make-reports=tests_pipeline_${{ matrix.module }}_cuda \
9185
--report-log=tests_pipeline_${{ matrix.module }}_cuda.log \
9286
tests/pipelines/${{ matrix.module }}
93-
9487
- name: Failure short reports
9588
if: ${{ failure() }}
9689
run: |
9790
cat reports/tests_pipeline_${{ matrix.module }}_cuda_stats.txt
9891
cat reports/tests_pipeline_${{ matrix.module }}_cuda_failures_short.txt
99-
10092
- name: Test suite reports artifacts
10193
if: ${{ always() }}
10294
uses: actions/upload-artifact@v2
10395
with:
10496
name: pipeline_${{ matrix.module }}_test_reports
10597
path: reports
106-
10798
- name: Generate Report and Notify Channel
10899
if: always()
109100
run: |
110101
pip install slack_sdk tabulate
111-
python scripts/log_reports.py >> $GITHUB_STEP_SUMMARY
102+
python utils/log_reports.py >> $GITHUB_STEP_SUMMARY
112103
113104
run_nightly_tests_for_other_torch_modules:
114-
name: Torch Non-Pipelines CUDA Nightly Tests
105+
name: Nightly Torch CUDA Tests
115106
runs-on: [single-gpu, nvidia-gpu, t4, ci]
116107
container:
117108
image: diffusers/diffusers-pytorch-cuda
118-
options: --shm-size "16gb" --ipc host -v /mnt/hf_cache:/mnt/cache/ --gpus 0
109+
options: --shm-size "16gb" --ipc host --gpus 0
119110
defaults:
120111
run:
121112
shell: bash
122113
strategy:
123114
matrix:
124-
module: [models, schedulers, others, examples]
115+
max-parallel: 2
116+
module: [models, schedulers, lora, others, single_file, examples]
125117
steps:
126118
- name: Checkout diffusers
127119
uses: actions/checkout@v3
@@ -133,8 +125,8 @@ jobs:
133125
python -m venv /opt/venv && export PATH="/opt/venv/bin:$PATH"
134126
python -m uv pip install -e [quality,test]
135127
python -m uv pip install accelerate@git+https://github.com/huggingface/accelerate.git
128+
python -m uv pip install peft@git+https://github.com/huggingface/peft.git
136129
python -m uv pip install pytest-reportlog
137-
138130
- name: Environment
139131
run: python utils/print_env.py
140132

@@ -158,7 +150,6 @@ jobs:
158150
# https://pytorch.org/docs/stable/notes/randomness.html#avoiding-nondeterministic-algorithms
159151
CUBLAS_WORKSPACE_CONFIG: :16:8
160152
run: |
161-
python -m uv pip install peft@git+https://github.com/huggingface/peft.git
162153
python -m pytest -n 1 --max-worker-restart=0 --dist=loadfile \
163154
-s -v --make-reports=examples_torch_cuda \
164155
--report-log=examples_torch_cuda.log \
@@ -181,64 +172,7 @@ jobs:
181172
if: always()
182173
run: |
183174
pip install slack_sdk tabulate
184-
python scripts/log_reports.py >> $GITHUB_STEP_SUMMARY
185-
186-
run_lora_nightly_tests:
187-
name: Nightly LoRA Tests with PEFT and TORCH
188-
runs-on: [single-gpu, nvidia-gpu, t4, ci]
189-
container:
190-
image: diffusers/diffusers-pytorch-cuda
191-
options: --shm-size "16gb" --ipc host -v /mnt/hf_cache:/mnt/cache/ --gpus 0
192-
defaults:
193-
run:
194-
shell: bash
195-
steps:
196-
- name: Checkout diffusers
197-
uses: actions/checkout@v3
198-
with:
199-
fetch-depth: 2
200-
201-
- name: Install dependencies
202-
run: |
203-
python -m venv /opt/venv && export PATH="/opt/venv/bin:$PATH"
204-
python -m uv pip install -e [quality,test]
205-
python -m uv pip install accelerate@git+https://github.com/huggingface/accelerate.git
206-
python -m uv pip install peft@git+https://github.com/huggingface/peft.git
207-
python -m uv pip install pytest-reportlog
208-
209-
- name: Environment
210-
run: python utils/print_env.py
211-
212-
- name: Run nightly LoRA tests with PEFT and Torch
213-
env:
214-
HF_TOKEN: ${{ secrets.HF_TOKEN }}
215-
# https://pytorch.org/docs/stable/notes/randomness.html#avoiding-nondeterministic-algorithms
216-
CUBLAS_WORKSPACE_CONFIG: :16:8
217-
run: |
218-
python -m pytest -n 1 --max-worker-restart=0 --dist=loadfile \
219-
-s -v -k "not Flax and not Onnx" \
220-
--make-reports=tests_torch_lora_cuda \
221-
--report-log=tests_torch_lora_cuda.log \
222-
tests/lora
223-
224-
- name: Failure short reports
225-
if: ${{ failure() }}
226-
run: |
227-
cat reports/tests_torch_lora_cuda_stats.txt
228-
cat reports/tests_torch_lora_cuda_failures_short.txt
229-
230-
- name: Test suite reports artifacts
231-
if: ${{ always() }}
232-
uses: actions/upload-artifact@v2
233-
with:
234-
name: torch_lora_cuda_test_reports
235-
path: reports
236-
237-
- name: Generate Report and Notify Channel
238-
if: always()
239-
run: |
240-
pip install slack_sdk tabulate
241-
python scripts/log_reports.py >> $GITHUB_STEP_SUMMARY
175+
python utils/log_reports.py >> $GITHUB_STEP_SUMMARY
242176
243177
run_flax_tpu_tests:
244178
name: Nightly Flax TPU Tests
@@ -294,14 +228,14 @@ jobs:
294228
if: always()
295229
run: |
296230
pip install slack_sdk tabulate
297-
python scripts/log_reports.py >> $GITHUB_STEP_SUMMARY
231+
python utils/log_reports.py >> $GITHUB_STEP_SUMMARY
298232
299233
run_nightly_onnx_tests:
300234
name: Nightly ONNXRuntime CUDA tests on Ubuntu
301235
runs-on: [single-gpu, nvidia-gpu, t4, ci]
302236
container:
303237
image: diffusers/diffusers-onnxruntime-cuda
304-
options: --gpus 0 --shm-size "16gb" --ipc host -v /mnt/hf_cache:/mnt/cache/
238+
options: --gpus 0 --shm-size "16gb" --ipc host
305239

306240
steps:
307241
- name: Checkout diffusers
@@ -318,11 +252,10 @@ jobs:
318252
python -m uv pip install -e [quality,test]
319253
python -m uv pip install accelerate@git+https://github.com/huggingface/accelerate.git
320254
python -m uv pip install pytest-reportlog
321-
322255
- name: Environment
323256
run: python utils/print_env.py
324257

325-
- name: Run nightly ONNXRuntime CUDA tests
258+
- name: Run Nightly ONNXRuntime CUDA tests
326259
env:
327260
HF_TOKEN: ${{ secrets.HF_TOKEN }}
328261
run: |
@@ -349,7 +282,7 @@ jobs:
349282
if: always()
350283
run: |
351284
pip install slack_sdk tabulate
352-
python scripts/log_reports.py >> $GITHUB_STEP_SUMMARY
285+
python utils/log_reports.py >> $GITHUB_STEP_SUMMARY
353286
354287
run_nightly_tests_apple_m1:
355288
name: Nightly PyTorch MPS tests on MacOS
@@ -411,4 +344,4 @@ jobs:
411344
if: always()
412345
run: |
413346
pip install slack_sdk tabulate
414-
python scripts/log_reports.py >> $GITHUB_STEP_SUMMARY
347+
python utils/log_reports.py >> $GITHUB_STEP_SUMMARY

.github/workflows/push_tests.yml

Lines changed: 8 additions & 64 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,9 @@ on:
1111

1212
env:
1313
DIFFUSERS_IS_CI: yes
14-
HF_HOME: /mnt/cache
1514
OMP_NUM_THREADS: 8
1615
MKL_NUM_THREADS: 8
1716
PYTEST_TIMEOUT: 600
18-
RUN_SLOW: yes
1917
PIPELINE_USAGE_CUTOFF: 50000
2018

2119
jobs:
@@ -52,7 +50,7 @@ jobs:
5250
path: reports
5351

5452
torch_pipelines_cuda_tests:
55-
name: Torch Pipelines CUDA Slow Tests
53+
name: Torch Pipelines CUDA Tests
5654
needs: setup_torch_cuda_pipeline_matrix
5755
strategy:
5856
fail-fast: false
@@ -62,7 +60,7 @@ jobs:
6260
runs-on: [single-gpu, nvidia-gpu, t4, ci]
6361
container:
6462
image: diffusers/diffusers-pytorch-cuda
65-
options: --shm-size "16gb" --ipc host -v /mnt/cache/.cache/huggingface/diffusers:/mnt/cache/ --gpus 0
63+
options: --shm-size "16gb" --ipc host --gpus 0
6664
steps:
6765
- name: Checkout diffusers
6866
uses: actions/checkout@v3
@@ -106,7 +104,7 @@ jobs:
106104
runs-on: [single-gpu, nvidia-gpu, t4, ci]
107105
container:
108106
image: diffusers/diffusers-pytorch-cuda
109-
options: --shm-size "16gb" --ipc host -v /mnt/cache/.cache/huggingface/diffusers:/mnt/cache/ --gpus 0
107+
options: --shm-size "16gb" --ipc host --gpus 0
110108
defaults:
111109
run:
112110
shell: bash
@@ -124,12 +122,13 @@ jobs:
124122
python -m venv /opt/venv && export PATH="/opt/venv/bin:$PATH"
125123
python -m uv pip install -e [quality,test]
126124
python -m uv pip install accelerate@git+https://github.com/huggingface/accelerate.git
125+
python -m uv pip install peft@git+https://github.com/huggingface/peft.git
127126
128127
- name: Environment
129128
run: |
130129
python utils/print_env.py
131130
132-
- name: Run slow PyTorch CUDA tests
131+
- name: Run PyTorch CUDA tests
133132
env:
134133
HF_TOKEN: ${{ secrets.HF_TOKEN }}
135134
# https://pytorch.org/docs/stable/notes/randomness.html#avoiding-nondeterministic-algorithms
@@ -153,61 +152,6 @@ jobs:
153152
name: torch_cuda_test_reports
154153
path: reports
155154

156-
peft_cuda_tests:
157-
name: PEFT CUDA Tests
158-
runs-on: [single-gpu, nvidia-gpu, t4, ci]
159-
container:
160-
image: diffusers/diffusers-pytorch-cuda
161-
options: --shm-size "16gb" --ipc host -v /mnt/cache/.cache/huggingface/diffusers:/mnt/cache/ --gpus 0
162-
defaults:
163-
run:
164-
shell: bash
165-
steps:
166-
- name: Checkout diffusers
167-
uses: actions/checkout@v3
168-
with:
169-
fetch-depth: 2
170-
171-
- name: Install dependencies
172-
run: |
173-
python -m venv /opt/venv && export PATH="/opt/venv/bin:$PATH"
174-
python -m uv pip install -e [quality,test]
175-
python -m uv pip install accelerate@git+https://github.com/huggingface/accelerate.git
176-
python -m pip install -U peft@git+https://github.com/huggingface/peft.git
177-
178-
- name: Environment
179-
run: |
180-
python utils/print_env.py
181-
182-
- name: Run slow PEFT CUDA tests
183-
env:
184-
HF_TOKEN: ${{ secrets.HF_TOKEN }}
185-
# https://pytorch.org/docs/stable/notes/randomness.html#avoiding-nondeterministic-algorithms
186-
CUBLAS_WORKSPACE_CONFIG: :16:8
187-
run: |
188-
python -m pytest -n 1 --max-worker-restart=0 --dist=loadfile \
189-
-s -v -k "not Flax and not Onnx and not PEFTLoRALoading" \
190-
--make-reports=tests_peft_cuda \
191-
tests/lora/
192-
python -m pytest -n 1 --max-worker-restart=0 --dist=loadfile \
193-
-s -v -k "lora and not Flax and not Onnx and not PEFTLoRALoading" \
194-
--make-reports=tests_peft_cuda_models_lora \
195-
tests/models/
196-
197-
- name: Failure short reports
198-
if: ${{ failure() }}
199-
run: |
200-
cat reports/tests_peft_cuda_stats.txt
201-
cat reports/tests_peft_cuda_failures_short.txt
202-
cat reports/tests_peft_cuda_models_lora_failures_short.txt
203-
204-
- name: Test suite reports artifacts
205-
if: ${{ always() }}
206-
uses: actions/upload-artifact@v2
207-
with:
208-
name: torch_peft_test_reports
209-
path: reports
210-
211155
flax_tpu_tests:
212156
name: Flax TPU Tests
213157
runs-on: docker-tpu
@@ -309,7 +253,7 @@ jobs:
309253

310254
container:
311255
image: diffusers/diffusers-pytorch-compile-cuda
312-
options: --gpus 0 --shm-size "16gb" --ipc host -v /mnt/cache/.cache/huggingface:/mnt/cache/
256+
options: --gpus 0 --shm-size "16gb" --ipc host
313257

314258
steps:
315259
- name: Checkout diffusers
@@ -351,7 +295,7 @@ jobs:
351295

352296
container:
353297
image: diffusers/diffusers-pytorch-xformers-cuda
354-
options: --gpus 0 --shm-size "16gb" --ipc host -v /mnt/cache/.cache/huggingface:/mnt/cache/
298+
options: --gpus 0 --shm-size "16gb" --ipc host
355299

356300
steps:
357301
- name: Checkout diffusers
@@ -392,7 +336,7 @@ jobs:
392336

393337
container:
394338
image: diffusers/diffusers-pytorch-cuda
395-
options: --gpus 0 --shm-size "16gb" --ipc host -v /mnt/cache/.cache/huggingface:/mnt/cache/
339+
options: --gpus 0 --shm-size "16gb" --ipc host
396340

397341
steps:
398342
- name: Checkout diffusers

docker/diffusers-onnxruntime-cuda/Dockerfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ RUN python3.10 -m pip install --no-cache-dir --upgrade pip uv==0.1.11 && \
3838
datasets \
3939
hf-doc-builder \
4040
huggingface-hub \
41+
hf_transfer \
4142
Jinja2 \
4243
librosa \
4344
numpy==1.26.4 \

docker/diffusers-pytorch-compile-cuda/Dockerfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ RUN python3.10 -m pip install --no-cache-dir --upgrade pip uv==0.1.11 && \
3838
datasets \
3939
hf-doc-builder \
4040
huggingface-hub \
41+
hf_transfer \
4142
Jinja2 \
4243
librosa \
4344
numpy==1.26.4 \

0 commit comments

Comments
 (0)