Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
147 commits
Select commit Hold shift + click to select a range
6f37b89
update
tchaton Jul 4, 2022
08a80f5
update
tchaton Jul 4, 2022
7a422a1
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Jul 4, 2022
490df41
update
tchaton Jul 4, 2022
56c036e
Merge branch 'update_app_doc' of https://github.com/Lightning-AI/ligh…
tchaton Jul 4, 2022
0a483a7
update
tchaton Jul 4, 2022
5ba1b61
update
tchaton Jul 4, 2022
9417c30
update
tchaton Jul 4, 2022
6b360ec
update
tchaton Jul 4, 2022
923914f
update
tchaton Jul 4, 2022
295d14d
update
tchaton Jul 4, 2022
948436b
update
tchaton Jul 4, 2022
2f05948
update
tchaton Jul 4, 2022
a2ee2ba
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Jul 4, 2022
722847c
update
tchaton Jul 4, 2022
a04c4c7
Merge branch 'update_app_doc' of https://github.com/Lightning-AI/ligh…
tchaton Jul 4, 2022
7013b92
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Jul 4, 2022
fd759da
update latest docs
tchaton Jul 11, 2022
f451eb6
Merge branch 'update_app_doc' of https://github.com/Lightning-AI/ligh…
tchaton Jul 11, 2022
7cb51c4
remove image
tchaton Jul 11, 2022
7e17c44
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Jul 11, 2022
0fdf687
Merge branch 'update_app_doc' of https://github.com/Lightning-AI/ligh…
tchaton Jul 11, 2022
7993f31
update
tchaton Jul 11, 2022
8e54a8c
ci
Borda Jul 11, 2022
1c7548c
update
tchaton Jul 11, 2022
4349303
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Jul 11, 2022
547c4ec
update
tchaton Jul 11, 2022
cfdcaab
Merge branch 'update_app_doc' of https://github.com/Lightning-AI/ligh…
tchaton Jul 11, 2022
50630f6
update
tchaton Jul 11, 2022
9812165
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Jul 11, 2022
2b817f3
update
tchaton Jul 11, 2022
109401e
Merge branch 'update_app_doc' of https://github.com/Lightning-AI/ligh…
tchaton Jul 11, 2022
c93895f
update
tchaton Jul 11, 2022
72bf179
update
tchaton Jul 11, 2022
4531438
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Jul 11, 2022
d5e03c7
update
tchaton Jul 11, 2022
357d002
Merge branch 'update_app_doc' of https://github.com/Lightning-AI/ligh…
tchaton Jul 11, 2022
27e9a84
update
tchaton Jul 11, 2022
cb3be3e
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Jul 11, 2022
04afa05
update
tchaton Jul 11, 2022
730e1fc
Merge branch 'update_app_doc' of https://github.com/Lightning-AI/ligh…
tchaton Jul 11, 2022
8030af9
update
tchaton Jul 11, 2022
ab70090
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Jul 11, 2022
43278f5
update
tchaton Jul 11, 2022
77979ae
Merge branch 'update_app_doc' of https://github.com/Lightning-AI/ligh…
tchaton Jul 11, 2022
9f1a2ed
update
tchaton Jul 11, 2022
8a33745
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Jul 11, 2022
a447a8c
update
tchaton Jul 11, 2022
4d16c7e
Merge branch 'update_app_doc' of https://github.com/Lightning-AI/ligh…
tchaton Jul 11, 2022
5d6a35a
update
tchaton Jul 11, 2022
694a029
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Jul 11, 2022
441297a
update
tchaton Jul 11, 2022
b48f4b0
Merge branch 'update_app_doc' of https://github.com/Lightning-AI/ligh…
tchaton Jul 11, 2022
d0cabd1
update
tchaton Jul 11, 2022
9b70eec
make
Borda Jul 11, 2022
075aba4
Update .gitignore
tchaton Jul 11, 2022
aa09ef5
Update .github/workflows/docs-deploy.yml
tchaton Jul 11, 2022
63e80fc
update
tchaton Jul 11, 2022
8c94042
update
tchaton Jul 11, 2022
39e5036
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Jul 11, 2022
0b6c763
update
tchaton Jul 11, 2022
afb3371
Merge branch 'lightning_commands' of https://github.com/Lightning-AI/…
tchaton Jul 11, 2022
2e8e406
update
tchaton Jul 11, 2022
9d17103
Merge branch 'update_app_doc' of https://github.com/Lightning-AI/ligh…
tchaton Jul 11, 2022
8c74f2f
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Jul 11, 2022
608c4a6
update
tchaton Jul 11, 2022
772d4a5
update
tchaton Jul 11, 2022
dca63de
update
tchaton Jul 11, 2022
0091f4e
update
tchaton Jul 11, 2022
ee3f7ad
update
tchaton Jul 11, 2022
b06ec89
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Jul 11, 2022
59661c2
update
tchaton Jul 11, 2022
c69ae80
Merge branch 'lightning_commands' of https://github.com/Lightning-AI/…
tchaton Jul 11, 2022
239a879
update
tchaton Jul 11, 2022
8551482
update
tchaton Jul 11, 2022
2154520
update
tchaton Jul 11, 2022
6c95cf5
update
tchaton Jul 11, 2022
350d11e
update
tchaton Jul 11, 2022
2eaf5ce
Merge branch 'master' into update_app_doc
tchaton Jul 12, 2022
a864c19
Merge branch 'update_app_doc' of https://github.com/Lightning-AI/ligh…
tchaton Jul 12, 2022
2846842
update
tchaton Jul 12, 2022
5d80b33
Merge branch 'master' into lightning_commands
tchaton Jul 12, 2022
4ae4e42
Update docs/source-app/_templates/theme_variables.jinja
tchaton Jul 12, 2022
ece3f23
Update docs/source-app/api_reference/api_references.rst
tchaton Jul 12, 2022
e98fd71
Update docs/source-app/api_reference/api_references.rst
tchaton Jul 12, 2022
b8c76c9
Update docs/source-app/api_reference/api_references.rst
tchaton Jul 12, 2022
dc7f77f
Update docs/source-app/code_samples/convert_pl_to_app/train.py
tchaton Jul 12, 2022
c8f5bf2
Update docs/source-app/core_api/lightning_app/communication_content.rst
tchaton Jul 12, 2022
192e991
Update docs/source-app/examples/model_server_app/model_server_app_con…
tchaton Jul 12, 2022
824d4c8
Update docs/source-app/get_started/training_with_apps.rst
tchaton Jul 12, 2022
b806cbf
Update docs/source-app/get_started/training_with_apps.rst
tchaton Jul 12, 2022
4b76381
Update docs/source-app/get_started/training_with_apps.rst
tchaton Jul 12, 2022
e9ff9f8
Update docs/source-app/examples/hpo/hpo.py
tchaton Jul 12, 2022
f2309e1
Update docs/source-app/core_api/lightning_app/communication_content.rst
tchaton Jul 12, 2022
fda708c
Update docs/source-app/core_api/lightning_app/communication_content.rst
tchaton Jul 12, 2022
2e08cd3
Update docs/source-app/core_api/lightning_app/dynamic_work_content.rst
tchaton Jul 12, 2022
cfa45d4
Update docs/source-app/examples/github_repo_runner/github_repo_runner…
tchaton Jul 12, 2022
de252f3
Update docs/source-app/examples/github_repo_runner/github_repo_runner…
tchaton Jul 12, 2022
a1460b9
Update docs/source-app/examples/github_repo_runner/github_repo_runner…
tchaton Jul 12, 2022
cc03e39
Update docs/source-app/examples/github_repo_runner/github_repo_runner…
tchaton Jul 12, 2022
690f99b
Update docs/source-app/examples/model_server_app/model_server.py
tchaton Jul 12, 2022
8c679cb
update
tchaton Jul 12, 2022
2853c05
Merge branch 'update_app_doc' of https://github.com/Lightning-AI/ligh…
tchaton Jul 12, 2022
d3b1892
Update docs/source-app/core_api/lightning_app/dynamic_work_content.rst
tchaton Jul 12, 2022
5dc5f75
Update docs/source-app/examples/github_repo_runner/app.py
tchaton Jul 12, 2022
8114c7c
Update docs/source-app/examples/github_repo_runner/app.py
tchaton Jul 12, 2022
741e9d8
Merge branch 'master' into update_app_doc
Borda Jul 12, 2022
33f8337
Merge branch 'master' into update_app_doc
tchaton Jul 13, 2022
91f6749
Merge branch 'master' into update_app_doc
tchaton Jul 13, 2022
c362774
update
tchaton Jul 14, 2022
0e134fe
update
tchaton Jul 14, 2022
3b7e6c5
Merge branch 'update_app_doc' of https://github.com/Lightning-AI/ligh…
tchaton Jul 14, 2022
509640b
update
tchaton Jul 14, 2022
9b2b294
update
tchaton Jul 14, 2022
c3d14d5
update
tchaton Jul 14, 2022
ba4b784
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Jul 14, 2022
c9586ae
update
tchaton Jul 14, 2022
cb39a31
Merge branch 'update_app_doc' of https://github.com/Lightning-AI/ligh…
tchaton Jul 14, 2022
3bea563
update
tchaton Jul 14, 2022
b6b78b6
update
tchaton Jul 14, 2022
a742309
update
tchaton Jul 14, 2022
a235c88
update
tchaton Jul 14, 2022
bf7320b
Merge branch 'master' into update_app_doc
tchaton Jul 14, 2022
f9c6e65
update
tchaton Jul 14, 2022
c03ce82
Merge branch 'update_app_doc' of https://github.com/Lightning-AI/ligh…
tchaton Jul 14, 2022
1c25b4d
update
tchaton Jul 14, 2022
ba01f8d
update
tchaton Jul 14, 2022
75686f1
update
tchaton Jul 14, 2022
bfeb07e
update
tchaton Jul 14, 2022
00ba276
update
tchaton Jul 14, 2022
bbcaa9a
update
tchaton Jul 14, 2022
393f797
update
tchaton Jul 14, 2022
e84fd7c
update
tchaton Jul 14, 2022
c1799fd
update
tchaton Jul 14, 2022
1bb2279
update
tchaton Jul 14, 2022
d38eb01
update
tchaton Jul 14, 2022
ee35d07
update
tchaton Jul 14, 2022
a2dcd41
update
tchaton Jul 14, 2022
98b14c4
update
tchaton Jul 14, 2022
b776c8a
update
tchaton Jul 14, 2022
e9a4783
update
tchaton Jul 14, 2022
217126e
update
tchaton Jul 14, 2022
feb66e8
update
tchaton Jul 14, 2022
2beb4bb
update
tchaton Jul 14, 2022
c5e3715
Merge branch 'master' into update_app_doc
tchaton Jul 14, 2022
a197a42
update
tchaton Jul 14, 2022
d56e9ce
Merge branch 'update_app_doc' of https://github.com/Lightning-AI/ligh…
tchaton Jul 14, 2022
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: 34 additions & 0 deletions .actions/app/delete_cloud_lightning_apps.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
import os

