forked from huggingface/diffusers
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[CI] Add slow MPS tests (huggingface#1104)
* [CI] Add slow MPS tests * fix yml * temporarily resolve caching * Tests: fix mps crashes. * Skip test_load_pipeline_from_git on mps. Not compatible with float16. * Increase tolerance, use CPU generator, alt. slices. * Move to nightly * style Co-authored-by: Pedro Cuenca <[email protected]>
- Loading branch information
Showing
5 changed files
with
89 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
name: Nightly integration tests | ||
|
||
on: | ||
schedule: | ||
- cron: "0 0 * * *" # every day at midnight | ||
|
||
env: | ||
DIFFUSERS_IS_CI: yes | ||
HF_HOME: /mnt/cache | ||
OMP_NUM_THREADS: 8 | ||
MKL_NUM_THREADS: 8 | ||
PYTEST_TIMEOUT: 1000 | ||
RUN_SLOW: yes | ||
|
||
jobs: | ||
run_slow_tests_apple_m1: | ||
name: Slow PyTorch MPS tests on MacOS | ||
runs-on: [ self-hosted, apple-m1 ] | ||
|
||
steps: | ||
- name: Checkout diffusers | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 2 | ||
|
||
- name: Clean checkout | ||
shell: arch -arch arm64 bash {0} | ||
run: | | ||
git clean -fxd | ||
- name: Setup miniconda | ||
uses: ./.github/actions/setup-miniconda | ||
with: | ||
python-version: 3.9 | ||
|
||
- name: Install dependencies | ||
shell: arch -arch arm64 bash {0} | ||
run: | | ||
${CONDA_RUN} python -m pip install --upgrade pip | ||
${CONDA_RUN} python -m pip install -e .[quality,test] | ||
${CONDA_RUN} python -m pip install torch torchvision torchaudio --extra-index-url https://download.pytorch.org/whl/cpu | ||
${CONDA_RUN} python -m pip install git+https://github.com/huggingface/accelerate | ||
- name: Environment | ||
shell: arch -arch arm64 bash {0} | ||
run: | | ||
${CONDA_RUN} python utils/print_env.py | ||
- name: Run slow PyTorch tests on M1 (MPS) | ||
shell: arch -arch arm64 bash {0} | ||
env: | ||
HF_HOME: /System/Volumes/Data/mnt/cache | ||
HUGGING_FACE_HUB_TOKEN: ${{ secrets.HUGGING_FACE_HUB_TOKEN }} | ||
run: | | ||
${CONDA_RUN} python -m pytest -n 1 -s -v --make-reports=tests_torch_mps tests/ | ||
- name: Failure short reports | ||
if: ${{ failure() }} | ||
run: cat reports/tests_torch_mps_failures_short.txt | ||
|
||
- name: Test suite reports artifacts | ||
if: ${{ always() }} | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: torch_mps_test_reports | ||
path: reports |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -153,4 +153,4 @@ jobs: | |
uses: actions/upload-artifact@v2 | ||
with: | ||
name: examples_test_reports | ||
path: reports | ||
path: reports |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters