Skip to content

Commit b922c73

Browse files
authored
Merge branch 'release/1.2-dev' into cleanup/metrics_2
2 parents 97c9e51 + 8a40e80 commit b922c73

File tree

192 files changed

+5572
-2824
lines changed

Some content is hidden

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

192 files changed

+5572
-2824
lines changed

.drone.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,14 +30,14 @@ steps:
3030
MKL_THREADING_LAYER: GNU
3131

3232
commands:
33+
- set -e
3334
- python --version
3435
- pip --version
3536
- nvidia-smi
36-
- pip install -r ./requirements/devel.txt --upgrade-strategy only-if-needed -v --no-cache-dir
37-
- pip install git+https://${AUTH_TOKEN}@github.com/PyTorchLightning/[email protected] -v --no-cache-dir
37+
- pip install -r ./requirements/devel.txt --upgrade-strategy only-if-needed --no-cache-dir
38+
- pip install git+https://${AUTH_TOKEN}@github.com/PyTorchLightning/[email protected] --no-cache-dir
3839
# when Image has defined CUDa version we can switch to this package spec "nvidia-dali-cuda${CUDA_VERSION%%.*}0"
39-
# todo: temprarl fix till https://github.com/PyTorchLightning/pytorch-lightning/pull/4922 is resolved
40-
- pip install --extra-index-url https://developer.download.nvidia.com/compute/redist "nvidia-dali-cuda100<0.27" --upgrade-strategy only-if-needed
40+
- pip install --extra-index-url https://developer.download.nvidia.com/compute/redist nvidia-dali-cuda100 --upgrade-strategy only-if-needed
4141
- pip list
4242
- python -m coverage run --source pytorch_lightning -m pytest pytorch_lightning tests -v --durations=25 # --flake8
4343
# Running special tests

.github/ISSUE_TEMPLATE/bug_report.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,15 @@ assignees: ''
1010

1111
<!-- A clear and concise description of what the bug is. -->
1212

13-
## Please reproduce using [the BoringModel and post here](https://colab.research.google.com/drive/1HvWVVTK8j2Nj52qU4Q4YCyzOm0_aLQF3?usp=sharing)
13+
## Please reproduce using the BoringModel
14+
1415

1516
<!-- Please paste your BoringModel colab link here. -->
1617

1718
### To Reproduce
19+
20+
Use following [**BoringModel**](https://colab.research.google.com/drive/1HvWVVTK8j2Nj52qU4Q4YCyzOm0_aLQF3?usp=sharing) and post here
21+
1822
<!-- If you could not reproduce using the BoringModel and still think there's a bug, please post here -->
1923

2024
### Expected behavior

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 16 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,41 @@
11
## What does this PR do?
22

33
<!--
4+
IMPORTANT:
5+
We separated bug-fix PRs and feature PRs and they shall land in master and release/1.X-dev accordingly.
6+
By default all PR are targeted to master which is correct for bug-fixes, but need to be change for features.
7+
If you miss it we can still fix it for you, just ping us... :]
8+
49
Please include a summary of the change and which issue is fixed.
510
Please also include relevant motivation and context.
611
List any dependencies that are required for this change.
712
813
If we didn't discuss your PR in Github issues there's a high chance it will not be merged.
914
-->
1015

11-
Fixes # (issue)
16+
Fixes # (issue) <- this [links related issue to this PR](https://docs.github.com/en/free-pro-team@latest/github/managing-your-work-on-github/linking-a-pull-request-to-an-issue#linking-a-pull-request-to-an-issue-using-a-keyword)
1217