from lightning_cloud.openapi.rest import ApiException

from lightning_app.utilities.cloud import _get_project
from lightning_app.utilities.network import LightningClient

client = LightningClient()

try:
PR_NUMBER = int(os.getenv("PR_NUMBER", None))
except (TypeError, ValueError):
# Failed when the PR is running master or 'PR_NUMBER' isn't defined.
PR_NUMBER = ""

APP_NAME = os.getenv("TEST_APP_NAME", "")

project = _get_project(client)
list_lightningapps = client.lightningapp_instance_service_list_lightningapp_instances(project.project_id)

print([lightningapp.name for lightningapp in list_lightningapps.lightningapps])

for lightningapp in list_lightningapps.lightningapps:
if PR_NUMBER and APP_NAME and not lightningapp.name.startswith(f"test-{PR_NUMBER}-{APP_NAME}-"):
continue
print(f"Deleting {lightningapp.name}")
try:
res = client.lightningapp_instance_service_delete_lightningapp_instance(
project_id=project.project_id,
id=lightningapp.id,
)
assert res == {}
except ApiException as e:
print(f"Failed to delete {lightningapp.name}. Exception {e}")
5 changes: 5 additions & 0 deletions .actions/app/download_frontend.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import lightning_app
from lightning_app.utilities.packaging.lightning_utils import download_frontend

