From 137837d978d9fa323938eebb6711b61d0f07ad40 Mon Sep 17 00:00:00 2001 From: Jirka Borovec <6035284+Borda@users.noreply.github.com> Date: Thu, 4 May 2023 20:25:46 +0200 Subject: [PATCH] ci: drop secondary pkg for LAI (#17565) --- .azure/gpu-tests-pytorch.yml | 8 ++++++++ .github/workflows/ci-tests-pytorch.yml | 9 +++++++-- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/.azure/gpu-tests-pytorch.yml b/.azure/gpu-tests-pytorch.yml index 5df5dad4b4..a0f6233aa6 100644 --- a/.azure/gpu-tests-pytorch.yml +++ b/.azure/gpu-tests-pytorch.yml @@ -113,6 +113,14 @@ jobs: pip install -e ".[${extra}dev]" -r requirements/_integrations/strategies.txt pytest-timeout -U --find-links ${TORCH_URL} displayName: 'Install package & dependencies' + - bash: pip uninstall -y lightning + condition: eq(variables['PACKAGE_NAME'], 'pytorch') + # Lightning is dependency of Habana or other accelerators/integrations so in case we test PL we need to remove it + displayName: 'Drop LAI from extensions' + - bash: pip uninstall -y pytorch-lightning + condition: eq(variables['PACKAGE_NAME'], 'lightning') + displayName: 'Drop PL for LAI' + - bash: | set -e python requirements/collect_env_details.py diff --git a/.github/workflows/ci-tests-pytorch.yml b/.github/workflows/ci-tests-pytorch.yml index 923b9a27c6..391b59ec88 100644 --- a/.github/workflows/ci-tests-pytorch.yml +++ b/.github/workflows/ci-tests-pytorch.yml @@ -121,6 +121,13 @@ jobs: "pytest-timeout" -r requirements/_integrations/accelerators.txt \ -f ${TORCH_URL} ${TORCH_PREINSTALL} -f ${PYPI_CACHE_DIR} --prefer-binary pip list + - name: Drop LAI from extensions + if: ${{ matrix.pkg-name != 'lightning' }} + # Lightning is dependency of Habana or other accelerators/integrations so in case we test PL we need to remove it + run: pip uninstall -y lightning + - name: Drop PL for LAI + if: ${{ matrix.pkg-name == 'lightning' }} + run: pip uninstall -y pytorch-lightning - name: Dump handy wheels if: github.event_name == 'push' && github.ref == 'refs/heads/master' continue-on-error: true @@ -148,8 +155,6 @@ jobs: python .actions/assistant.py copy_replace_imports --source_dir="./tests" \ --source_import="lightning.fabric,lightning.pytorch" \ --target_import="lightning_fabric,pytorch_lightning" - # Lightning is dependency of Habana or other accelerators/integrations so in case we test PL we need to remove it - pip uninstall -y lightning - name: Prevent using raw source run: rm -rf src/