From 4e54dfe985293df9e6e86828d7a2763d076879f5 Mon Sep 17 00:00:00 2001 From: Younes Belkada <49240599+younesbelkada@users.noreply.github.com> Date: Fri, 17 Nov 2023 19:17:31 +0100 Subject: [PATCH] [`Tests`/`LoRA`/`PEFT`] Test also on PEFT / transformers / accelerate latest (#5820) * add also peft latest on peft CI * up * up * up * Update .github/workflows/pr_test_peft_backend.yml --------- Co-authored-by: Sayak Paul --- .github/workflows/pr_test_peft_backend.yml | 24 ++++++++++------------ 1 file changed, 11 insertions(+), 13 deletions(-) diff --git a/.github/workflows/pr_test_peft_backend.yml b/.github/workflows/pr_test_peft_backend.yml index f5ff3c4444..78050ffe82 100644 --- a/.github/workflows/pr_test_peft_backend.yml +++ b/.github/workflows/pr_test_peft_backend.yml @@ -20,20 +20,15 @@ jobs: strategy: fail-fast: false matrix: - config: - - name: LoRA - framework: lora - runner: docker-cpu - image: diffusers/diffusers-pytorch-cpu - report: torch_cpu_lora + lib-versions: ["main", "latest"] - name: ${{ matrix.config.name }} + name: LoRA - ${{ matrix.lib-versions }} - runs-on: ${{ matrix.config.runner }} + runs-on: docker-cpu container: - image: ${{ matrix.config.image }} + image: diffusers/diffusers-pytorch-cpu options: --shm-size "16gb" --ipc host -v /mnt/hf_cache:/mnt/cache/ defaults: @@ -50,16 +45,19 @@ jobs: run: | apt-get update && apt-get install libsndfile1-dev libgl1 -y python -m pip install -e .[quality,test] - python -m pip install git+https://github.com/huggingface/accelerate.git - python -m pip install -U git+https://github.com/huggingface/transformers.git - python -m pip install -U git+https://github.com/huggingface/peft.git + if [ "${{ matrix.lib-version }}" == "main" ]; then + python -m pip install -U git+https://github.com/huggingface/peft.git + python -m pip install -U git+https://github.com/huggingface/transformers.git + python -m pip install -U git+https://github.com/huggingface/accelerate.git + else + python -m pip install -U peft transformers accelerate + fi - name: Environment run: | python utils/print_env.py - name: Run fast PyTorch LoRA CPU tests with PEFT backend - if: ${{ matrix.config.framework == 'lora' }} run: | python -m pytest -n 2 --max-worker-restart=0 --dist=loadfile \ -s -v \