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 \