Skip to content

Commit fbc8b20

Browse files
authored
update versions (#7409)
* update versions * chlog * win * str
1 parent b181b8c commit fbc8b20

File tree

5 files changed

+42
-21
lines changed

5 files changed

+42
-21
lines changed

.github/prune-packages.py

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
import sys
2+
from pprint import pprint
3+
4+
5+
def main(req_file: str, *pkgs):
6+
with open(req_file, 'r') as fp:
7+
lines = fp.readlines()
8+
9+
for pkg in pkgs:
10+
lines = [ln for ln in lines if not ln.startswith(pkg)]
11+
pprint(lines)
12+
13+
with open(req_file, 'w') as fp:
14+
fp.writelines(lines)
15+
16+
17+
if __name__ == "__main__":
18+
main(*sys.argv[1:])

.github/set-min-requirements.py

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
requirement_fnames = (
2+
'requirements.txt',
3+
'requirements/extra.txt',
4+
'requirements/loggers.txt',
5+
'requirements/test.txt',
6+
'requirements/examples.txt',
7+
)
8+
9+
10+
def replace_min(fname: str):
11+
req = open(fname).read().replace('>=', '==')
12+
open(fname, 'w').write(req)
13+
14+
15+
if __name__ == '__main__':
16+
for fname in requirement_fnames:
17+
replace_min(fname)

.github/workflows/ci_test-full.yml

Lines changed: 4 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ jobs:
4444
- name: Update pip
4545
run: |
4646
# needed for `pip cache` command
47-
pip install --quiet "pip>=20.1" --upgrade --user
47+
pip install --quiet "pip==20.2" --upgrade --user
4848
4949
# Github Actions: Run step on specific OS: https://stackoverflow.com/a/57948488/4521646
5050
- name: Setup macOS
@@ -56,11 +56,7 @@ jobs:
5656
- name: Setup Windows
5757
if: runner.os == 'windows'
5858
run: |
59-
# remove Horovod from requirements
60-
fname = 'requirements/extra.txt'
61-
lines = [line for line in open(fname).readlines() if not line.startswith('horovod')]
62-
open(fname, 'w').writelines(lines)
63-
shell: python
59+
python .github/prune-packages.py requirements/extra.txt "horovod"
6460
6561
# todo: re-enable when allow testing py 3.9 with min config, atm some Hydra issues
6662
#- name: Adjust minimal for Python 3.9
@@ -78,18 +74,7 @@ jobs:
7874
- name: Set min. dependencies
7975
if: matrix.requires == 'minimal'
8076
run: |
81-
files = (
82-
'requirements.txt',
83-
'requirements/extra.txt',
84-
'requirements/loggers.txt',
85-
'requirements/test.txt',
86-
'requirements/examples.txt',
87-
)
88-
for fname in files:
89-
req = open(fname).read().replace('>=', '==')
90-
open(fname, 'w').write(req)
91-
92-
shell: python
77+
python .github/set-min-requirements.py
9378
9479
# Note: This uses an internal pip API and may not always work
9580
# https://github.com/actions/cache/blob/master/examples.md#multiple-oss-in-a-workflow
@@ -120,7 +105,7 @@ jobs:
120105
if: matrix.python-version == 3.9
121106
run: |
122107
# pip uninstall -y horovod
123-
python -c "fname = 'requirements/extra.txt' ; lines = [line for line in open(fname).readlines() if not line.startswith('horovod')] ; open(fname, 'w').writelines(lines)"
108+
python .github/prune-packages.py requirements/extra.txt "horovod"
124109
125110
- name: Install dependencies
126111
env:

.github/workflows/docs-checks.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ jobs:
4444
python --version
4545
pip --version
4646
# remove Horovod from requirements
47-
python -c "fname = 'requirements/extra.txt' ; lines = [line for line in open(fname).readlines() if not line.startswith('horovod')] ; open(fname, 'w').writelines(lines)"
47+
python .github/prune-packages.py requirements/extra.txt "horovod"
4848
# python -m pip install --upgrade --user pip
4949
pip install --requirement requirements.txt --upgrade-strategy only-if-needed --find-links https://download.pytorch.org/whl/cpu/torch_stable.html --quiet
5050
pip install --requirement requirements/extra.txt

CHANGELOG.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,8 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/).
214214
[#6476](https://github.com/PyTorchLightning/pytorch-lightning/pull/6476),
215215
[#6294](https://github.com/PyTorchLightning/pytorch-lightning/pull/6294),
216216
[#6373](https://github.com/PyTorchLightning/pytorch-lightning/pull/6373),
217-
[#6088](https://github.com/PyTorchLightning/pytorch-lightning/pull/6088)
217+
[#6088](https://github.com/PyTorchLightning/pytorch-lightning/pull/6088),
218+
[#7398](https://github.com/PyTorchLightning/pytorch-lightning/pull/7398)
218219
)
219220
- Resolved schedule step bug for PyTorch Profiler ([#6674](https://github.com/PyTorchLightning/pytorch-lightning/pull/6674),
220221
[#6681](https://github.com/PyTorchLightning/pytorch-lightning/pull/6681))

0 commit comments

Comments
 (0)