Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 0 additions & 34 deletions .actions/app/delete_cloud_lightning_apps.py

This file was deleted.

5 changes: 0 additions & 5 deletions .actions/app/download_frontend.py

This file was deleted.

14 changes: 0 additions & 14 deletions .azure/gpu-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ trigger:
- "master"
- "release/*"
- "refs/tags/*"

pr:
- "master"
- "release/*"
Expand All @@ -38,19 +37,6 @@ jobs:

steps:

- bash: |
CHANGED_FILES=$(git diff --name-status master | awk '{print $2}')
echo $CHANGED_FILES > changed_files.txt
MATCHES=$(cat changed_files.txt | grep -E $FILTER)
echo $MATCHES
if [ -z "$MATCHES" ]; then
echo "Skip"
else
echo "Continue"
fi

displayName: Decide if skipping should be done.

- bash: |
lspci | egrep 'VGA|3D'
whereis nvidia
Expand Down
1 change: 0 additions & 1 deletion .azure/hpu-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ trigger:
- "master"
- "release/*"
- "refs/tags/*"

pr:
- "master"
- "release/*"
Expand Down
1 change: 0 additions & 1 deletion .azure/ipu-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ trigger:
- master
- release/*
- refs/tags/*

pr:
- master
- release/*
Expand Down
1 change: 0 additions & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ trigger:
- "master"
- "release/*"
- "refs/tags/*"

pr:
- "master"
- "release/*"
Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/ci-app_block.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,12 @@ jobs:
- name: Get changed files using defaults
id: changed-files
uses: tj-actions/changed-files@v23

- name: List all added files
run: |
for file in ${{ steps.changed-files.outputs.all_changed_and_modified_files }}; do
echo "$file"
done

- name: Block edits in docs/source-app
if: contains(steps.changed-files.outputs.all_changed_and_modified_files, 'docs/source-app')
run: exit 1
34 changes: 7 additions & 27 deletions .github/workflows/ci-pytorch_test-conda.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@ on: # Trigger the workflow on push or pull request, but only for the master bra
branches: [master, "release/*"]
pull_request:
branches: [master, "release/*"]
paths-ignore:
- "src/lightning_app/**" # todo: implement job skip
- "tests/tests_app/**" # todo: implement job skip
- "tests/tests_app_examples/**" # todo: implement job skip
- "examples/app_*" # todo: implement job skip

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}-${{ github.head_ref }}
Expand All @@ -29,34 +34,13 @@ jobs:
- {python-version: "3.9", pytorch-version: "1.11"}

timeout-minutes: 30

steps:
- name: Workaround for https://github.com/actions/checkout/issues/760
run: git config --global --add safe.directory /__w/lightning/lightning

- uses: actions/checkout@v2

- name: Get changed files
id: changed-files
uses: tj-actions/changed-files@v23.1

- name: Decide if the test should be skipped
id: skip
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
Expand All @@ -66,12 +50,10 @@ jobs:
pip install -e .[test]

- 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
Expand All @@ -90,11 +72,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

Expand All @@ -106,15 +86,15 @@ jobs:
if: failure()

- name: Statistics
if: ${{ success() && (steps.skip.outputs.continue == '1') }}
if: success()
working-directory: tests/tests_pytorch
run: |
coverage report
coverage xml

- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
if: ${{ success() && (steps.skip.outputs.continue == '1') }}
if: always()
# see: https://github.com/actions/toolkit/issues/399
continue-on-error: true
with:
Expand Down
57 changes: 13 additions & 44 deletions .github/workflows/ci-pytorch_test-full.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Test PyTorch full
name: Test PyTorch full

# see: https://help.github.com/en/actions/reference/events-that-trigger-workflows
on: # Trigger the workflow on push or pull request, but only for the master branch
Expand All @@ -7,6 +7,11 @@ 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-ignore:
- "src/lightning_app/**" # todo: implement job skip
- "tests/tests_app/**" # todo: implement job skip
- "tests/tests_app_examples/**" # todo: implement job skip
- "examples/app_*" # todo: implement job skip

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}-${{ github.head_ref }}
Expand All @@ -32,67 +37,40 @@ jobs:

steps:
- uses: actions/checkout@v2

- name: Get changed files
id: changed-files
uses: tj-actions/changed-files@v23.1

- name: Decide if the test should be skipped
id: skip
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@v2
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@v2
with:
path: ${{ steps.pip-cache.outputs.dir }}
Expand All @@ -101,11 +79,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
Expand All @@ -117,12 +93,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
Expand All @@ -131,7 +105,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
Expand All @@ -148,51 +122,46 @@ jobs:
shell: bash

- name: Cache datasets
if: ${{ (steps.skip.outputs.continue == '1') }}
uses: actions/cache@v2
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') }}
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
if: failure()

- 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
coverage xml

- 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:
Expand Down
Loading