Skip to content

Commit 78ec48d

Browse files
authored
Merge branch 'main' into fix-fast-tests-sayak
2 parents 65d0581 + ec9bfa9 commit 78ec48d

File tree

415 files changed

+55043
-6565
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

415 files changed

+55043
-6565
lines changed

.github/workflows/nightly_tests.yml

Lines changed: 118 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -180,14 +180,71 @@ jobs:
180180
pip install slack_sdk tabulate
181181
python utils/log_reports.py >> $GITHUB_STEP_SUMMARY
182182
183+
run_big_gpu_torch_tests:
184+
name: Torch tests on big GPU
185+
strategy:
186+
fail-fast: false
187+
max-parallel: 2
188+
runs-on:
189+
group: aws-g6e-xlarge-plus
190+
container:
191+
image: diffusers/diffusers-pytorch-cuda
192+
options: --shm-size "16gb" --ipc host --gpus 0
193+
steps:
194+
- name: Checkout diffusers
195+
uses: actions/checkout@v3
196+
with:
197+
fetch-depth: 2
198+
- name: NVIDIA-SMI
199+
run: nvidia-smi
200+
- name: Install dependencies
201+
run: |
202+
python -m venv /opt/venv && export PATH="/opt/venv/bin:$PATH"
203+
python -m uv pip install -e [quality,test]
204+
python -m uv pip install peft@git+https://github.com/huggingface/peft.git
205+
pip uninstall accelerate -y && python -m uv pip install -U accelerate@git+https://github.com/huggingface/accelerate.git
206+
python -m uv pip install pytest-reportlog
207+
- name: Environment
208+
run: |
209+
python utils/print_env.py
210+
- name: Selected Torch CUDA Test on big GPU
211+
env:
212+
HF_TOKEN: ${{ secrets.DIFFUSERS_HF_HUB_READ_TOKEN }}
213+
# https://pytorch.org/docs/stable/notes/randomness.html#avoiding-nondeterministic-algorithms
214+
CUBLAS_WORKSPACE_CONFIG: :16:8
215+
BIG_GPU_MEMORY: 40
216+
run: |
217+
python -m pytest -n 1 --max-worker-restart=0 --dist=loadfile \
218+
-m "big_gpu_with_torch_cuda" \
219+
--make-reports=tests_big_gpu_torch_cuda \
220+
--report-log=tests_big_gpu_torch_cuda.log \
221+
tests/
222+
- name: Failure short reports
223+
if: ${{ failure() }}
224+
run: |
225+
cat reports/tests_big_gpu_torch_cuda_stats.txt
226+
cat reports/tests_big_gpu_torch_cuda_failures_short.txt
227+
- name: Test suite reports artifacts
228+
if: ${{ always() }}
229+
uses: actions/upload-artifact@v4
230+
with:
231+
name: torch_cuda_big_gpu_test_reports
232+
path: reports
233+
- name: Generate Report and Notify Channel
234+
if: always()
235+
run: |
236+
pip install slack_sdk tabulate
237+
python utils/log_reports.py >> $GITHUB_STEP_SUMMARY
238+
183239
run_flax_tpu_tests:
184240
name: Nightly Flax TPU Tests
185-
runs-on: docker-tpu
241+
runs-on:
242+
group: gcp-ct5lp-hightpu-8t
186243
if: github.event_name == 'schedule'
187244