if __name__ == "__main__":
download_frontend(lightning_app._PROJECT_ROOT)
14 changes: 14 additions & 0 deletions .azure/gpu-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ trigger:
- "master"
- "release/*"
- "refs/tags/*"

pr:
- "master"
- "release/*"
Expand All @@ -37,6 +38,19 @@ 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: 1 addition & 0 deletions .azure/hpu-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ trigger:
- "master"
- "release/*"
- "refs/tags/*"

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

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

pr:
- "master"
- "release/*"
Expand Down
5 changes: 1 addition & 4 deletions .github/workflows/ci-app_block.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,9 @@ 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: 27 additions & 7 deletions .github/workflows/ci-pytorch_test-conda.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,6 @@ 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 @@ -34,13 +29,34 @@ 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/[email protected]

- 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 @@ -50,10 +66,12 @@ 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 @@ -72,9 +90,11 @@ 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 @@ -86,15 +106,15 @@ jobs:
if: failure()

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

- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
if: always()
if: ${{ success() && (steps.skip.outputs.continue == '1') }}
# see: https://github.com/actions/toolkit/issues/399
continue-on-error: true
with:
Expand Down
57 changes: 44 additions & 13 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,11 +7,6 @@ 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 @@ -37,40 +32,67 @@ jobs:

steps:
- uses: actions/checkout@v2

- name: Get changed files
id: changed-files
uses: tj-actions/[email protected]

- 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'
if: ${{ (runner.os == 'macOS') && (steps.skip.outputs.continue == '1') }}
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') && (steps.skip.outputs.continue == '1') }}
run: |
python .actions/assistant.py requirements_prune_pkgs horovod

- name: Set min. dependencies
if: matrix.requires == 'oldest'
if: ${{ (matrix.requires == 'oldest') && (steps.skip.outputs.continue == '1') }}
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 @@ -79,9 +101,11 @@ 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 @@ -93,10 +117,12 @@ 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 @@ -105,7 +131,7 @@ jobs:
shell: bash

- name: Reinstall Horovod if necessary
if: runner.os != 'windows'
if: ${{ (runner.os != 'windows') && (steps.skip.outputs.continue == '1') }}
env:
HOROVOD_BUILD_ARCH_FLAGS: "-mfma"
HOROVOD_WITHOUT_MXNET: 1
Expand All @@ -122,46 +148,51 @@ 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()
if: ${{ (success()) && (steps.skip.outputs.continue == '1') }}
working-directory: tests/tests_pytorch
run: |
coverage report
coverage xml

- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
if: always()
if: ${{ (always()) && (steps.skip.outputs.continue == '1') }}
# see: https://github.com/actions/toolkit/issues/399
continue-on-error: true
with:
Expand Down
Loading