Skip to content

Commit 4b94920

Browse files
author
SeanNaren
committed
Merge branch 'master' into feat/fsdp_2n
# Conflicts: # pytorch_lightning/accelerators/accelerator.py
2 parents 62fe5a4 + 4e9b453 commit 4b94920

File tree

267 files changed

+5834
-9032
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

267 files changed

+5834
-9032
lines changed

.github/workflows/ci_test-base.yml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -51,9 +51,8 @@ jobs:
5151
- name: Install dependencies
5252
run: |
5353
python -m pip install --upgrade --user pip
54-
pip install --requirement ./requirements.txt --quiet --find-links https://download.pytorch.org/whl/cpu/torch_stable.html --upgrade
55-
pip install --requirement ./requirements/test.txt --quiet --upgrade-strategy only-if-needed
56-
# pip install tox coverage
54+
pip install --requirement ./requirements.txt --find-links https://download.pytorch.org/whl/cpu/torch_stable.html --upgrade
55+
pip install "pytest>6.0" "pytest-cov>2.10" --upgrade-strategy only-if-needed
5756
python --version
5857
pip --version
5958
pip list
@@ -69,7 +68,7 @@ jobs:
6968
- name: Test Package [only]
7069
run: |
7170
# NOTE: run coverage on tests does not propagare faler status for Win, https://github.com/nedbat/coveragepy/issues/1003
72-
coverage run --source pytorch_lightning -m pytest pytorch_lightning -v --junitxml=junit/test-results-${{ runner.os }}-${{ matrix.python-version }}-${{ matrix.requires }}.xml
71+
python -m pytest pytorch_lightning -v --cov=pytorch_lightning --junitxml=junit/test-results-${{ runner.os }}-${{ matrix.python-version }}-${{ matrix.requires }}.xml
7372
7473
- name: Upload pytest test results
7574
uses: actions/upload-artifact@v2

.github/workflows/ci_test-conda.yml

Lines changed: 23 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -27,33 +27,47 @@ jobs:
2727
run: |
2828
conda info
2929
conda list
30+
# adjust versions according installed Torch version
31+
python ./requirements/adjust_versions.py requirements/extra.txt
32+
python ./requirements/adjust_versions.py requirements/examples.txt
3033
pip install --requirement requirements/devel.txt --upgrade-strategy only-if-needed
3134
pip list
3235
3336
- name: Pull checkpoints from S3
34-
# todo: consider adding coma caching, but ATM all models have less then 100KB
3537
run: |
3638
# enter legacy and update checkpoints from S3
3739
cd legacy
3840
curl https://pl-public-data.s3.amazonaws.com/legacy/checkpoints.zip --output checkpoints.zip
3941
unzip -o checkpoints.zip
4042
ls -l checkpoints/
4143
42-
# todo: require proper fix in docker image
43-
- name: Hotfix dependency
44-
run: |
45-
pip install torchtext==0.6.0 -U
46-
shell: bash
47-
4844
- name: Tests
4945
run: |
5046
# NOTE: run coverage on tests does not propagare faler status for Win, https://github.com/nedbat/coveragepy/issues/1003
51-
python -m pytest pytorch_lightning tests -v --durations=50 --junitxml=junit/test-results-${{ runner.os }}-${{ matrix.python-version }}-${{ matrix.requires }}.xml
47+
python -m pytest pytorch_lightning tests --cov=pytorch_lightning -v --durations=50 --junitxml=junit/test-results-${{ runner.os }}-torch${{ matrix.pytorch-version }}.xml
5248
shell: bash -l {0}
5349

54-
- name: Upload pytest test results
50+
- name: Upload pytest results
5551
uses: actions/upload-artifact@v2
5652
with:
5753
name: pytest-results-${{ runner.os }}-${{ matrix.python-version }}-${{ matrix.requires }}
5854
path: junit/test-results-${{ runner.os }}-${{ matrix.python-version }}-${{ matrix.requires }}.xml
5955
if: failure()
56+
57+
- name: Statistics
58+
if: success()
59+
run: |
60+
coverage report
61+
coverage xml
62+
63+
- name: Upload coverage to Codecov
64+
uses: codecov/codecov-action@v1
65+
if: always()
66+
# see: https://github.com/actions/toolkit/issues/399
67+
continue-on-error: true
68+
with:
69+
token: ${{ secrets.CODECOV_TOKEN }}
70+
file: coverage.xml
71+
flags: cpu,pytest,torch${{ matrix.pytorch-version }}
72+
name: CPU-coverage
73+
fail_ci_if_error: false

.github/workflows/ci_test-full.yml

Lines changed: 12 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,6 @@ jobs:
1717
os: [ubuntu-18.04, windows-2019, macOS-10.15]
1818
python-version: [3.6, 3.7, 3.8]
1919
requires: ['minimal', 'latest']
20-
exclude:
21-
# # todo: segmentation fault for minimal and hanging for latest
22-
- python-version: 3.8
23-
os: ubuntu-18.04
2420