188245
container:
189246
image: diffusers/diffusers-flax-tpu
190-
options: --shm-size "16gb" --ipc host -v /mnt/hf_cache:/mnt/cache/ --privileged
247+
options: --shm-size "16gb" --ipc host --privileged ${{ vars.V5_LITEPOD_8_ENV}} -v /mnt/hf_cache:/mnt/hf_cache
191248
defaults:
192249
run:
193250
shell: bash
@@ -291,6 +348,64 @@ jobs:
291348
pip install slack_sdk tabulate
292349
python utils/log_reports.py >> $GITHUB_STEP_SUMMARY
293350
351+
run_nightly_quantization_tests:
352+
name: Torch quantization nightly tests
353+
strategy:
354+
fail-fast: false
355+
max-parallel: 2
356+
matrix:
357+
config:
358+
- backend: "bitsandbytes"
359+
test_location: "bnb"
360+
runs-on:
361+
group: aws-g6e-xlarge-plus
362+
container:
363+
image: diffusers/diffusers-pytorch-cuda
364+
options: --shm-size "20gb" --ipc host --gpus 0
365+
steps:
366+
- name: Checkout diffusers
367+
uses: actions/checkout@v3
368+
with:
369+
fetch-depth: 2
370+
- name: NVIDIA-SMI
371+
run: nvidia-smi
372+
- name: Install dependencies
373+
run: |
374+
python -m venv /opt/venv && export PATH="/opt/venv/bin:$PATH"
375+
python -m uv pip install -e [quality,test]
376+
python -m uv pip install -U ${{ matrix.config.backend }}
377+
python -m uv pip install pytest-reportlog
378+
- name: Environment
379+
run: |
380+
python utils/print_env.py
381+
- name: ${{ matrix.config.backend }} quantization tests on GPU
382+
env:
383+
HF_TOKEN: ${{ secrets.DIFFUSERS_HF_HUB_READ_TOKEN }}
384+
# https://pytorch.org/docs/stable/notes/randomness.html#avoiding-nondeterministic-algorithms
385+
CUBLAS_WORKSPACE_CONFIG: :16:8
386+
BIG_GPU_MEMORY: 40
387+
run: |
388+
python -m pytest -n 1 --max-worker-restart=0 --dist=loadfile \
389+
--make-reports=tests_${{ matrix.config.backend }}_torch_cuda \
390+
--report-log=tests_${{ matrix.config.backend }}_torch_cuda.log \
391+
tests/quantization/${{ matrix.config.test_location }}
392+
- name: Failure short reports
393+
if: ${{ failure() }}
394+
run: |
395+
cat reports/tests_${{ matrix.config.backend }}_torch_cuda_stats.txt
396+
cat reports/tests_${{ matrix.config.backend }}_torch_cuda_failures_short.txt
397+
- name: Test suite reports artifacts
398+
if: ${{ always() }}
399+
uses: actions/upload-artifact@v4
400+
with:
401+
name: torch_cuda_${{ matrix.config.backend }}_reports
402+
path: reports
403+
- name: Generate Report and Notify Channel
404+
if: always()
405+
run: |
406+
pip install slack_sdk tabulate
407+
python utils/log_reports.py >> $GITHUB_STEP_SUMMARY
408+
294409
# M1 runner currently not well supported
295410
# TODO: (Dhruv) add these back when we setup better testing for Apple Silicon
296411
# run_nightly_tests_apple_m1:
@@ -405,4 +520,4 @@ jobs:
405520
# if: always()
406521
# run: |
407522
# pip install slack_sdk tabulate
408-
# python utils/log_reports.py >> $GITHUB_STEP_SUMMARY
523+
# python utils/log_reports.py >> $GITHUB_STEP_SUMMARY

.github/workflows/pr_test_peft_backend.yml

Lines changed: 0 additions & 134 deletions
This file was deleted.

