Compare commits

...

2 Commits

Author SHA1 Message Date
DN6
c438402b8c update 2024-08-19 13:34:10 +05:30
Dhruv Nair
dba4b508cf update 2024-08-16 06:12:39 +00:00

View File

@@ -290,64 +290,118 @@ jobs:
pip install slack_sdk tabulate pip install slack_sdk tabulate
python utils/log_reports.py >> $GITHUB_STEP_SUMMARY python utils/log_reports.py >> $GITHUB_STEP_SUMMARY
run_nightly_tests_apple_m1: # M1 runner currently not well supported
name: Nightly PyTorch MPS tests on MacOS # TODO: (Dhruv) add these back when we setup better testing for Apple Silicon
runs-on: [ self-hosted, apple-m1 ] # run_nightly_tests_apple_m1:
if: github.event_name == 'schedule' # name: Nightly PyTorch MPS tests on MacOS
# runs-on: [ self-hosted, apple-m1 ]
steps: # if: github.event_name == 'schedule'
- name: Checkout diffusers #
uses: actions/checkout@v3 # steps:
with: # - name: Checkout diffusers
fetch-depth: 2 # uses: actions/checkout@v3
# with:
- name: Clean checkout # fetch-depth: 2
shell: arch -arch arm64 bash {0} #
run: | # - name: Clean checkout
git clean -fxd # shell: arch -arch arm64 bash {0}
# run: |
- name: Setup miniconda # git clean -fxd
uses: ./.github/actions/setup-miniconda # - name: Setup miniconda
with: # uses: ./.github/actions/setup-miniconda
python-version: 3.9 # with:
# python-version: 3.9
- name: Install dependencies #
shell: arch -arch arm64 bash {0} # - name: Install dependencies
run: | # shell: arch -arch arm64 bash {0}
${CONDA_RUN} python -m pip install --upgrade pip uv # run: |
${CONDA_RUN} python -m uv pip install -e [quality,test] # ${CONDA_RUN} python -m pip install --upgrade pip uv
${CONDA_RUN} python -m uv pip install torch torchvision torchaudio --extra-index-url https://download.pytorch.org/whl/cpu # ${CONDA_RUN} python -m uv pip install -e [quality,test]
${CONDA_RUN} python -m uv pip install accelerate@git+https://github.com/huggingface/accelerate # ${CONDA_RUN} python -m uv pip install torch torchvision torchaudio --extra-index-url https://download.pytorch.org/whl/cpu
${CONDA_RUN} python -m uv pip install pytest-reportlog # ${CONDA_RUN} python -m uv pip install accelerate@git+https://github.com/huggingface/accelerate
# ${CONDA_RUN} python -m uv pip install pytest-reportlog
- name: Environment # - name: Environment
shell: arch -arch arm64 bash {0} # shell: arch -arch arm64 bash {0}
run: | # run: |
${CONDA_RUN} python utils/print_env.py # ${CONDA_RUN} python utils/print_env.py
# - name: Run nightly PyTorch tests on M1 (MPS)
- name: Run nightly PyTorch tests on M1 (MPS) # shell: arch -arch arm64 bash {0}
shell: arch -arch arm64 bash {0} # env:
env: # HF_HOME: /System/Volumes/Data/mnt/cache
HF_HOME: /System/Volumes/Data/mnt/cache # HF_TOKEN: ${{ secrets.HF_TOKEN }}
HF_TOKEN: ${{ secrets.HF_TOKEN }} # run: |
run: | # ${CONDA_RUN} python -m pytest -n 1 -s -v --make-reports=tests_torch_mps \
${CONDA_RUN} python -m pytest -n 1 -s -v --make-reports=tests_torch_mps \ # --report-log=tests_torch_mps.log \
--report-log=tests_torch_mps.log \ # tests/
tests/ # - name: Failure short reports
# if: ${{ failure() }}
- name: Failure short reports # run: cat reports/tests_torch_mps_failures_short.txt
if: ${{ failure() }} #
run: cat reports/tests_torch_mps_failures_short.txt # - name: Test suite reports artifacts
# if: ${{ always() }}
- name: Test suite reports artifacts # uses: actions/upload-artifact@v2
if: ${{ always() }} # with:
uses: actions/upload-artifact@v2 # name: torch_mps_test_reports
with: # path: reports
name: torch_mps_test_reports #
path: reports # - name: Generate Report and Notify Channel
# if: always()
- name: Generate Report and Notify Channel # run: |
if: always() # pip install slack_sdk tabulate
run: | # python utils/log_reports.py >> $GITHUB_STEP_SUMMARY run_nightly_tests_apple_m1:
pip install slack_sdk tabulate # name: Nightly PyTorch MPS tests on MacOS
python utils/log_reports.py >> $GITHUB_STEP_SUMMARY # runs-on: [ self-hosted, apple-m1 ]
# if: github.event_name == 'schedule'
#
# 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 uv
# ${CONDA_RUN} python -m uv pip install -e [quality,test]
# ${CONDA_RUN} python -m uv pip install torch torchvision torchaudio --extra-index-url https://download.pytorch.org/whl/cpu
# ${CONDA_RUN} python -m uv pip install accelerate@git+https://github.com/huggingface/accelerate
# ${CONDA_RUN} python -m uv pip install pytest-reportlog
# - name: Environment
# shell: arch -arch arm64 bash {0}
# run: |
# ${CONDA_RUN} python utils/print_env.py
# - name: Run nightly PyTorch tests on M1 (MPS)
# shell: arch -arch arm64 bash {0}
# env:
# HF_HOME: /System/Volumes/Data/mnt/cache
# HF_TOKEN: ${{ secrets.HF_TOKEN }}
# run: |
# ${CONDA_RUN} python -m pytest -n 1 -s -v --make-reports=tests_torch_mps \
# --report-log=tests_torch_mps.log \
# 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
#
# - name: Generate Report and Notify Channel
# if: always()
# run: |
# pip install slack_sdk tabulate
# python utils/log_reports.py >> $GITHUB_STEP_SUMMARY