-
Notifications
You must be signed in to change notification settings - Fork 3.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
- Loading branch information
Showing
9 changed files
with
165 additions
and
76 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# 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" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,12 +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: | ||
- "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 }} | ||
|
@@ -41,7 +35,28 @@ jobs: | |
|
||
- 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 | ||
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 | ||
|
@@ -55,10 +70,12 @@ 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 | ||
|
@@ -78,9 +95,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 | ||
|
||
|
@@ -92,15 +111,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: success() | ||
if: ${{ success() && (steps.skip.outputs.continue == '1') }} | ||
# see: https://github.com/actions/toolkit/issues/399 | ||
continue-on-error: true | ||
with: | ||
|
Oops, something went wrong.