.github/workflows/pr_tests.yml

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -234,3 +234,67 @@ jobs:
234234
with:
235235
name: pr_${{ matrix.config.report }}_test_reports
236236
path: reports
237+
238+
run_lora_tests:
239+
needs: [check_code_quality, check_repository_consistency]
240+
strategy:
241+
fail-fast: false
242+
243+
name: LoRA tests with PEFT main
244+
245+
runs-on:
246+
group: aws-general-8-plus
247+
248+
container:
249+
image: diffusers/diffusers-pytorch-cpu
250+
options: --shm-size "16gb" --ipc host -v /mnt/hf_cache:/mnt/cache/
251+
252+
defaults:
253+
run:
254+
shell: bash
255+
256+
steps:
257+
- name: Checkout diffusers
258+
uses: actions/checkout@v3
259+
with:
260+
fetch-depth: 2
261+
262+
- name: Install dependencies
263+
run: |
264+
python -m venv /opt/venv && export PATH="/opt/venv/bin:$PATH"
265+
python -m uv pip install -e [quality,test]
266+
# TODO (sayakpaul, DN6): revisit `--no-deps`
267+
python -m pip install -U peft@git+https://github.com/huggingface/peft.git --no-deps
268+
python -m uv pip install -U transformers@git+https://github.com/huggingface/transformers.git --no-deps
269+
pip uninstall accelerate -y && python -m uv pip install -U accelerate@git+https://github.com/huggingface/accelerate.git --no-deps
270+
271+
- name: Environment
272+
run: |
273+
python -m venv /opt/venv && export PATH="/opt/venv/bin:$PATH"
274+
python utils/print_env.py
275+
276+
- name: Run fast PyTorch LoRA tests with PEFT
277+
run: |
278+
python -m venv /opt/venv && export PATH="/opt/venv/bin:$PATH"
279+
python -m pytest -n 4 --max-worker-restart=0 --dist=loadfile \
280+
-s -v \
281+
--make-reports=tests_peft_main \
282+
tests/lora/
283+
python -m pytest -n 4 --max-worker-restart=0 --dist=loadfile \
284+
-s -v \
285+
--make-reports=tests_models_lora_peft_main \
286+
tests/models/ -k "lora"
287+
288+
- name: Failure short reports
289+
if: ${{ failure() }}
290+
run: |
291+
cat reports/tests_lora_failures_short.txt
292+
cat reports/tests_models_lora_failures_short.txt
293+
294+
- name: Test suite reports artifacts
295+
if: ${{ always() }}
296+
uses: actions/upload-artifact@v4
297+
with:
298+
name: pr_main_test_reports
299+
path: reports
300+

.github/workflows/push_tests.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ jobs:
8181
- name: Environment
8282
run: |
8383
python utils/print_env.py
84-
- name: Slow PyTorch CUDA checkpoint tests on Ubuntu
84+
- name: PyTorch CUDA checkpoint tests on Ubuntu
8585
env:
8686
HF_TOKEN: ${{ secrets.HF_TOKEN }}
8787
# https://pytorch.org/docs/stable/notes/randomness.html#avoiding-nondeterministic-algorithms
@@ -169,11 +169,11 @@ jobs:
169169

170170
flax_tpu_tests:
171171
name: Flax TPU Tests
172-
runs-on: docker-tpu
172+
runs-on:
173+
group: gcp-ct5lp-hightpu-8t
173174
container:
174175
image: diffusers/diffusers-flax-tpu
175-
options: --shm-size "16gb" --ipc host -v /mnt/cache/.cache/huggingface:/mnt/cache/ --privileged
176-
defaults:
176+
options: --shm-size "16gb" --ipc host --privileged ${{ vars.V5_LITEPOD_8_ENV}} -v /mnt/hf_cache:/mnt/hf_cache defaults:
177177
run:
178178
shell: bash
179179
steps:
@@ -192,7 +192,7 @@ jobs:
192192
run: |
193193
python utils/print_env.py
194194
195-
- name: Run slow Flax TPU tests
195+
- name: Run Flax TPU tests
196196
env:
197197
HF_TOKEN: ${{ secrets.HF_TOKEN }}
198198
run: |
@@ -240,7 +240,7 @@ jobs:
240240
run: |
241241
python utils/print_env.py
242242
243-
- name: Run slow ONNXRuntime CUDA tests
243+
- name: Run ONNXRuntime CUDA tests
244244
env:
245245
HF_TOKEN: ${{ secrets.HF_TOKEN }}
246246
run: |

0 commit comments

Comments
 (0)