1318
## Before submitting
14-
- [ ] Was this discussed/approved via a Github issue? (no need for typos and docs improvements)
15-
- [ ] Did you read the [contributor guideline](https://github.com/PyTorchLightning/pytorch-lightning/blob/master/.github/CONTRIBUTING.md), Pull Request section?
16-
- [ ] Did you make sure your PR does only one thing, instead of bundling different changes together? Otherwise, we ask you to create a separate PR for every change.
17-
- [ ] Did you make sure to update the documentation with your changes?
18-
- [ ] Did you write any new necessary tests?
19+
- [ ] Was this discussed/approved via a GitHub issue? (not for typos and docs)
20+
- [ ] Did you read the [contributor guideline](https://github.com/PyTorchLightning/pytorch-lightning/blob/master/.github/CONTRIBUTING.md), **Pull Request** section?
21+
- [ ] Did you make sure your PR does only one thing, instead of bundling different changes together?
22+
- [ ] Did you make sure to update the documentation with your changes? (if necessary)
23+
- [ ] Did you write any new necessary tests? (not for typos and docs)
1924
- [ ] Did you verify new and existing tests pass locally with your changes?
20-
- [ ] If you made a notable change (that affects users), did you update the [CHANGELOG](https://github.com/PyTorchLightning/pytorch-lightning/blob/master/CHANGELOG.md)?
25+
- [ ] Did you update the [CHANGELOG](https://github.com/PyTorchLightning/pytorch-lightning/blob/master/CHANGELOG.md)? (not for typos, docs, test updates, or internal minor changes/refactorings)
2126

2227
<!-- For CHANGELOG separate each item in the unreleased section by a blank line to reduce collisions -->
2328

2429
## PR review
2530
Anyone in the community is free to review the PR once the tests have passed.
26-
Before you start reviewing make sure you have read [Review guidelines](https://github.com/PyTorchLightning/pytorch-lightning/wiki/Review-guidelines). In short, see the following bullet-list:
31+
Before you start reviewing make sure you have read [Review guidelines](https://github.com/PyTorchLightning/pytorch-lightning/wiki/Review-guidelines). In short, see the following bullet-list:
2732

2833
- [ ] Is this pull request ready for review? (if not, please submit in draft mode)
2934
- [ ] Check that all items from **Before submitting** are resolved
3035
- [ ] Make sure the title is self-explanatory and the description concisely explains the PR
31-
- [ ] Add labels and milestones (and optionally projects) to the PR so it can be classified; _Bugfixes should be including in bug-fix release milestones (m.f.X) and features should be included in (m.X.b) releases._
32-
36+
- [ ] Add labels and milestones (and optionally projects) to the PR so it can be classified
37+
- [ ] **Check that target branch and milestone match!**
38+
3339

3440
## Did you have fun?
3541
Make sure you had fun coding 🙃

.github/prepare-nightly_version.py

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,17 @@
22
import os
33
import re
44

5-
PATH_ROOT = os.path.abspath(os.path.dirname(os.path.dirname(__file__)))
5+
# set paths
6+
_PATH_ROOT = os.path.abspath(os.path.dirname(os.path.dirname(__file__)))
7+
_PATH_INIT = os.path.join(_PATH_ROOT, 'pytorch_lightning', '__init__.py')
68

79
# get today date
810
now = datetime.datetime.now()
911
now_date = now.strftime("%Y%m%d")
10-
PATH_INIT = os.path.join(PATH_ROOT, 'pytorch_lightning', '__init__.py')
11-
print(f"prepare init '{PATH_INIT}' - replace version by {now_date}")
12-
with open(PATH_INIT, 'r') as fp:
12+
13+
print(f"prepare init '{_PATH_INIT}' - replace version by {now_date}")
14+
with open(_PATH_INIT, 'r') as fp:
1315
init = fp.read()
14-
init = re.sub(r'__version__ = [\d\.rc\'"]+', f'__version__ = "{now_date}"', init)
15-
with open(PATH_INIT, 'w') as fp:
16+
init = re.sub(r'__version__ = [\d\.\w\'"]+', f'__version__ = "{now_date}"', init)
17+
with open(_PATH_INIT, 'w') as fp:
1618
fp.write(init)

.github/workflows/ci_test-base.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: CI base testing
1+
name: CI basic testing
22

33
# see: https://help.github.com/en/actions/reference/events-that-trigger-workflows
44
on: # Trigger the workflow on push or pull request, but only for the master branch

.github/workflows/ci_test-full.yml

Lines changed: 31 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -47,26 +47,47 @@ jobs:
4747
if: runner.os == 'windows'
4848
run: |
4949
# remove Horovod from requirements
50-
python -c "fname = 'requirements/extra.txt' ; lines = [line for line in open(fname).readlines() if not line.startswith('horovod')] ; open(fname, 'w').writelines(lines)"
50+
fname = 'requirements/extra.txt'
51+
lines = [line for line in open(fname).readlines() if not line.startswith('horovod')]
52+
open(fname, 'w').writelines(lines)
53+
shell: python
5154

5255
# versions <= 1.3 may have issues on mac with some BLAS ops due to missing mkl (https://github.com/pytorch/pytorch/issues/18996)
5356
- name: Adjust minimal for Python 3.8 and MacOS
5457
if: matrix.requires == 'minimal' && (runner.os == 'macOS' || matrix.python-version == 3.8)
5558
run : |
56-
python -c "fname = 'requirements.txt' ; req = open(fname).read().replace('torch>=1.3', 'torch>=1.4') ; open(fname, 'w').write(req)"
57-
python -c "fname = 'requirements/examples.txt' ; req = open(fname).read().replace('torchvision>=0.4.1', 'torchvision>=0.5.0') ; open(fname, 'w').write(req)"
58-
python -c "fname = 'requirements/extra.txt' ; req = open(fname).read().replace('torchtext>=0.3.1', 'torchtext>=0.5.0') ; open(fname, 'w').write(req)"
59+
fname = 'requirements.txt'
60+
req = open(fname).read().replace('torch>=1.3', 'torch>=1.4')
61+
open(fname, 'w').write(req)
62+
63+
fname = 'requirements/examples.txt'
64+
req = open(fname).read().replace('torchvision>=0.4.1', 'torchvision>=0.5.0')
65+
open(fname, 'w').write(req)
66+
67+
fname = 'requirements/extra.txt'
68+
req = open(fname).read().replace('torchtext>=0.3.1', 'torchtext>=0.5.0')
69+
open(fname, 'w').write(req)
70+
shell: python
5971

6072
- name: Set min. dependencies
6173
if: matrix.requires == 'minimal'
6274
run: |
63-
python -c "fname = 'requirements.txt' ; req = open(fname).read().replace('>=', '==') ; open(fname, 'w').write(req)"
64-
python -c "fname = 'requirements/extra.txt' ; req = open(fname).read().replace('>=', '==') ; open(fname, 'w').write(req)"
65-
python -c "fname = 'requirements/loggers.txt' ; req = open(fname).read().replace('>=', '==') ; open(fname, 'w').write(req)"
66-
python -c "fname = 'requirements/test.txt' ; req = open(fname).read().replace('>=', '==') ; open(fname, 'w').write(req)"
67-
python -c "fname = 'requirements/examples.txt' ; req = open(fname).read().replace('>=', '==') ; open(fname, 'w').write(req)"
75+
files = (
76+
'requirements.txt',
77+
'requirements/extra.txt',
78+
'requirements/loggers.txt',
79+
'requirements/test.txt',
80+
'requirements/examples.txt',
81+
)
82+
for fname in files:
83+
req = open(fname).read().replace('>=', '==')
84+
open(fname, 'w').write(req)
85+
6886
# remove Fairscale from requirements
69-
python -c "fname = 'requirements/extra.txt' ; lines = [line for line in open(fname).readlines() if 'fairscale' not in line] ; open(fname, 'w').writelines(lines)"
87+
fname = 'requirements/extra.txt'
88+
lines = [line for line in open(fname).readlines() if 'fairscale' not in line]
89+
open(fname, 'w').writelines(lines)
90+
shell: python
7091

7192
# Note: This uses an internal pip API and may not always work
7293
# https://github.com/actions/cache/blob/master/examples.md#multiple-oss-in-a-workflow

.github/workflows/docs-checks.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ jobs:
105105
- name: Upload built docs
106106
uses: actions/upload-artifact@v2
107107
with:
108-
name: docs-results-${{ runner.os }}-${{ matrix.python-version }}-${{ matrix.requires }}
108+
name: docs-results-${{ github.sha }}
109109
path: docs/build/html/
110110
# Use always() to always run this step to publish test results when there are test failures
111111
if: success()

.github/workflows/nightly.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,10 @@ jobs:
1313
runs-on: ubuntu-20.04
1414

1515
steps:
16+
# does nightly releases from feature branch
1617
- uses: actions/checkout@v2
18+
with:
19+
ref: release/1.2-dev
1720
- uses: actions/setup-python@v2
1821
with:
1922
python-version: 3.7
@@ -29,7 +32,6 @@ jobs:
2932
ls -lh dist/
3033
3134
- name: Delay releasing
32-
if: startsWith(github.event.ref, 'refs/tags') || github.event_name == 'release'
3335
uses: juliangruber/sleep-action@v1
3436
with:
3537
time: 5m

.github/workflows/release-docker.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ jobs:
2626
- name: Get release version
2727
if: startsWith(github.ref, 'refs/tags/') || github.event_name == 'release'
2828
id: get_version
29-
run: echo ::set-env name=RELEASE_VERSION::$(echo ${GITHUB_REF##*/})
29+
run: echo "::set-output name=RELEASE_VERSION::$(echo ${GITHUB_REF##*/})"
3030

3131
- name: Publish Releases to Docker
3232
# only on releases
@@ -37,6 +37,6 @@ jobs:
3737
username: ${{ secrets.DOCKER_USERNAME }}
3838
password: ${{ secrets.DOCKER_PASSWORD }}
3939
dockerfile: dockers/release/Dockerfile
40-
build_args: PYTHON_VERSION=${{ matrix.python_version }},PYTORCH_VERSION=${{ matrix.pytorch_version }},LIGHTNING_VERSION=${{ env.RELEASE_VERSION }}
41-
tags: "${{ env.RELEASE_VERSION }}-py${{ matrix.python_version }}-torch${{ matrix.pytorch_version }},latest-py${{ matrix.python_version }}-torch${{ matrix.pytorch_version }}"
40+
build_args: PYTHON_VERSION=${{ matrix.python_version }},PYTORCH_VERSION=${{ matrix.pytorch_version }},LIGHTNING_VERSION=${{ steps.get_version.outputs.RELEASE_VERSION }}
41+
tags: "${{ steps.get_version.outputs.RELEASE_VERSION }}-py${{ matrix.python_version }}-torch${{ matrix.pytorch_version }},latest-py${{ matrix.python_version }}-torch${{ matrix.pytorch_version }}"
4242
timeout-minutes: 55

.mergify.yml

Lines changed: 56 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -12,59 +12,59 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15-
pull_request_rules:
16-
17-
- name: Automatic merge on approval
18-
conditions:
19-
- base=master
20-
# number of review approvals
21-
- "#approved-reviews-by>=3"
22-
# no waiting or assigned review
23-
- "#review-requested=0"
24-
# no requested chnages from any reviewer
25-
- "#changes-requested-reviews-by=0"
26-
# this serves as ALL check has to pass as we have actually around 40 tests in total
27-
- "#status-success>=54"
28-
# this is just in case since we rely on GPU tests (note: redundand to the above)
29-
- status-success=continuous-integration/drone/pr
30-
- "status-success=ci/circleci: TPU-tests"
31-
# this is patter-like, unofrunatly serves as `any(...)` (note: redundand to the above)
32-
#- "status-success~=^ci/circleci:"
33-
# no conflict with master branch
34-
- -conflict
35-
# was not closed yet
36-
- -closed
37-
# filter-out GH draft PRs
38-
- -draft
39-
actions:
40-
delete_head_branch: {}
41-
merge:
42-
# https://doc.mergify.io/merge-action.html#strict-merge
43-
# (on head branch) $ git merge --no-ff base
44-
# (on head branch) # Wait for CI to go green
45-
# (on head branch) # Squash all commits
46-
# (on base branch) $ git merge --ff head
47-
strict: true
48-
method: squash
49-
comment:
50-
message: Great job! =)
51-
52-
- name: warn on conflicts
53-
conditions:
54-
- conflict
55-
# filter-out GH draft PRs
56-
- -draft
57-
actions:
58-
comment:
59-
message: This pull request is now in conflict... :(
60-
61-
- name: add core reviewer
62-
conditions:
63-
# filter-out GH draft PRs
64-
- -draft
65-
# number of review approvals
66-
- "#approved-reviews-by<3"
67-
actions:
68-
request_reviews:
69-
teams:
70-
- core-contributors
15+
#pull_request_rules:
16+
#
17+
# - name: Automatic merge on approval
18+
# conditions:
19+
# - base=master
20+
# # number of review approvals
21+
# - "#approved-reviews-by>=3"
22+
# # no waiting or assigned review
23+
# - "#review-requested=0"
24+
# # no requested chnages from any reviewer
25+
# - "#changes-requested-reviews-by=0"
26+
# # this serves as ALL check has to pass as we have actually around 40 tests in total
27+
# - "#status-success>=54"
28+
# # this is just in case since we rely on GPU tests (note: redundand to the above)
29+
# - status-success=continuous-integration/drone/pr
30+
# - "status-success=ci/circleci: TPU-tests"
31+
# # this is patter-like, unofrunatly serves as `any(...)` (note: redundand to the above)
32+
# #- "status-success~=^ci/circleci:"
33+
# # no conflict with master branch
34+
# - -conflict
35+
# # was not closed yet
36+
# - -closed
37+
# # filter-out GH draft PRs
38+
# - -draft
39+
# actions:
40+
# delete_head_branch: {}
41+
# merge:
42+
# # https://doc.mergify.io/merge-action.html#strict-merge
43+
# # (on head branch) $ git merge --no-ff base
44+
# # (on head branch) # Wait for CI to go green
45+
# # (on head branch) # Squash all commits
46+
# # (on base branch) $ git merge --ff head
47+
# strict: true
48+
# method: squash
49+
# comment:
50+
# message: Great job! =)
51+
#
52+
# - name: warn on conflicts
53+
# conditions:
54+
# - conflict
55+
# # filter-out GH draft PRs
56+
# - -draft
57+
# actions:
58+
# comment:
59+
# message: This pull request is now in conflict... :(
60+
#
61+
# - name: add core reviewer
62+
# conditions:
63+
# # filter-out GH draft PRs
64+
# - -draft
65+
# # number of review approvals
66+
# - "#approved-reviews-by<3"
67+
# actions:
68+
# request_reviews:
69+
# teams:
70+
# - core-contributors

0 commit comments

Comments
 (0)