|
13 | 13 | PYTEST_TIMEOUT: 600 |
14 | 14 | RUN_SLOW: yes |
15 | 15 | RUN_NIGHTLY: yes |
16 | | - PIPELINE_USAGE_CUTOFF: 5000 |
| 16 | + PIPELINE_USAGE_CUTOFF: 0 |
17 | 17 | SLACK_API_TOKEN: ${{ secrets.SLACK_CIFEEDBACK_BOT_TOKEN }} |
| 18 | + CONSOLIDATED_REPORT_PATH: consolidated_test_report.md |
18 | 19 |
|
19 | 20 | jobs: |
20 | 21 | setup_torch_cuda_pipeline_matrix: |
@@ -99,11 +100,6 @@ jobs: |
99 | 100 | with: |
100 | 101 | name: pipeline_${{ matrix.module }}_test_reports |
101 | 102 | path: reports |
102 | | - - name: Generate Report and Notify Channel |
103 | | - if: always() |
104 | | - run: | |
105 | | - pip install slack_sdk tabulate |
106 | | - python utils/log_reports.py >> $GITHUB_STEP_SUMMARY |
107 | 103 |
|
108 | 104 | run_nightly_tests_for_other_torch_modules: |
109 | 105 | name: Nightly Torch CUDA Tests |
@@ -142,7 +138,6 @@ jobs: |
142 | 138 | HF_TOKEN: ${{ secrets.DIFFUSERS_HF_HUB_READ_TOKEN }} |
143 | 139 | # https://pytorch.org/docs/stable/notes/randomness.html#avoiding-nondeterministic-algorithms |
144 | 140 | CUBLAS_WORKSPACE_CONFIG: :16:8 |
145 | | - RUN_COMPILE: yes |
146 | 141 | run: | |
147 | 142 | python -m pytest -n 1 --max-worker-restart=0 --dist=loadfile \ |
148 | 143 | -s -v -k "not Flax and not Onnx" \ |
@@ -175,12 +170,6 @@ jobs: |
175 | 170 | name: torch_${{ matrix.module }}_cuda_test_reports |
176 | 171 | path: reports |
177 | 172 |
|
178 | | - - name: Generate Report and Notify Channel |
179 | | - if: always() |
180 | | - run: | |
181 | | - pip install slack_sdk tabulate |
182 | | - python utils/log_reports.py >> $GITHUB_STEP_SUMMARY |
183 | | -
|
184 | 173 | run_torch_compile_tests: |
185 | 174 | name: PyTorch Compile CUDA tests |
186 | 175 |
|
@@ -224,12 +213,6 @@ jobs: |
224 | 213 | name: torch_compile_test_reports |
225 | 214 | path: reports |
226 | 215 |
|
227 | | - - name: Generate Report and Notify Channel |
228 | | - if: always() |
229 | | - run: | |
230 | | - pip install slack_sdk tabulate |
231 | | - python utils/log_reports.py >> $GITHUB_STEP_SUMMARY |
232 | | - |
233 | 216 | run_big_gpu_torch_tests: |
234 | 217 | name: Torch tests on big GPU |
235 | 218 | strategy: |
@@ -280,12 +263,7 @@ jobs: |
280 | 263 | with: |
281 | 264 | name: torch_cuda_big_gpu_test_reports |
282 | 265 | path: reports |
283 | | - - name: Generate Report and Notify Channel |
284 | | - if: always() |
285 | | - run: | |
286 | | - pip install slack_sdk tabulate |
287 | | - python utils/log_reports.py >> $GITHUB_STEP_SUMMARY |
288 | | - |
| 266 | + |
289 | 267 | torch_minimum_version_cuda_tests: |
290 | 268 | name: Torch Minimum Version CUDA Tests |
291 | 269 | runs-on: |
@@ -342,63 +320,6 @@ jobs: |
342 | 320 | with: |
343 | 321 | name: torch_minimum_version_cuda_test_reports |
344 | 322 | path: reports |
345 | | - |
346 | | - run_flax_tpu_tests: |
347 | | - name: Nightly Flax TPU Tests |
348 | | - runs-on: |
349 | | - group: gcp-ct5lp-hightpu-8t |
350 | | - if: github.event_name == 'schedule' |
351 | | - |
352 | | - container: |
353 | | - image: diffusers/diffusers-flax-tpu |
354 | | - options: --shm-size "16gb" --ipc host --privileged ${{ vars.V5_LITEPOD_8_ENV}} -v /mnt/hf_cache:/mnt/hf_cache |
355 | | - defaults: |
356 | | - run: |
357 | | - shell: bash |
358 | | - steps: |
359 | | - - name: Checkout diffusers |
360 | | - uses: actions/checkout@v3 |
361 | | - with: |
362 | | - fetch-depth: 2 |
363 | | - |
364 | | - - name: Install dependencies |
365 | | - run: | |
366 | | - python -m venv /opt/venv && export PATH="/opt/venv/bin:$PATH" |
367 | | - python -m uv pip install -e [quality,test] |
368 | | - pip uninstall accelerate -y && python -m uv pip install -U accelerate@git+https://github.com/huggingface/accelerate.git |
369 | | - python -m uv pip install pytest-reportlog |
370 | | -
|
371 | | - - name: Environment |
372 | | - run: python utils/print_env.py |
373 | | - |
374 | | - - name: Run nightly Flax TPU tests |
375 | | - env: |
376 | | - HF_TOKEN: ${{ secrets.DIFFUSERS_HF_HUB_READ_TOKEN }} |
377 | | - run: | |
378 | | - python -m pytest -n 0 \ |
379 | | - -s -v -k "Flax" \ |
380 | | - --make-reports=tests_flax_tpu \ |
381 | | - --report-log=tests_flax_tpu.log \ |
382 | | - tests/ |
383 | | -
|
384 | | - - name: Failure short reports |
385 | | - if: ${{ failure() }} |
386 | | - run: | |
387 | | - cat reports/tests_flax_tpu_stats.txt |
388 | | - cat reports/tests_flax_tpu_failures_short.txt |
389 | | -
|
390 | | - - name: Test suite reports artifacts |
391 | | - if: ${{ always() }} |
392 | | - uses: actions/upload-artifact@v4 |
393 | | - with: |
394 | | - name: flax_tpu_test_reports |
395 | | - path: reports |
396 | | - |
397 | | - - name: Generate Report and Notify Channel |
398 | | - if: always() |
399 | | - run: | |
400 | | - pip install slack_sdk tabulate |
401 | | - python utils/log_reports.py >> $GITHUB_STEP_SUMMARY |
402 | 323 |
|
403 | 324 | run_nightly_onnx_tests: |
404 | 325 | name: Nightly ONNXRuntime CUDA tests on Ubuntu |
@@ -449,18 +370,12 @@ jobs: |
449 | 370 | name: tests_onnx_cuda_reports |
450 | 371 | path: reports |
451 | 372 |
|
452 | | - - name: Generate Report and Notify Channel |
453 | | - if: always() |
454 | | - run: | |
455 | | - pip install slack_sdk tabulate |
456 | | - python utils/log_reports.py >> $GITHUB_STEP_SUMMARY |
457 | | -
|
458 | 373 | run_nightly_quantization_tests: |
459 | 374 | name: Torch quantization nightly tests |
460 | 375 | strategy: |
461 | 376 | fail-fast: false |
462 | 377 | max-parallel: 2 |
463 | | - matrix: |
| 378 | + matrix: |
464 | 379 | config: |
465 | 380 | - backend: "bitsandbytes" |
466 | 381 | test_location: "bnb" |
@@ -520,12 +435,7 @@ jobs: |
520 | 435 | with: |
521 | 436 | name: torch_cuda_${{ matrix.config.backend }}_reports |
522 | 437 | path: reports |
523 | | - - name: Generate Report and Notify Channel |
524 | | - if: always() |
525 | | - run: | |
526 | | - pip install slack_sdk tabulate |
527 | | - python utils/log_reports.py >> $GITHUB_STEP_SUMMARY |
528 | | -
|
| 438 | + |
529 | 439 | run_nightly_pipeline_level_quantization_tests: |
530 | 440 | name: Torch quantization nightly tests |
531 | 441 | strategy: |
@@ -574,12 +484,117 @@ jobs: |
574 | 484 | with: |
575 | 485 | name: torch_cuda_pipeline_level_quant_reports |
576 | 486 | path: reports |
577 | | - - name: Generate Report and Notify Channel |
578 | | - if: always() |
| 487 | + |
| 488 | + run_flax_tpu_tests: |
| 489 | + name: Nightly Flax TPU Tests |
| 490 | + runs-on: |
| 491 | + group: gcp-ct5lp-hightpu-8t |
| 492 | + if: github.event_name == 'schedule' |
| 493 | + |
| 494 | + container: |
| 495 | + image: diffusers/diffusers-flax-tpu |
| 496 | + options: --shm-size "16gb" --ipc host --privileged ${{ vars.V5_LITEPOD_8_ENV}} -v /mnt/hf_cache:/mnt/hf_cache |
| 497 | + defaults: |
| 498 | + run: |
| 499 | + shell: bash |
| 500 | + steps: |
| 501 | + - name: Checkout diffusers |
| 502 | + uses: actions/checkout@v3 |
| 503 | + with: |
| 504 | + fetch-depth: 2 |
| 505 | + |
| 506 | + - name: Install dependencies |
| 507 | + run: | |
| 508 | + python -m venv /opt/venv && export PATH="/opt/venv/bin:$PATH" |
| 509 | + python -m uv pip install -e [quality,test] |
| 510 | + pip uninstall accelerate -y && python -m uv pip install -U accelerate@git+https://github.com/huggingface/accelerate.git |
| 511 | + python -m uv pip install pytest-reportlog |
| 512 | +
|
| 513 | + - name: Environment |
| 514 | + run: python utils/print_env.py |
| 515 | + |
| 516 | + - name: Run nightly Flax TPU tests |
| 517 | + env: |
| 518 | + HF_TOKEN: ${{ secrets.DIFFUSERS_HF_HUB_READ_TOKEN }} |
| 519 | + run: | |
| 520 | + python -m pytest -n 0 \ |
| 521 | + -s -v -k "Flax" \ |
| 522 | + --make-reports=tests_flax_tpu \ |
| 523 | + --report-log=tests_flax_tpu.log \ |
| 524 | + tests/ |
| 525 | +
|
| 526 | + - name: Failure short reports |
| 527 | + if: ${{ failure() }} |
| 528 | + run: | |
| 529 | + cat reports/tests_flax_tpu_stats.txt |
| 530 | + cat reports/tests_flax_tpu_failures_short.txt |
| 531 | +
|
| 532 | + - name: Test suite reports artifacts |
| 533 | + if: ${{ always() }} |
| 534 | + uses: actions/upload-artifact@v4 |
| 535 | + with: |
| 536 | + name: flax_tpu_test_reports |
| 537 | + path: reports |
| 538 | + |
| 539 | + generate_consolidated_report: |
| 540 | + name: Generate Consolidated Test Report |
| 541 | + needs: [ |
| 542 | + run_nightly_tests_for_torch_pipelines, |
| 543 | + run_nightly_tests_for_other_torch_modules, |
| 544 | + run_torch_compile_tests, |
| 545 | + run_big_gpu_torch_tests, |
| 546 | + run_nightly_quantization_tests, |
| 547 | + run_nightly_pipeline_level_quantization_tests, |
| 548 | + run_nightly_onnx_tests, |
| 549 | + torch_minimum_version_cuda_tests, |
| 550 | + run_flax_tpu_tests |
| 551 | + ] |
| 552 | + if: always() |
| 553 | + runs-on: |
| 554 | + group: aws-general-8-plus |
| 555 | + container: |
| 556 | + image: diffusers/diffusers-pytorch-cpu |
| 557 | + steps: |
| 558 | + - name: Checkout diffusers |
| 559 | + uses: actions/checkout@v3 |
| 560 | + with: |
| 561 | + fetch-depth: 2 |
| 562 | + |
| 563 | + - name: Create reports directory |
| 564 | + run: mkdir -p combined_reports |
| 565 | + |
| 566 | + - name: Download all test reports |
| 567 | + uses: actions/download-artifact@v4 |
| 568 | + with: |
| 569 | + path: artifacts |
| 570 | + |
| 571 | + - name: Prepare reports |
| 572 | + run: | |
| 573 | + # Move all report files to a single directory for processing |
| 574 | + find artifacts -name "*.txt" -exec cp {} combined_reports/ \; |
| 575 | +
|
| 576 | + - name: Install dependencies |
579 | 577 | run: | |
| 578 | + pip install -e .[test] |
580 | 579 | pip install slack_sdk tabulate |
581 | | - python utils/log_reports.py >> $GITHUB_STEP_SUMMARY |
582 | | - |
| 580 | +
|
| 581 | + - name: Generate consolidated report |
| 582 | + run: | |
| 583 | + python utils/consolidated_test_report.py \ |
| 584 | + --reports_dir combined_reports \ |
| 585 | + --output_file $CONSOLIDATED_REPORT_PATH \ |
| 586 | + --slack_channel_name diffusers-ci-nightly |
| 587 | +
|
| 588 | + - name: Show consolidated report |
| 589 | + run: | |
| 590 | + cat $CONSOLIDATED_REPORT_PATH >> $GITHUB_STEP_SUMMARY |
| 591 | +
|
| 592 | + - name: Upload consolidated report |
| 593 | + uses: actions/upload-artifact@v4 |
| 594 | + with: |
| 595 | + name: consolidated_test_report |
| 596 | + path: ${{ env.CONSOLIDATED_REPORT_PATH }} |
| 597 | + |
583 | 598 | # M1 runner currently not well supported |
584 | 599 | # TODO: (Dhruv) add these back when we setup better testing for Apple Silicon |
585 | 600 | # run_nightly_tests_apple_m1: |
|
0 commit comments