2521
# Timeout: https://stackoverflow.com/a/59076067/4521646
2622
timeout-minutes: 35 # TODO: the macOS is taking too long, probably caching did not work...
@@ -104,20 +100,17 @@ jobs:
104100
HOROVOD_WITHOUT_MXNET: 1
105101
HOROVOD_WITHOUT_TENSORFLOW: 1
106102
run: |
107-
# python -m pip install --upgrade --user pip
108-
pip install --requirement requirements.txt --find-links https://download.pytorch.org/whl/cpu/torch_stable.html --quiet --upgrade
109-
pip install --requirement ./requirements/devel.txt --find-links https://download.pytorch.org/whl/cpu/torch_stable.html --quiet --upgrade
110103
python --version
111104
pip --version
105+
# python -m pip install --upgrade --user pip
106+
pip install --requirement requirements.txt --find-links https://download.pytorch.org/whl/cpu/torch_stable.html --upgrade
107+
# adjust versions according installed Torch version
108+
python ./requirements/adjust_versions.py requirements/extra.txt
109+
python ./requirements/adjust_versions.py requirements/examples.txt
110+
pip install --requirement ./requirements/devel.txt --find-links https://download.pytorch.org/whl/cpu/torch_stable.html --upgrade
112111
pip list
113112
shell: bash
114113

115-
# todo: require proper fix in docker image
116-
- name: Hotfix dependency
117-
run: |
118-
pip install torchtext==0.6.0 -U
119-
shell: bash
120-
121114
- name: Reinstall Horovod if necessary
122115
if: runner.os != 'windows'
123116
env:
@@ -141,14 +134,13 @@ jobs:
141134
- name: Tests
142135
run: |
143136
# NOTE: do not include coverage report here, see: https://github.com/nedbat/coveragepy/issues/1003
144-
coverage run --source pytorch_lightning -m pytest pytorch_lightning tests -v --durations=50 --junitxml=junit/test-results-${{ runner.os }}-${{ matrix.python-version }}-${{ matrix.requires }}.xml
137+
python -m pytest pytorch_lightning tests --cov=pytorch_lightning -v --durations=50 --junitxml=junit/test-results-${{ runner.os }}-py${{ matrix.python-version }}-${{ matrix.requires }}.xml
145138
146-
# todo: put this back just when TorchVision can download datasets
147-
#- name: Examples
148-
# run: |
149-
# python -m pytest pl_examples -v --durations=10
139+
- name: Examples
140+
run: |
141+
python -m pytest pl_examples -v --durations=10
150142
151-
- name: Upload pytest test results
143+
- name: Upload pytest results
152144
uses: actions/upload-artifact@v2
153145
with:
154146
name: pytest-results-${{ runner.os }}-${{ matrix.python-version }}-${{ matrix.requires }}
@@ -169,6 +161,6 @@ jobs:
169161
with:
170162
token: ${{ secrets.CODECOV_TOKEN }}
171163
file: coverage.xml
172-
flags: cpu,pytest
164+
flags: cpu,pytest,python${{ matrix.python-version }}
173165
name: CPU-coverage
174166
fail_ci_if_error: false

.github/workflows/docs-checks.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -41,15 +41,15 @@ jobs:
4141
4242
- name: Install dependencies
4343
run: |
44+
python --version
45+
pip --version
4446
# remove Horovod from requirements
4547
python -c "fname = 'requirements/extra.txt' ; lines = [line for line in open(fname).readlines() if not line.startswith('horovod')] ; open(fname, 'w').writelines(lines)"
4648
# python -m pip install --upgrade --user pip
4749
pip install --requirement requirements.txt --upgrade-strategy only-if-needed --find-links https://download.pytorch.org/whl/cpu/torch_stable.html --quiet
4850
pip install --requirement requirements/extra.txt
4951
pip install --requirement requirements/loggers.txt
5052
pip install --requirement requirements/docs.txt
51-
python --version
52-
pip --version
5353
pip list
5454
shell: bash
5555

@@ -84,12 +84,12 @@ jobs:
8484
8585
- name: Install dependencies
8686
run: |
87-
pip install --requirement requirements.txt --upgrade-strategy only-if-needed --find-links https://download.pytorch.org/whl/cpu/torch_stable.html --quiet
87+
python --version
88+
pip --version
89+
# pip install --requirement requirements.txt --upgrade-strategy only-if-needed --find-links https://download.pytorch.org/whl/cpu/torch_stable.html --quiet
8890
pip install --requirement requirements/docs.txt
8991
# install Texlive, see https://linuxconfig.org/how-to-install-latex-on-ubuntu-20-04-focal-fossa-linux
9092
sudo apt-get update && sudo apt-get install -y texlive-latex-extra dvipng texlive-pictures
91-
python --version
92-
pip --version
9393
pip list
9494
shell: bash
9595

.github/workflows/events-nightly.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,8 +102,6 @@ jobs:
102102
id: extend
103103
104104
- name: Publish CUDA to Docker Hub
105-
# ToDo: extend also building for Nightly from pip
106-
if: matrix.pytorch_version < 1.8
107105
# publish master/release
108106
uses: docker/build-push-action@v2
109107
with:

0 commit comments

Comments
 (0)