From 2c61c83d0afa65716c8e8fca55f0e2757214e84e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Carlos=20Mochol=C3=AD?= Date: Thu, 18 Aug 2022 17:49:55 +0200 Subject: [PATCH 01/22] Add a required job checker as an action --- .github/workflows/probot-check-group.yml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 .github/workflows/probot-check-group.yml diff --git a/.github/workflows/probot-check-group.yml b/.github/workflows/probot-check-group.yml new file mode 100644 index 0000000000000..90203d71e5ab6 --- /dev/null +++ b/.github/workflows/probot-check-group.yml @@ -0,0 +1,15 @@ +name: Probot + +on: + pull_request: + types: [opened] + check_run: {} + workflow_dispatch: {} + +jobs: + required-jobs: + runs-on: ubuntu-latest + steps: + - uses: carmocca/probot@v2 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} From 239131b5133c48e0a3393e8f0839dc2834a7ca0c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Carlos=20Mochol=C3=AD?= Date: Thu, 18 Aug 2022 18:22:26 +0200 Subject: [PATCH 02/22] Is negation messing things up? --- .github/checkgroup.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/checkgroup.yml b/.github/checkgroup.yml index 4b67bc076b32d..cbcf42a594f1b 100644 --- a/.github/checkgroup.yml +++ b/.github/checkgroup.yml @@ -73,7 +73,6 @@ subprojects: - id: "pytorch_lightning: Docker" paths: - "dockers/**" - - "!dockers/README.md" - "requirements.txt" - "requirements/*.txt" - "requirements/pytorch/*" From 85131269b7d84260e18d3d373c04d55635b50c7b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Carlos=20Mochol=C3=AD?= Date: Tue, 23 Aug 2022 18:18:40 +0200 Subject: [PATCH 03/22] Revert "Revert "Remove skipping logic in favor of path filtering (#14170)" (#14244)" This reverts commit fcf9b42df9549ae5c4f6c46c07679649bd58c90d. --- .azure/app-cloud-e2e.yml | 6 +++ .azure/gpu-benchmark.yml | 1 + .azure/gpu-tests.yml | 59 ++++++++++----------- .azure/hpu-tests.yml | 1 + .azure/ipu-tests.yml | 1 + .github/checkgroup.yml | 36 +++++++++---- .github/file-filters.yml | 9 ---- .github/workflows/ci-app-examples.yml | 7 +++ .github/workflows/ci-app-tests.yml | 4 +- .github/workflows/ci-pytorch-test-conda.yml | 35 +++--------- .github/workflows/ci-pytorch-test-full.yml | 54 +++++-------------- .github/workflows/ci-pytorch-test-slow.yml | 38 ++++--------- 12 files changed, 102 insertions(+), 149 deletions(-) delete mode 100644 .github/file-filters.yml diff --git a/.azure/app-cloud-e2e.yml b/.azure/app-cloud-e2e.yml index d5aeee88c020a..b211eac09afd0 100644 --- a/.azure/app-cloud-e2e.yml +++ b/.azure/app-cloud-e2e.yml @@ -12,6 +12,12 @@ trigger: - "master" - "release/*" - "refs/tags/*" + paths: + include: + - ".azure/app-cloud-e2e.yml" + - "requirements/app/**" + - "src/lightning_app/**" + - "examples/app_*" pr: - "master" diff --git a/.azure/gpu-benchmark.yml b/.azure/gpu-benchmark.yml index 968186fbd275d..52ba7a7e54db7 100644 --- a/.azure/gpu-benchmark.yml +++ b/.azure/gpu-benchmark.yml @@ -12,6 +12,7 @@ trigger: - "master" - "release/*" - "refs/tags/*" + # TODO: add paths pr: none diff --git a/.azure/gpu-tests.yml b/.azure/gpu-tests.yml index d3fb42d33d278..3b14d87353ae6 100644 --- a/.azure/gpu-tests.yml +++ b/.azure/gpu-tests.yml @@ -12,15 +12,30 @@ trigger: - "master" - "release/*" - "refs/tags/*" + paths: + include: + - ".azure/gpu-tests.yml" + - "examples/run_ddp_examples.sh" + - "examples/convert_from_pt_to_pl/**" + - "examples/run_pl_examples.sh" + - "examples/pl_basics/backbone_image_classifier.py" + - "examples/pl_basics/autoencoder.py" + - "examples/pl_loops/mnist_lite.py" + - "examples/pl_fault_tolerant/automatic.py" + - "examples/test_pl_examples.py" + - "examples/pl_integrations/dali_image_classifier.py" + - "requirements/pytorch/**" + - "src/pytorch_lightning/**" + - "tests/tests_pytorch/**" + - "setup.cfg" + - "pyproject.toml" + - ".github/workflows/ci-pytorch*.yml" + - ".github/workflows/docs-*.yml" pr: - "master" - "release/*" -variables: - - name: continue - value: '1' - jobs: - job: testing strategy: @@ -41,22 +56,6 @@ jobs: clean: all steps: - - - bash: | - CHANGED_FILES=$(git diff --name-status origin/master -- . | awk '{print $2}') - FILTER='src/pytorch_lightning|requirements/pytorch|tests/tests_pytorch|examples/pl_*' - echo $CHANGED_FILES > changed_files.txt - MATCHES=$(cat changed_files.txt | grep -E $FILTER) - echo $MATCHES - if [ -z "$MATCHES" ]; then - echo "Skip" - echo "##vso[task.setvariable variable=continue]0" - else - echo "Continue" - echo "##vso[task.setvariable variable=continue]1" - fi - displayName: Skipper - - bash: | lspci | egrep 'VGA|3D' whereis nvidia @@ -66,7 +65,6 @@ jobs: pip --version pip list displayName: 'Image info & NVIDIA' - condition: eq(variables['continue'], '1') - bash: | set -e @@ -82,7 +80,6 @@ jobs: PACKAGE_NAME: pytorch FREEZE_REQUIREMENTS: 1 displayName: 'Install dependencies' - condition: eq(variables['continue'], '1') - bash: | set -e @@ -91,16 +88,13 @@ jobs: python requirements/pytorch/check-avail-strategies.py python requirements/pytorch/check-avail-extras.py displayName: 'Env details' - condition: eq(variables['continue'], '1') - bash: bash .actions/pull_legacy_checkpoints.sh displayName: 'Get legacy checkpoints' - condition: eq(variables['continue'], '1') - bash: python -m coverage run --source pytorch_lightning -m pytest workingDirectory: src/pytorch_lightning displayName: 'Testing: PyTorch doctests' - condition: eq(variables['continue'], '1') - bash: python -m coverage run --source pytorch_lightning -m pytest --ignore benchmarks -v --junitxml=$(Build.StagingDirectory)/test-results.xml --durations=50 env: @@ -108,7 +102,6 @@ jobs: workingDirectory: tests/tests_pytorch displayName: 'Testing: PyTorch standard' timeoutInMinutes: "35" - condition: eq(variables['continue'], '1') - bash: bash run_standalone_tests.sh workingDirectory: tests/tests_pytorch @@ -117,7 +110,14 @@ jobs: PL_RUN_CUDA_TESTS: "1" displayName: 'Testing: PyTorch standalone tests' timeoutInMinutes: "35" - condition: eq(variables['continue'], '1') + + - bash: bash run_standalone_tasks.sh + workingDirectory: tests/tests_pytorch + env: + PL_USE_MOCKED_MNIST: "1" + PL_RUN_CUDA_TESTS: "1" + displayName: 'Testing: PyTorch standalone tasks' + timeoutInMinutes: "10" - bash: | python -m coverage report @@ -127,14 +127,13 @@ jobs: ls -l workingDirectory: tests/tests_pytorch displayName: 'Statistics' - condition: eq(variables['continue'], '1') - task: PublishTestResults@2 displayName: 'Publish test results' inputs: testResultsFiles: '$(Build.StagingDirectory)/test-results.xml' testRunTitle: '$(Agent.OS) - $(Build.DefinitionName) - Python $(python.version)' - condition: and(succeededOrFailed(), eq(variables['continue'], '1')) + condition: succeededOrFailed() - script: | set -e @@ -146,11 +145,9 @@ jobs: env: PL_USE_MOCKED_MNIST: "1" displayName: 'Testing: PyTorch examples' - condition: eq(variables['continue'], '1') - bash: python -m pytest benchmarks -v --maxfail=2 --durations=0 workingDirectory: tests/tests_pytorch env: PL_RUN_CUDA_TESTS: "1" displayName: 'Testing: PyTorch benchmarks' - condition: eq(variables['continue'], '1') diff --git a/.azure/hpu-tests.yml b/.azure/hpu-tests.yml index bdfada907cac9..24ad073e23045 100644 --- a/.azure/hpu-tests.yml +++ b/.azure/hpu-tests.yml @@ -9,6 +9,7 @@ trigger: - "master" - "release/*" - "refs/tags/*" + # TODO: add paths pr: - "master" diff --git a/.azure/ipu-tests.yml b/.azure/ipu-tests.yml index a4d68318834a6..44295f89e78fe 100644 --- a/.azure/ipu-tests.yml +++ b/.azure/ipu-tests.yml @@ -7,6 +7,7 @@ trigger: - master - release/* - refs/tags/* + # TODO: add paths pr: - master diff --git a/.github/checkgroup.yml b/.github/checkgroup.yml index cbcf42a594f1b..846509fcd5a72 100644 --- a/.github/checkgroup.yml +++ b/.github/checkgroup.yml @@ -6,15 +6,6 @@ subprojects: checks: - "test-on-tpus" - - id: "CI: Azure" - paths: - - ".azure/**" - checks: - - "pytorch-lightning (GPUs)" - - "pytorch-lightning (GPUs) (testing PyTorch - stable)" - - "pytorch-lightning (HPUs)" - - "pytorch-lightning (IPUs)" - - id: "pytorch_lightning" paths: # all examples don't need to be added because they aren't used in CI, but these are @@ -60,6 +51,26 @@ subprojects: - "slow (windows-2022, 3.7, 1.11)" - "test-on-tpus" + - id: "pytorch_lightning: Azure GPU" + paths: + - ".azure/gpu-tests.yml" + checks: + - "pytorch-lightning (GPUs)" + - "pytorch-lightning (GPUs) (testing PyTorch - stable)" + + - id: "pytorch_lightning: Azure HPU" + paths: + - ".azure/hpu-tests.yml" + checks: + - "pytorch-lightning (HPUs)" + - "pytorch-lightning (IPUs)" + + - id: "pytorch_lightning: Azure IPU" + paths: + - ".azure/ipu-tests.yml" + checks: + - "pytorch-lightning (IPUs)" + - id: "pytorch_lightning: Docs" paths: - "docs/source-pytorch/**" @@ -107,7 +118,6 @@ subprojects: - id: "lightning_app" paths: - - ".azure/app-cloud-e2e.yml" - "requirements/app/**" - "src/lightning_app/**" - "tests/tests_app/**" @@ -126,6 +136,12 @@ subprojects: - "pytest (windows-2022, 3.8, latest)" - "pytest (windows-2022, 3.8, oldest)" + - id: "lightning_app: Azure" + paths: + - ".azure/app-cloud-e2e.yml" + checks: + - "App.cloud-e2e" + - id: "lightning_app: Docs" paths: - "docs/source-app/**" diff --git a/.github/file-filters.yml b/.github/file-filters.yml deleted file mode 100644 index e621cd83881e4..0000000000000 --- a/.github/file-filters.yml +++ /dev/null @@ -1,9 +0,0 @@ -# This file contains filters to be used in the CI to detect file changes and run the required CI jobs. - -app_examples: - - "src/lightning_app/**" - - "tests/tests_app_examples/**" - - "requirements/app/**" - - "examples/app_*" - - "setup.py" - - "src/pytorch_lightning/__version__.py" diff --git a/.github/workflows/ci-app-examples.yml b/.github/workflows/ci-app-examples.yml index 8af5a2fc5a39e..2a2c94079f3e6 100644 --- a/.github/workflows/ci-app-examples.yml +++ b/.github/workflows/ci-app-examples.yml @@ -6,6 +6,13 @@ on: # Trigger the workflow on push or pull request, but only for the master bran branches: [master, "release/*"] pull_request: branches: [master, "release/*"] + paths: + - ".github/workflows/ci-app-examples.yml" + - "requirements/app/**" + - "src/lightning_app/**" + - "tests/tests_app_examples/**" + # the examples are used in the app CI + - "examples/app_*" concurrency: group: ${{ github.workflow }}-${{ github.ref }}-${{ github.head_ref }} diff --git a/.github/workflows/ci-app-tests.yml b/.github/workflows/ci-app-tests.yml index 8d9c538eb665b..852739f66538f 100644 --- a/.github/workflows/ci-app-tests.yml +++ b/.github/workflows/ci-app-tests.yml @@ -6,10 +6,10 @@ on: # Trigger the workflow on push or pull request, but only for the master bran branches: [master, "release/*"] pull_request: paths: + - ".github/workflows/ci-app-tests.yml" + - "requirements/app/**" - "src/lightning_app/**" - "tests/tests_app/**" - - "requirements/app/**" - - "setup.py" concurrency: group: ${{ github.workflow }}-${{ github.ref }}-${{ github.head_ref }} diff --git a/.github/workflows/ci-pytorch-test-conda.yml b/.github/workflows/ci-pytorch-test-conda.yml index 2a63189caa019..9d82d28256dd7 100644 --- a/.github/workflows/ci-pytorch-test-conda.yml +++ b/.github/workflows/ci-pytorch-test-conda.yml @@ -6,6 +6,12 @@ on: # Trigger the workflow on push or pull request, but only for the master bra branches: [master, "release/*"] pull_request: branches: [master, "release/*"] + paths: + - "requirements/pytorch/**" + - "src/pytorch_lightning/**" + - "tests/tests_pytorch/**" + - "setup.cfg" # includes pytest config + - ".github/workflows/ci-pytorch-test-conda.yml" concurrency: group: ${{ github.workflow }}-${{ github.ref }}-${{ github.head_ref }} @@ -35,28 +41,7 @@ jobs: - uses: actions/checkout@v2 - - name: Get changed files - id: changed-files - uses: tj-actions/changed-files@v28 - - - name: Decide if the test should be skipped - id: skip - shell: bash -l {0} - run: | - FILTER='src/pytorch_lightning|requirements/pytorch|tests/tests_pytorch|examples/pl_*' - echo "${{ steps.changed-files.outputs.all_changed_files }}" | tr " " "\n" > changed_files.txt - MATCHES=$(cat changed_files.txt | grep -E $FILTER) - echo $MATCHES - if [ -z "$MATCHES" ]; then - echo "Skip" - echo "::set-output name=continue::0" - else - echo "Continue" - echo "::set-output name=continue::1" - fi - - name: Update base dependencies - if: ${{ (steps.skip.outputs.continue == '1') }} env: PACKAGE_NAME: pytorch FREEZE_REQUIREMENTS: 1 @@ -70,12 +55,10 @@ jobs: run: pip install "Pillow<9.0" # It messes with torchvision - name: DocTests - if: ${{ (steps.skip.outputs.continue == '1') }} working-directory: ./src run: pytest pytorch_lightning --cov=pytorch_lightning - name: Update all dependencies - if: ${{ (steps.skip.outputs.continue == '1') }} env: HOROVOD_BUILD_ARCH_FLAGS: "-mfma" HOROVOD_WITHOUT_MXNET: 1 @@ -95,11 +78,9 @@ jobs: python requirements/pytorch/check-avail-extras.py - name: Pull legacy checkpoints - if: ${{ (steps.skip.outputs.continue == '1') }} run: bash .actions/pull_legacy_checkpoints.sh - name: Testing PyTorch - if: ${{ (steps.skip.outputs.continue == '1') }} working-directory: tests/tests_pytorch run: coverage run --source pytorch_lightning -m pytest -v --timeout 150 --durations=50 --junitxml=results-${{ runner.os }}-torch${{ matrix.pytorch-version }}.xml @@ -111,7 +92,7 @@ jobs: if: failure() - name: Statistics - if: ${{ success() && (steps.skip.outputs.continue == '1') }} + if: success() working-directory: tests/tests_pytorch run: | coverage report @@ -119,7 +100,7 @@ jobs: - name: Upload coverage to Codecov uses: codecov/codecov-action@v3 - if: ${{ success() && (steps.skip.outputs.continue == '1') }} + if: success() # see: https://github.com/actions/toolkit/issues/399 continue-on-error: true with: diff --git a/.github/workflows/ci-pytorch-test-full.yml b/.github/workflows/ci-pytorch-test-full.yml index 6f246e62e35fb..386bb012b8cc6 100644 --- a/.github/workflows/ci-pytorch-test-full.yml +++ b/.github/workflows/ci-pytorch-test-full.yml @@ -7,6 +7,12 @@ on: # Trigger the workflow on push or pull request, but only for the master bra pull_request: branches: [master, "release/*"] types: [opened, reopened, ready_for_review, synchronize] + paths: + - "requirements/pytorch/**" + - "src/pytorch_lightning/**" + - "tests/tests_pytorch/**" + - "setup.cfg" # includes pytest config + - ".github/workflows/ci-pytorch-test-full.yml" concurrency: group: ${{ github.workflow }}-${{ github.ref }}-${{ github.head_ref }} @@ -37,67 +43,42 @@ jobs: steps: - uses: actions/checkout@v2 - - name: Get changed files - id: changed-files - uses: tj-actions/changed-files@v28 - - - name: Decide if the test should be skipped - id: skip - shell: bash -l {0} - run: | - FILTER='src/pytorch_lightning|requirements/pytorch|tests/tests_pytorch|examples/pl_*' - echo "${{ steps.changed-files.outputs.all_changed_files }}" | tr " " "\n" > changed_files.txt - MATCHES=$(cat changed_files.txt | grep -E $FILTER) - echo $MATCHES - if [ -z "$MATCHES" ]; then - echo "Skip" - echo "::set-output name=continue::0" - else - echo "Continue" - echo "::set-output name=continue::1" - fi - - name: Set up Python ${{ matrix.python-version }} - if: ${{ (steps.skip.outputs.continue == '1') }} uses: actions/setup-python@v4 with: python-version: ${{ matrix.python-version }} - name: Reset caching - if: ${{ (steps.skip.outputs.continue == '1') }} run: python -c "import time; days = time.time() / 60 / 60 / 24; print(f'TIME_PERIOD=d{int(days / 2) * 2}')" >> $GITHUB_ENV - name: basic setup - if: ${{ (steps.skip.outputs.continue == '1') }} run: | pip --version pip install -q fire # Github Actions: Run step on specific OS: https://stackoverflow.com/a/57948488/4521646 - name: Setup macOS - if: ${{ (runner.os == 'macOS') && (steps.skip.outputs.continue == '1') }} + if: ${{ (runner.os == 'macOS') }} run: | brew install openmpi libuv # Horovod on macOS requires OpenMPI, Gloo not currently supported - name: Setup Windows - if: ${{ (runner.os == 'windows') && (steps.skip.outputs.continue == '1') }} + if: ${{ (runner.os == 'windows') }} run: | python .actions/assistant.py requirements_prune_pkgs horovod - name: Set min. dependencies - if: ${{ (matrix.requires == 'oldest') && (steps.skip.outputs.continue == '1') }} + if: ${{ (matrix.requires == 'oldest') }} run: | python .actions/assistant.py replace_oldest_ver # Note: This uses an internal pip API and may not always work # https://github.com/actions/cache/blob/master/examples.md#multiple-oss-in-a-workflow - name: Get pip cache dir - if: ${{ (steps.skip.outputs.continue == '1') }} id: pip-cache run: echo "::set-output name=dir::$(pip cache dir)" - name: pip cache - if: ${{ (steps.skip.outputs.continue == '1') }} uses: actions/cache@v3 with: path: ${{ steps.pip-cache.outputs.dir }} @@ -106,11 +87,9 @@ jobs: ${{ runner.os }}-pip-td${{ env.TIME_PERIOD }}-py${{ matrix.python-version }}-${{ matrix.release }}-${{ matrix.requires }}- - name: Pull legacy checkpoints - if: ${{ (steps.skip.outputs.continue == '1') }} run: bash .actions/pull_legacy_checkpoints.sh - name: Install dependencies - if: ${{ (steps.skip.outputs.continue == '1') }} env: PACKAGE_NAME: pytorch FREEZE_REQUIREMENTS: 1 @@ -122,12 +101,10 @@ jobs: shell: bash - name: DocTests - if: ${{ (steps.skip.outputs.continue == '1') }} working-directory: ./src run: pytest pytorch_lightning --cov=pytorch_lightning - name: Install extra dependencies - if: ${{ (steps.skip.outputs.continue == '1') }} run: | # adjust versions according installed Torch version python ./requirements/pytorch/adjust-versions.py requirements/pytorch/extra.txt @@ -136,7 +113,7 @@ jobs: shell: bash - name: Reinstall Horovod if necessary - if: ${{ (runner.os != 'windows') && (steps.skip.outputs.continue == '1') }} + if: ${{ (runner.os != 'windows') }} env: HOROVOD_BUILD_ARCH_FLAGS: "-mfma" HOROVOD_WITHOUT_MXNET: 1 @@ -153,43 +130,38 @@ jobs: shell: bash - name: Cache datasets - if: ${{ (steps.skip.outputs.continue == '1') }} uses: actions/cache@v3 with: path: Datasets key: pl-dataset - name: Sanity check - if: ${{ (steps.skip.outputs.continue == '1') }} run: python requirements/pytorch/check-avail-extras.py - name: Testing PyTorch - if: ${{ (steps.skip.outputs.continue == '1') }} working-directory: tests/tests_pytorch # NOTE: do not include coverage report here, see: https://github.com/nedbat/coveragepy/issues/1003 run: coverage run --source pytorch_lightning -m pytest -v --durations=50 --junitxml=results-${{ runner.os }}-py${{ matrix.python-version }}-${{ matrix.requires }}-${{ matrix.release }}.xml - name: Upload pytest results - if: ${{ (failure()) && (steps.skip.outputs.continue == '1') }} + if: failure() uses: actions/upload-artifact@v3 with: 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: Prepare Examples - if: ${{ (steps.skip.outputs.continue == '1') }} run: | # adjust versions according installed Torch version python ./requirements/pytorch/adjust-versions.py requirements/pytorch/examples.txt pip install -r requirements/pytorch/examples.txt --find-links https://download.pytorch.org/whl/cpu/torch_stable.html --upgrade - name: Run Examples - if: ${{ (steps.skip.outputs.continue == '1') }} working-directory: ./examples run: python -m pytest test_pl_examples.py -v --durations=10 - name: Statistics - if: ${{ (success()) && (steps.skip.outputs.continue == '1') }} + if: success() working-directory: tests/tests_pytorch run: | coverage report @@ -197,7 +169,7 @@ jobs: - name: Upload coverage to Codecov uses: codecov/codecov-action@v3 - if: ${{ (always()) && (steps.skip.outputs.continue == '1') }} + if: always() # see: https://github.com/actions/toolkit/issues/399 continue-on-error: true with: diff --git a/.github/workflows/ci-pytorch-test-slow.yml b/.github/workflows/ci-pytorch-test-slow.yml index 194a0bd910010..8e97ea90b2bc4 100644 --- a/.github/workflows/ci-pytorch-test-slow.yml +++ b/.github/workflows/ci-pytorch-test-slow.yml @@ -7,6 +7,12 @@ on: # Trigger the workflow on push or pull request, but only for the master bra pull_request: branches: [master, "release/*"] types: [opened, reopened, ready_for_review, synchronize] + paths: + - "requirements/pytorch/**" + - "src/pytorch_lightning/**" + - "tests/tests_pytorch/**" + - "setup.cfg" # includes pytest config + - ".github/workflows/ci-pytorch-test-slow.yml" concurrency: group: ${{ github.workflow }}-${{ github.ref }}-${{ github.head_ref }} @@ -28,43 +34,19 @@ jobs: steps: - uses: actions/checkout@v2 - - name: Get changed files - id: changed-files - uses: tj-actions/changed-files@v28 - - - name: Decide if the test should be skipped - id: skip - shell: bash -l {0} - run: | - FILTER='src/pytorch_lightning|requirements/pytorch|tests/tests_pytorch|examples/pl_*' - echo "${{ steps.changed-files.outputs.all_changed_files }}" | tr " " "\n" > changed_files.txt - MATCHES=$(cat changed_files.txt | grep -E $FILTER) - echo $MATCHES - if [ -z "$MATCHES" ]; then - echo "Skip" - echo "::set-output name=continue::0" - else - echo "Continue" - echo "::set-output name=continue::1" - fi - - uses: actions/setup-python@v4 - if: ${{ (steps.skip.outputs.continue == '1') }} with: python-version: ${{ matrix.python-version }} - name: Reset caching - if: ${{ (steps.skip.outputs.continue == '1') }} run: python -c "import time; days = time.time() / 60 / 60 / 24; print(f'TIME_PERIOD=d{int(days / 2) * 2}')" >> $GITHUB_ENV - name: Get pip cache - if: ${{ (steps.skip.outputs.continue == '1') }} id: pip-cache run: | python -c "from pip._internal.locations import USER_CACHE_DIR; print('::set-output name=dir::' + USER_CACHE_DIR)" - name: Cache pip - if: ${{ (steps.skip.outputs.continue == '1') }} uses: actions/cache@v3 with: path: ${{ steps.pip-cache.outputs.dir }} @@ -73,7 +55,6 @@ jobs: ${{ runner.os }}-pip-td${{ env.TIME_PERIOD }}-py${{ matrix.python-version }}- - name: Install dependencies - if: ${{ (steps.skip.outputs.continue == '1') }} env: PACKAGE_NAME: pytorch FREEZE_REQUIREMENTS: 1 @@ -85,21 +66,20 @@ jobs: shell: bash - name: Testing PyTorch - if: ${{ (steps.skip.outputs.continue == '1') }} working-directory: tests/tests_pytorch run: coverage run --source pytorch_lightning -m pytest -v --junitxml=results-${{ runner.os }}-py${{ matrix.python-version }}.xml env: PL_RUN_SLOW_TESTS: 1 - name: Upload pytest test results - if: ${{ (failure()) && (steps.skip.outputs.continue == '1') }} + if: failure() uses: actions/upload-artifact@v3 with: name: unittest-results-${{ runner.os }}-py${{ matrix.python-version }} path: tests/tests_pytorch/results-${{ runner.os }}-py${{ matrix.python-version }}.xml - name: Statistics - if: ${{ (success()) && (steps.skip.outputs.continue == '1') }} + if: success() working-directory: tests/tests_pytorch run: | coverage report @@ -107,7 +87,7 @@ jobs: - name: Upload coverage to Codecov uses: codecov/codecov-action@v3 - if: ${{ (success()) && (steps.skip.outputs.continue == '1') }} + if: success() # see: https://github.com/actions/toolkit/issues/399 continue-on-error: true with: From 3509acddeab9a24896f82c5fb0d2c3cbb91cdddb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Carlos=20Mochol=C3=AD?= Date: Tue, 23 Aug 2022 18:20:01 +0200 Subject: [PATCH 04/22] Add Azure path filters --- .azure/gpu-tests.yml | 4 ---- .azure/hpu-tests.yml | 8 +++++++- .azure/ipu-tests.yml | 7 ++++++- 3 files changed, 13 insertions(+), 6 deletions(-) diff --git a/.azure/gpu-tests.yml b/.azure/gpu-tests.yml index 3b14d87353ae6..85e78d5cfb311 100644 --- a/.azure/gpu-tests.yml +++ b/.azure/gpu-tests.yml @@ -27,10 +27,6 @@ trigger: - "requirements/pytorch/**" - "src/pytorch_lightning/**" - "tests/tests_pytorch/**" - - "setup.cfg" - - "pyproject.toml" - - ".github/workflows/ci-pytorch*.yml" - - ".github/workflows/docs-*.yml" pr: - "master" diff --git a/.azure/hpu-tests.yml b/.azure/hpu-tests.yml index 24ad073e23045..fa6ebe02c2303 100644 --- a/.azure/hpu-tests.yml +++ b/.azure/hpu-tests.yml @@ -9,7 +9,13 @@ trigger: - "master" - "release/*" - "refs/tags/*" - # TODO: add paths + paths: + include: + - ".azure/hpu-tests.yml" + - "examples/pl_hpu/mnist_sample.py" + - "requirements/pytorch/**" + - "src/pytorch_lightning/**" + - "tests/tests_pytorch/**" pr: - "master" diff --git a/.azure/ipu-tests.yml b/.azure/ipu-tests.yml index 44295f89e78fe..78b785b62cfe3 100644 --- a/.azure/ipu-tests.yml +++ b/.azure/ipu-tests.yml @@ -7,7 +7,12 @@ trigger: - master - release/* - refs/tags/* - # TODO: add paths + paths: + include: + - ".azure/ipu-tests.yml" + - "requirements/pytorch/**" + - "src/pytorch_lightning/**" + - "tests/tests_pytorch/**" pr: - master From 8fe42eb82b7c39068d8b937728c17815dfe5f4eb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Carlos=20Mochol=C3=AD?= Date: Thu, 18 Aug 2022 20:17:19 +0200 Subject: [PATCH 05/22] Change workflow triggers --- .github/workflows/probot-check-group.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/probot-check-group.yml b/.github/workflows/probot-check-group.yml index 90203d71e5ab6..c9c1e9146525a 100644 --- a/.github/workflows/probot-check-group.yml +++ b/.github/workflows/probot-check-group.yml @@ -1,10 +1,9 @@ name: Probot on: + check_run: pull_request: - types: [opened] - check_run: {} - workflow_dispatch: {} + workflow_dispatch: jobs: required-jobs: From c022259f5fdc91a3a9642ca9c3324bc7927cb18d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Carlos=20Mochol=C3=AD?= Date: Mon, 22 Aug 2022 18:52:30 +0200 Subject: [PATCH 06/22] Remove path that doesn't even run --- .github/checkgroup.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/checkgroup.yml b/.github/checkgroup.yml index 846509fcd5a72..c6518262c440a 100644 --- a/.github/checkgroup.yml +++ b/.github/checkgroup.yml @@ -122,7 +122,6 @@ subprojects: - "src/lightning_app/**" - "tests/tests_app/**" - "tests/tests_app_examples/**" - - "tests/tests_clusters/**" # the examples are used in the app CI - "examples/app_*" checks: From 236e194f989b70d08345a1e88cddbae3bf00a53b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Carlos=20Mochol=C3=AD?= Date: Tue, 23 Aug 2022 17:36:46 +0200 Subject: [PATCH 07/22] Support rerun with comment --- .github/workflows/probot-check-group.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/probot-check-group.yml b/.github/workflows/probot-check-group.yml index c9c1e9146525a..1b37e19c819b6 100644 --- a/.github/workflows/probot-check-group.yml +++ b/.github/workflows/probot-check-group.yml @@ -1,13 +1,14 @@ name: Probot on: - check_run: - pull_request: - workflow_dispatch: + check_run: {} + pull_request: {} + issue_comment: {types: [created]} jobs: required-jobs: runs-on: ubuntu-latest + if: github.event_name != 'issue_comment' || contains(github.event.comment.body, '@probot pls') steps: - uses: carmocca/probot@v2 env: From 84f2afb4ede32a68f2387f3dc2f9d9352b89b8fc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Carlos=20Mochol=C3=AD?= Date: Tue, 23 Aug 2022 18:23:07 +0200 Subject: [PATCH 08/22] Add a required job checker as an action (1/2) --- .github/checkgroup.yml | 38 ++++++++++++++++-------- .github/workflows/probot-check-group.yml | 15 ++++++++++ 2 files changed, 41 insertions(+), 12 deletions(-) create mode 100644 .github/workflows/probot-check-group.yml diff --git a/.github/checkgroup.yml b/.github/checkgroup.yml index 4b67bc076b32d..c6518262c440a 100644 --- a/.github/checkgroup.yml +++ b/.github/checkgroup.yml @@ -6,15 +6,6 @@ subprojects: checks: - "test-on-tpus" - - id: "CI: Azure" - paths: - - ".azure/**" - checks: - - "pytorch-lightning (GPUs)" - - "pytorch-lightning (GPUs) (testing PyTorch - stable)" - - "pytorch-lightning (HPUs)" - - "pytorch-lightning (IPUs)" - - id: "pytorch_lightning" paths: # all examples don't need to be added because they aren't used in CI, but these are @@ -60,6 +51,26 @@ subprojects: - "slow (windows-2022, 3.7, 1.11)" - "test-on-tpus" + - id: "pytorch_lightning: Azure GPU" + paths: + - ".azure/gpu-tests.yml" + checks: + - "pytorch-lightning (GPUs)" + - "pytorch-lightning (GPUs) (testing PyTorch - stable)" + + - id: "pytorch_lightning: Azure HPU" + paths: + - ".azure/hpu-tests.yml" + checks: + - "pytorch-lightning (HPUs)" + - "pytorch-lightning (IPUs)" + + - id: "pytorch_lightning: Azure IPU" + paths: + - ".azure/ipu-tests.yml" + checks: + - "pytorch-lightning (IPUs)" + - id: "pytorch_lightning: Docs" paths: - "docs/source-pytorch/**" @@ -73,7 +84,6 @@ subprojects: - id: "pytorch_lightning: Docker" paths: - "dockers/**" - - "!dockers/README.md" - "requirements.txt" - "requirements/*.txt" - "requirements/pytorch/*" @@ -108,12 +118,10 @@ subprojects: - id: "lightning_app" paths: - - ".azure/app-cloud-e2e.yml" - "requirements/app/**" - "src/lightning_app/**" - "tests/tests_app/**" - "tests/tests_app_examples/**" - - "tests/tests_clusters/**" # the examples are used in the app CI - "examples/app_*" checks: @@ -127,6 +135,12 @@ subprojects: - "pytest (windows-2022, 3.8, latest)" - "pytest (windows-2022, 3.8, oldest)" + - id: "lightning_app: Azure" + paths: + - ".azure/app-cloud-e2e.yml" + checks: + - "App.cloud-e2e" + - id: "lightning_app: Docs" paths: - "docs/source-app/**" diff --git a/.github/workflows/probot-check-group.yml b/.github/workflows/probot-check-group.yml new file mode 100644 index 0000000000000..1b37e19c819b6 --- /dev/null +++ b/.github/workflows/probot-check-group.yml @@ -0,0 +1,15 @@ +name: Probot + +on: + check_run: {} + pull_request: {} + issue_comment: {types: [created]} + +jobs: + required-jobs: + runs-on: ubuntu-latest + if: github.event_name != 'issue_comment' || contains(github.event.comment.body, '@probot pls') + steps: + - uses: carmocca/probot@v2 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} From bfd1145e938523c8c48d9dffc277159193e560ce Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Carlos=20Mochol=C3=AD?= Date: Tue, 23 Aug 2022 18:34:12 +0200 Subject: [PATCH 09/22] Fix app cloud job names --- .github/checkgroup.yml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/checkgroup.yml b/.github/checkgroup.yml index c6518262c440a..005d111f4f35a 100644 --- a/.github/checkgroup.yml +++ b/.github/checkgroup.yml @@ -125,7 +125,9 @@ subprojects: # the examples are used in the app CI - "examples/app_*" checks: - - "App.cloud-e2e" + - 'App.cloud-e2e (App_cloud_e2e_testing App: template_streamlit_ui)' + - 'App.cloud-e2e (App_cloud_e2e_testing App: boring_app)' + - 'App.cloud-e2e (App_cloud_e2e_testing App: v0_app)' - "doctest (app)" - "make-docs (app)" - "pytest (macOS-11, 3.8, latest)" @@ -139,7 +141,9 @@ subprojects: paths: - ".azure/app-cloud-e2e.yml" checks: - - "App.cloud-e2e" + - 'App.cloud-e2e (App_cloud_e2e_testing App: template_streamlit_ui)' + - 'App.cloud-e2e (App_cloud_e2e_testing App: boring_app)' + - 'App.cloud-e2e (App_cloud_e2e_testing App: v0_app)' - id: "lightning_app: Docs" paths: From 4222be9ec7e49de8fee2e32117681e32c9dcbeb3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Carlos=20Mochol=C3=AD?= Date: Tue, 23 Aug 2022 18:39:09 +0200 Subject: [PATCH 10/22] Update .azure/gpu-benchmark.yml --- .azure/gpu-benchmark.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.azure/gpu-benchmark.yml b/.azure/gpu-benchmark.yml index 52ba7a7e54db7..968186fbd275d 100644 --- a/.azure/gpu-benchmark.yml +++ b/.azure/gpu-benchmark.yml @@ -12,7 +12,6 @@ trigger: - "master" - "release/*" - "refs/tags/*" - # TODO: add paths pr: none From 1714ad9d19227ade1979fb12cbb6bfc341f36e4e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Carlos=20Mochol=C3=AD?= Date: Wed, 24 Aug 2022 01:10:04 +0200 Subject: [PATCH 11/22] Undo change --- .github/checkgroup.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/checkgroup.yml b/.github/checkgroup.yml index 3b117e09ef789..ace786f8ac40a 100644 --- a/.github/checkgroup.yml +++ b/.github/checkgroup.yml @@ -126,9 +126,7 @@ subprojects: # the examples are used in the app CI - "examples/app_*" checks: - - 'App.cloud-e2e (App_cloud_e2e_testing App: template_streamlit_ui)' - - 'App.cloud-e2e (App_cloud_e2e_testing App: boring_app)' - - 'App.cloud-e2e (App_cloud_e2e_testing App: v0_app)' + - "App.cloud-e2e" - "doctest (app)" - "make-docs (app)" - "pytest (macOS-11, 3.8, latest)" From 4fbe5b1b7ef21ff0b4338cf1c88906bbe5574a98 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Carlos=20Mochol=C3=AD?= Date: Thu, 1 Sep 2022 17:43:51 +0200 Subject: [PATCH 12/22] Cleanup --- .github/workflows/ci-pytorch-test-full.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci-pytorch-test-full.yml b/.github/workflows/ci-pytorch-test-full.yml index 386bb012b8cc6..2e2f232fd7d91 100644 --- a/.github/workflows/ci-pytorch-test-full.yml +++ b/.github/workflows/ci-pytorch-test-full.yml @@ -58,17 +58,17 @@ jobs: # Github Actions: Run step on specific OS: https://stackoverflow.com/a/57948488/4521646 - name: Setup macOS - if: ${{ (runner.os == 'macOS') }} + if: runner.os == 'macOS' run: | brew install openmpi libuv # Horovod on macOS requires OpenMPI, Gloo not currently supported - name: Setup Windows - if: ${{ (runner.os == 'windows') }} + if: runner.os == 'windows' run: | python .actions/assistant.py requirements_prune_pkgs horovod - name: Set min. dependencies - if: ${{ (matrix.requires == 'oldest') }} + if: matrix.requires == 'oldest' run: | python .actions/assistant.py replace_oldest_ver From fb52fff23ea17c0f3e1f8dc7cdbb2ebdbe2b7ebc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Carlos=20Mochol=C3=AD?= Date: Thu, 1 Sep 2022 17:47:30 +0200 Subject: [PATCH 13/22] Revert "ci: drop group probot (#14456)" This reverts commit 6188593abd7127fac85123c58a2f2414530d7c07. --- .github/workflows/probot-check-group.yml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 .github/workflows/probot-check-group.yml diff --git a/.github/workflows/probot-check-group.yml b/.github/workflows/probot-check-group.yml new file mode 100644 index 0000000000000..50413dd656c92 --- /dev/null +++ b/.github/workflows/probot-check-group.yml @@ -0,0 +1,16 @@ +name: Probot + +on: + check_run: {} + pull_request: {} + issue_comment: {types: [created]} + +jobs: + required-jobs: + runs-on: ubuntu-latest + if: github.event_name != 'issue_comment' || contains(github.event.comment.body, '@probot pls') + timeout-minutes: 5 + steps: + - uses: carmocca/probot@v2 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} From 0445664744aac1352a49aaaaf38993928a302ce5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Carlos=20Mochol=C3=AD?= Date: Thu, 1 Sep 2022 17:48:38 +0200 Subject: [PATCH 14/22] Skip check run --- .github/workflows/probot-check-group.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/probot-check-group.yml b/.github/workflows/probot-check-group.yml index 50413dd656c92..d66891596c4c9 100644 --- a/.github/workflows/probot-check-group.yml +++ b/.github/workflows/probot-check-group.yml @@ -1,7 +1,8 @@ name: Probot on: - check_run: {} + # TODO: this event type was hogging CI + # check_run: {} pull_request: {} issue_comment: {types: [created]} @@ -9,7 +10,7 @@ jobs: required-jobs: runs-on: ubuntu-latest if: github.event_name != 'issue_comment' || contains(github.event.comment.body, '@probot pls') - timeout-minutes: 5 + timeout-minutes: 3 steps: - uses: carmocca/probot@v2 env: From 453847143e2239c2c61b7d7b378211ef7132dd45 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Carlos=20Mochol=C3=AD?= Date: Mon, 5 Sep 2022 14:39:34 +0200 Subject: [PATCH 15/22] 60 min timeout, just pull_request event type --- .github/workflows/probot-check-group.yml | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/.github/workflows/probot-check-group.yml b/.github/workflows/probot-check-group.yml index d66891596c4c9..e2ce52aefbd1f 100644 --- a/.github/workflows/probot-check-group.yml +++ b/.github/workflows/probot-check-group.yml @@ -1,16 +1,13 @@ name: Probot on: - # TODO: this event type was hogging CI - # check_run: {} pull_request: {} - issue_comment: {types: [created]} jobs: required-jobs: runs-on: ubuntu-latest - if: github.event_name != 'issue_comment' || contains(github.event.comment.body, '@probot pls') - timeout-minutes: 3 + # if this timeout triggers, then the job needs to be manually restarted through the GitHub interface + timeout-minutes: 60 steps: - uses: carmocca/probot@v2 env: From 952d86d83b6c0c3b22d021c5727468f9b0e7a447 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Carlos=20Mochol=C3=AD?= Date: Wed, 7 Sep 2022 17:15:34 +0200 Subject: [PATCH 16/22] Merge master, resolve FIXMEs --- .azure/gpu-tests.yml | 21 +++++++++++++++++++-- .azure/ipu-tests.yml | 12 ++++++++++-- .github/workflows/ci-pytorch-test-full.yml | 2 +- 3 files changed, 30 insertions(+), 5 deletions(-) diff --git a/.azure/gpu-tests.yml b/.azure/gpu-tests.yml index 47e173f4d5b34..79ef67c106d3b 100644 --- a/.azure/gpu-tests.yml +++ b/.azure/gpu-tests.yml @@ -29,8 +29,25 @@ trigger: - "tests/tests_pytorch/**" pr: - - "master" - - "release/*" + branches: + include: + - "master" + - "release/*" + paths: + include: + - ".azure/gpu-tests.yml" + - "examples/run_ddp_examples.sh" + - "examples/convert_from_pt_to_pl/**" + - "examples/run_pl_examples.sh" + - "examples/pl_basics/backbone_image_classifier.py" + - "examples/pl_basics/autoencoder.py" + - "examples/pl_loops/mnist_lite.py" + - "examples/pl_fault_tolerant/automatic.py" + - "examples/test_pl_examples.py" + - "examples/pl_integrations/dali_image_classifier.py" + - "requirements/pytorch/**" + - "src/pytorch_lightning/**" + - "tests/tests_pytorch/**" jobs: - job: testing diff --git a/.azure/ipu-tests.yml b/.azure/ipu-tests.yml index 78b785b62cfe3..e6b6fcb246a08 100644 --- a/.azure/ipu-tests.yml +++ b/.azure/ipu-tests.yml @@ -15,8 +15,16 @@ trigger: - "tests/tests_pytorch/**" pr: - - master - - release/* + branches: + include: + - "master" + - "release/*" + paths: + include: + - ".azure/ipu-tests.yml" + - "requirements/pytorch/**" + - "src/pytorch_lightning/**" + - "tests/tests_pytorch/**" variables: - name: poplar_sdk diff --git a/.github/workflows/ci-pytorch-test-full.yml b/.github/workflows/ci-pytorch-test-full.yml index 760cfcfc0817c..c8e117c4698da 100644 --- a/.github/workflows/ci-pytorch-test-full.yml +++ b/.github/workflows/ci-pytorch-test-full.yml @@ -140,7 +140,7 @@ jobs: - name: Testing Warnings # the stacklevel can only be set on >=3.7 - if: ${{ (steps.skip.outputs.continue == '1') && ( matrix.python-version != '3.7' ) }} + if: matrix.python-version != '3.7' working-directory: tests/tests_pytorch # needs to run outside of `pytest` run: python utilities/test_warnings.py From 6c99afe18052ddd9f7a9a3e96a3a1a74e4f6b458 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Carlos=20Mochol=C3=AD?= Date: Wed, 7 Sep 2022 17:16:31 +0200 Subject: [PATCH 17/22] Comment --- .github/workflows/probot-check-group.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/probot-check-group.yml b/.github/workflows/probot-check-group.yml index e2ce52aefbd1f..dd3bfeff29eb3 100644 --- a/.github/workflows/probot-check-group.yml +++ b/.github/workflows/probot-check-group.yml @@ -7,6 +7,7 @@ jobs: required-jobs: runs-on: ubuntu-latest # if this timeout triggers, then the job needs to be manually restarted through the GitHub interface + # the probot implementation is set to check the status every 2 minutes timeout-minutes: 60 steps: - uses: carmocca/probot@v2 From 24d875047318f7063f499624a4ccb07b3364fa81 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Carlos=20Mochol=C3=AD?= Date: Wed, 7 Sep 2022 18:05:07 +0200 Subject: [PATCH 18/22] Configurable interval --- .github/workflows/probot-check-group.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/probot-check-group.yml b/.github/workflows/probot-check-group.yml index dd3bfeff29eb3..c3efec430805c 100644 --- a/.github/workflows/probot-check-group.yml +++ b/.github/workflows/probot-check-group.yml @@ -7,9 +7,10 @@ jobs: required-jobs: runs-on: ubuntu-latest # if this timeout triggers, then the job needs to be manually restarted through the GitHub interface - # the probot implementation is set to check the status every 2 minutes timeout-minutes: 60 steps: - uses: carmocca/probot@v2 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + interval: 60 # seconds From b5936b4828f2e2fb2d22283cff07ada07266c95b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Carlos=20Mochol=C3=AD?= Date: Wed, 7 Sep 2022 20:41:23 +0200 Subject: [PATCH 19/22] Update checkgroup config --- .github/checkgroup.yml | 59 +++++++++++++++++++++++++++++++++++------- 1 file changed, 50 insertions(+), 9 deletions(-) diff --git a/.github/checkgroup.yml b/.github/checkgroup.yml index e8892926f6e55..e97f9f888371f 100644 --- a/.github/checkgroup.yml +++ b/.github/checkgroup.yml @@ -6,6 +6,7 @@ subprojects: - id: "CI: CircleCI" paths: - ".circleci/**" + - ".github/workflows/ci-circleci.yml" checks: - "test-on-tpus" @@ -25,7 +26,6 @@ subprojects: - "src/pytorch_lightning/**" - "tests/tests_pytorch/**" - "setup.cfg" # includes pytest config - - ".github/workflows/ci-pytorch*.yml" - ".github/workflows/docs-*.yml" checks: - "pl-conda (3.8, 1.10)" @@ -41,6 +41,25 @@ subprojects: - "pl-cpu (windows-2022, 3.10, latest, stable)" - "pl-cpu (windows-2022, 3.7, latest, stable)" - "pl-cpu (windows-2022, 3.7, oldest, stable)" + - "make-doctest (pytorch)" + - "make-html (pytorch)" + - "mypy" + - "PR Gatekeeper (pytorch)" + - "pytorch-lightning (GPUs)" + - "pytorch-lightning (HPUs)" + - "pytorch-lightning (IPUs)" + - "pl-slow (macOS-11, 3.7, 1.11)" + - "pl-slow (ubuntu-20.04, 3.7, 1.11)" + - "pl-slow (windows-2022, 3.7, 1.11)" + - "test-on-tpus" + + - id: "lightning_lite" + paths: + - "requirements/lite/**" + - "src/lightning_lite/**" + - "tests/tests_lite/**" + - "setup.cfg" # includes pytest config + checks: - "lite-cpu (macOS-11, 3.10, latest, stable)" - "lite-cpu (macOS-11, 3.7, latest, stable)" - "lite-cpu (macOS-11, 3.7, oldest, stable)" @@ -50,17 +69,38 @@ subprojects: - "lite-cpu (windows-2022, 3.10, latest, stable)" - "lite-cpu (windows-2022, 3.7, latest, stable)" - "lite-cpu (windows-2022, 3.7, oldest, stable)" - - "make-doctest (pytorch)" - - "make-html (pytorch)" - "mypy" - - "PR Gatekeeper (pytorch)" - - "pytorch-lightning (GPUs)" - - "pytorch-lightning (HPUs)" - - "pytorch-lightning (IPUs)" + + - id: "pytorch_lightning: Conda" + paths: + - ".github/workflows/ci-pytorch-test-conda.yml" + checks: + - "pl-conda (3.8, 1.10)" + - "pl-conda (3.8, 1.9)" + - "pl-conda (3.9, 1.11)" + - "pl-conda (3.9, 1.12)" + + - id: "pytorch_lightning: CPU" + paths: + - ".github/workflows/ci-pytorch-test-full.yml" + checks: + - "pl-cpu (macOS-11, 3.10, latest, stable)" + - "pl-cpu (macOS-11, 3.7, latest, stable)" + - "pl-cpu (macOS-11, 3.7, oldest, stable)" + - "pl-cpu (ubuntu-20.04, 3.10, latest, stable)" + - "pl-cpu (ubuntu-20.04, 3.7, latest, stable)" + - "pl-cpu (ubuntu-20.04, 3.7, oldest, stable)" + - "pl-cpu (windows-2022, 3.10, latest, stable)" + - "pl-cpu (windows-2022, 3.7, latest, stable)" + - "pl-cpu (windows-2022, 3.7, oldest, stable)" + + - id: "pytorch_lightning: Slow" + paths: + - ".github/workflows/ci-pytorch-test-slow.yml" + checks: - "pl-slow (macOS-11, 3.7, 1.11)" - "pl-slow (ubuntu-20.04, 3.7, 1.11)" - "pl-slow (windows-2022, 3.7, 1.11)" - - "test-on-tpus" - id: "pytorch_lightning: Azure GPU" paths: @@ -101,6 +141,7 @@ subprojects: - id: "pytorch_lightning: Docker" paths: - "dockers/**" + - ".github/workflows/ci-pytorch-dockers.yml" - "requirements.txt" - "requirements/*.txt" - "requirements/pytorch/*" @@ -126,7 +167,7 @@ subprojects: - "build-pl (3.9, 1.9, 11.1.1)" - "build-xla (3.7, 1.12)" - - id: "pytorch_lightning: mypy" + - id: "mypy" paths: - ".github/workflows/code-checks.yml" - "pyproject.toml" # includes mypy config From aa955424d267b14209156b5ab28493ab2cfbd87d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Carlos=20Mochol=C3=AD?= Date: Thu, 8 Sep 2022 14:35:28 +0200 Subject: [PATCH 20/22] Update .github/workflows/probot-check-group.yml --- .github/workflows/probot-check-group.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/probot-check-group.yml b/.github/workflows/probot-check-group.yml index c3efec430805c..80b52a0e84008 100644 --- a/.github/workflows/probot-check-group.yml +++ b/.github/workflows/probot-check-group.yml @@ -1,7 +1,7 @@ name: Probot on: - pull_request: {} + pull_request_target: jobs: required-jobs: From 493bf7efef3b32bb489138f021f6b88bc8cc2799 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Carlos=20Mochol=C3=AD?= Date: Thu, 8 Sep 2022 14:40:34 +0200 Subject: [PATCH 21/22] undo --- .github/workflows/probot-check-group.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/probot-check-group.yml b/.github/workflows/probot-check-group.yml index 80b52a0e84008..c2606dbc6d15c 100644 --- a/.github/workflows/probot-check-group.yml +++ b/.github/workflows/probot-check-group.yml @@ -1,7 +1,8 @@ name: Probot on: - pull_request_target: + # TODO: change to `pull_request_target` after this is merged + pull_request: jobs: required-jobs: @@ -13,4 +14,4 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: - interval: 60 # seconds + interval: 120 # seconds From 90ed4dd8a158e0e64cf9f9e1352069b89fc352a5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Carlos=20Mochol=C3=AD?= Date: Thu, 15 Sep 2022 14:18:12 +0200 Subject: [PATCH 22/22] Lite filters --- .azure/gpu-tests.yml | 8 ++++++++ .github/workflows/ci-pytorch-test-conda.yml | 2 +- .github/workflows/ci-pytorch-test-full.yml | 3 +++ 3 files changed, 12 insertions(+), 1 deletion(-) diff --git a/.azure/gpu-tests.yml b/.azure/gpu-tests.yml index fb35fcd6eb64e..1e589e708cb39 100644 --- a/.azure/gpu-tests.yml +++ b/.azure/gpu-tests.yml @@ -27,6 +27,10 @@ trigger: - "requirements/pytorch/**" - "src/pytorch_lightning/**" - "tests/tests_pytorch/**" + - "setup.cfg" # includes pytest config + - "requirements/lite/**" + - "src/lightning_lite/**" + - "tests/tests_lite/**" pr: branches: @@ -48,6 +52,10 @@ pr: - "requirements/pytorch/**" - "src/pytorch_lightning/**" - "tests/tests_pytorch/**" + - "setup.cfg" # includes pytest config + - "requirements/lite/**" + - "src/lightning_lite/**" + - "tests/tests_lite/**" jobs: - job: testing diff --git a/.github/workflows/ci-pytorch-test-conda.yml b/.github/workflows/ci-pytorch-test-conda.yml index 7cbff1d42c9c9..1936d25ea1194 100644 --- a/.github/workflows/ci-pytorch-test-conda.yml +++ b/.github/workflows/ci-pytorch-test-conda.yml @@ -7,11 +7,11 @@ on: pull_request: branches: [master, "release/*"] paths: + - ".github/workflows/ci-pytorch-test-conda.yml" - "requirements/pytorch/**" - "src/pytorch_lightning/**" - "tests/tests_pytorch/**" - "setup.cfg" # includes pytest config - - ".github/workflows/ci-pytorch-test-conda.yml" concurrency: group: ${{ github.workflow }}-${{ github.ref }}-${{ github.head_ref }} diff --git a/.github/workflows/ci-pytorch-test-full.yml b/.github/workflows/ci-pytorch-test-full.yml index 6493d728216d2..f0989721a22c5 100644 --- a/.github/workflows/ci-pytorch-test-full.yml +++ b/.github/workflows/ci-pytorch-test-full.yml @@ -13,6 +13,9 @@ on: - "tests/tests_pytorch/**" - "setup.cfg" # includes pytest config - ".github/workflows/ci-pytorch-test-full.yml" + - "requirements/lite/**" + - "src/lightning_lite/**" + - "tests/tests_lite/**" concurrency: group: ${{ github.workflow }}-${{ github.ref }}-${{ github.head_ref }}