From 3f4d21d25563f8533ed4ddd62294b4fe87511134 Mon Sep 17 00:00:00 2001 From: Jirka Date: Tue, 1 Nov 2022 21:24:43 +0100 Subject: [PATCH 1/2] adjust examples --- .github/workflows/ci-pytorch-tests.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/ci-pytorch-tests.yml b/.github/workflows/ci-pytorch-tests.yml index 61ac380c0659b..e124221c1ece6 100644 --- a/.github/workflows/ci-pytorch-tests.yml +++ b/.github/workflows/ci-pytorch-tests.yml @@ -194,6 +194,10 @@ jobs: name: unittest-results-${{ runner.os }}-py${{ matrix.python-version }}-${{ matrix.requires }}-${{ matrix.release }} path: tests/tests_pytorch/results-${{ runner.os }}-py${{ matrix.python-version }}-${{ matrix.requires }}-${{ matrix.release }}.xml + - name: Adjust examples + if: ${{ matrix.pkg-name != 'lightning' }} + run: python .actions/assistant.py copy_replace_imports --source_dir="./examples" --source_import="pytorch_lightning,lightning_lite" --target_import="lightning.pytorch,lightning.lite" + - name: Run Examples working-directory: ./examples run: python -m pytest test_pl_examples.py -v --durations=10 From 78233e99c6595a4e4991ee703135dab344c8a3d3 Mon Sep 17 00:00:00 2001 From: Jirka Borovec Date: Tue, 1 Nov 2022 21:39:42 +0100 Subject: [PATCH 2/2] Apply suggestions from code review Co-authored-by: Akihiro Nitta --- .github/workflows/ci-pytorch-tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci-pytorch-tests.yml b/.github/workflows/ci-pytorch-tests.yml index e124221c1ece6..fcd19181f6188 100644 --- a/.github/workflows/ci-pytorch-tests.yml +++ b/.github/workflows/ci-pytorch-tests.yml @@ -195,7 +195,7 @@ jobs: path: tests/tests_pytorch/results-${{ runner.os }}-py${{ matrix.python-version }}-${{ matrix.requires }}-${{ matrix.release }}.xml - name: Adjust examples - if: ${{ matrix.pkg-name != 'lightning' }} + if: ${{ matrix.pkg-name == 'lightning' }} run: python .actions/assistant.py copy_replace_imports --source_dir="./examples" --source_import="pytorch_lightning,lightning_lite" --target_import="lightning.pytorch,lightning.lite" - name: Run Examples