Skip to content

Commit 1581527

Browse files
committed
Merge branch 'master' into bugfix/SWA_scheduler_step
2 parents 424a09e + 1bd5f36 commit 1581527

File tree

106 files changed

+1598
-1735
lines changed

Some content is hidden

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

106 files changed

+1598
-1735
lines changed

.github/workflows/ci_dockers.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -75,8 +75,8 @@ jobs:
7575
pytorch_version: 1.6
7676
- python_version: 3.8
7777
pytorch_version: 1.7
78-
#- python_version: 3.9
79-
# pytorch_version: 1.8
78+
# - python_version: 3.9
79+
# pytorch_version: 1.7
8080
steps:
8181
- name: Checkout
8282
uses: actions/checkout@v2
@@ -109,8 +109,10 @@ jobs:
109109
pytorch_version: 1.4
110110
- python_version: 3.7
111111
pytorch_version: 1.7
112-
- python_version: 3.7
112+
- python_version: 3.8
113113
pytorch_version: 1.8
114+
# - python_version: 3.9
115+
# pytorch_version: 1.8
114116
steps:
115117
- name: Checkout
116118
uses: actions/checkout@v2

.github/workflows/ci_pkg-install.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
matrix:
1818
# PyTorch 1.5 is failing on Win and bolts requires torchvision>=0.5
1919
os: [ubuntu-20.04, macOS-10.15 , windows-2019] #
20-
python-version: [3.6, 3.8]
20+
python-version: [3.6, 3.9]
2121

2222
steps:
2323
- uses: actions/checkout@v2

.github/workflows/ci_test-base.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
# max-parallel: 6
1717
matrix:
1818
os: [ubuntu-20.04, windows-2019, macOS-10.15]
19-
python-version: [3.7]
19+
python-version: [3.8]
2020

2121
# Timeout: https://stackoverflow.com/a/59076067/4521646
2222
timeout-minutes: 20

.github/workflows/ci_test-full.yml

Lines changed: 30 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,19 +15,24 @@ jobs:
1515
fail-fast: false
1616
matrix:
1717
os: [ubuntu-18.04, windows-2019, macOS-10.15]
18-
python-version: [3.6, 3.7, 3.8]
18+
python-version: [3.6, 3.7, 3.8, 3.9]
1919
requires: ['minimal', 'latest']
20+
exclude:
21+
- python-version: 3.9
22+
requires: 'minimal'
2023

2124
# Timeout: https://stackoverflow.com/a/59076067/4521646
22-
timeout-minutes: 35 # TODO: the macOS is taking too long, probably caching did not work...
25+
# TODO: the macOS is taking too long, probably caching did not work...
26+
timeout-minutes: 40
27+
2328
steps:
2429
- uses: actions/checkout@v2
2530
- name: Set up Python ${{ matrix.python-version }}
2631
uses: actions/setup-python@v2
2732
with:
2833
python-version: ${{ matrix.python-version }}
2934

30-
- name: Update Pip
35+
- name: Update pip
3136
run: |
3237
# todo: unfreeze PIP after resolving minimal dependencies
3338
pip install --quiet "pip==20.1" --upgrade --user # needed for get pip cacher folder
@@ -48,6 +53,19 @@ jobs:
4853
open(fname, 'w').writelines(lines)
4954
shell: python
5055

56+
# todo: re-enable when allow testing py 3.9 with min config, atm some Hydra issues
57+
#- name: Adjust minimal for Python 3.9
58+
# if: matrix.requires == 'minimal' && matrix.python-version == 3.9
59+
# run: |
60+
# import re
61+
# def _req(fname, ptn, ver):
62+
# req = re.sub(ptn, ver, open(fname).read())
63+
# open(fname, 'w').write(req)
64+
#
65+
# _req('requirements.txt', r'torch>=[\d\.]+', 'torch>=1.8.0')
66+
# _req('requirements/extra.txt', r'onnxruntime>=[\d\.]+', 'onnxruntime>=1.7.0')
67+
# shell: python
68+
5169
- name: Set min. dependencies
5270
if: matrix.requires == 'minimal'
5371
run: |
@@ -84,7 +102,6 @@ jobs:
84102
${{ runner.os }}-pip-py${{ matrix.python-version }}-${{ matrix.requires }}-
85103
86104
- name: Pull checkpoints from S3
87-
# todo: consider adding some caching, but ATM all models have less then 100KB
88105
run: |
89106
cd legacy
90107
# wget is simpler but does not work on Windows
@@ -93,6 +110,13 @@ jobs:
93110
unzip -o checkpoints.zip
94111
ls -l checkpoints/
95112
113+
# todo: re-enable testing with Horovod
114+
- name: py3.9 - temp skip Horovod
115+
if: matrix.python-version == 3.9
116+
run: |
117+
# pip uninstall -y horovod
118+
python -c "fname = 'requirements/extra.txt' ; lines = [line for line in open(fname).readlines() if not line.startswith('horovod')] ; open(fname, 'w').writelines(lines)"
119+
96120
- name: Install dependencies
97121
env:
98122
# MAKEFLAGS: "-j2"
@@ -112,7 +136,8 @@ jobs:
112136
shell: bash
113137

114138
- name: Reinstall Horovod if necessary
115-
if: runner.os != 'windows'
139+
# todo: re-enable horovod on py3.9 when it will be supported
140+
if: runner.os != 'windows' && matrix.python-version != 3.9
116141
env:
117142
HOROVOD_BUILD_ARCH_FLAGS: "-mfma"
118143
run: |

.github/workflows/release-docker.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
fail-fast: false
1515
matrix:
1616
python_version: [3.6, 3.7, 3.8]
17-
pytorch_version: [1.4, 1.5, 1.6, 1.7]
17+
pytorch_version: [1.4, 1.5, 1.6, 1.7, 1.8]
1818
steps:
1919
- name: Checkout
2020
uses: actions/checkout@v2

CHANGELOG.md

Lines changed: 39 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,10 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/).
99

1010
### Added
1111

12+
13+
- Added more explicit exception message when trying to execute `trainer.test()` or `trainer.validate()` with `fast_dev_run=True` ([#6667](https://github.com/PyTorchLightning/pytorch-lightning/pull/6667))
14+
15+
1216
- Trigger warning when non-metric logged value with multi processes hasn't been reduced ([#6417](https://github.com/PyTorchLightning/pytorch-lightning/pull/6417))
1317

1418

@@ -66,12 +70,18 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/).
6670
- Added `outputs` parameter to callback's `on_validation_epoch_end` & `on_test_epoch_end` hooks ([#6120](https://github.com/PyTorchLightning/pytorch-lightning/pull/6120))
6771

6872

73+
- Added `configure_sharded_model` hook ([#6679](https://github.com/PyTorchLightning/pytorch-lightning/pull/6679))
74+
75+
6976
- Added support for `precision=64`, enabling training with double precision ([#6595](https://github.com/PyTorchLightning/pytorch-lightning/pull/6595))
7077

7178

7279
- Added `artifact_location` argument to `MLFlowLogger` which will be passed to the `MlflowClient.create_experiment` call ([#6677](https://github.com/PyTorchLightning/pytorch-lightning/pull/6677))
7380

7481

82+
- Added `model` parameter to precision plugins' `clip_gradients` signature ([#6764](https://github.com/PyTorchLightning/pytorch-lightning/pull/6764))
83+
84+
7585
### Changed
7686

7787
- Renamed `pytorch_lightning.callbacks.swa` to `pytorch_lightning.callbacks.stochastic_weight_avg` ([#6259](https://github.com/PyTorchLightning/pytorch-lightning/pull/6259))
@@ -92,9 +102,6 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/).
92102
- Changed `PyTorchProfiler` to use `torch.autograd.profiler.record_function` to record functions ([#6349](https://github.com/PyTorchLightning/pytorch-lightning/pull/6349))
93103

94104

95-
- Changed the behavior of `on_epoch_start` to run at the beginning of validation & test epoch ([#6498](https://github.com/PyTorchLightning/pytorch-lightning/pull/6498))
96-
97-
98105
### Deprecated
99106

100107
- `period` has been deprecated in favor of `every_n_val_epochs` in the `ModelCheckpoint` callback ([#6146](https://github.com/PyTorchLightning/pytorch-lightning/pull/6146))
@@ -149,20 +156,20 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/).
149156
- Removed `mode='auto'` from `EarlyStopping` ([#6167](https://github.com/PyTorchLightning/pytorch-lightning/pull/6167))
150157

151158

159+
- Removed legacy references for magic keys in the `Result` object ([#6016](https://github.com/PyTorchLightning/pytorch-lightning/pull/6016))
160+
161+
152162
- Removed deprecated `LightningModule` `hparams` setter ([#6207](https://github.com/PyTorchLightning/pytorch-lightning/pull/6207))
153163

154164

155-
- Removed legacy code to include `step` dictionary returns in `callback_metrics`. Use `self.log_dict` instead. ([#6682](https://github.com/PyTorchLightning/pytorch-lightning/pull/6682))
165+
- Removed legacy code to log or include metrics in the progress bar by returning them in a dict with the `"log"/"progress_bar"` magic keys. Use `self.log` instead ([#6734](https://github.com/PyTorchLightning/pytorch-lightning/pull/6734))
156166

157167

158168
- Removed `optimizer_idx` argument from `training_step` in manual optimization ([#6093](https://github.com/PyTorchLightning/pytorch-lightning/pull/6093))
159169

160170

161171
### Fixed
162172

163-
- Added Autocast in validation, test and predict modes for Native AMP ([#6565](https://github.com/PyTorchLightning/pytorch-lightning/pull/6565))
164-
165-
166173
- Made the `Plugin.reduce` method more consistent across all Plugins to reflect a mean-reduction by default ([#6011](https://github.com/PyTorchLightning/pytorch-lightning/pull/6011))
167174

168175

@@ -178,9 +185,6 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/).
178185
- Fixed `ModelCheckpoint(save_top_k=0, save_last=True)` not saving the `last` checkpoint ([#6136](https://github.com/PyTorchLightning/pytorch-lightning/pull/6136))
179186

180187

181-
- Fixed duplicate logs appearing in console when using the python logging module ([#5509](https://github.com/PyTorchLightning/pytorch-lightning/pull/5509), [#6275](https://github.com/PyTorchLightning/pytorch-lightning/pull/6275))
182-
183-
184188
- Fixed `.teardown(stage='fit')` getting called during `trainer.test` ([#6386](https://github.com/PyTorchLightning/pytorch-lightning/pull/6386))
185189

186190

@@ -190,29 +194,47 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/).
190194
- Fixed LightningModule `all_gather` on cpu tensors ([#6416](https://github.com/PyTorchLightning/pytorch-lightning/pull/6416))
191195

192196

193-
- Fixed a bug where `all_gather` would not work correctly with `tpu_cores=8` ([#6587](https://github.com/PyTorchLightning/pytorch-lightning/pull/6587))
197+
- Fixed torch distributed not available in setup hook for DDP ([#6506](https://github.com/PyTorchLightning/pytorch-lightning/pull/6506))
194198

195199

196-
- Update Gradient Clipping for the TPU Accelerator ([#6576](https://github.com/PyTorchLightning/pytorch-lightning/pull/6576))
200+
- Enforce an epoch scheduler interval when using SWA ([#6588](https://github.com/PyTorchLightning/pytorch-lightning/pull/6588))
197201

198202

199-
- Fixed torch distributed not available in setup hook for DDP ([#6506](https://github.com/PyTorchLightning/pytorch-lightning/pull/6506))
203+
## [1.2.6] - 2021-03-30
200204

205+
### Changed
201206

202-
- Fixed comparing required versions ([#6434](https://github.com/PyTorchLightning/pytorch-lightning/pull/6434))
207+
- Changed the behavior of `on_epoch_start` to run at the beginning of validation & test epoch ([#6498](https://github.com/PyTorchLightning/pytorch-lightning/pull/6498))
203208

209+
### Removed
204210

205-
- Enforce an epoch scheduler interval when using SWA ([#6588](https://github.com/PyTorchLightning/pytorch-lightning/pull/6588))
211+
- Removed legacy code to include `step` dictionary returns in `callback_metrics`. Use `self.log_dict` instead. ([#6682](https://github.com/PyTorchLightning/pytorch-lightning/pull/6682))
206212

213+
### Fixed
207214

215+
- Fixed `DummyLogger.log_hyperparams` raising a `TypeError` when running with `fast_dev_run=True` ([#6398](https://github.com/PyTorchLightning/pytorch-lightning/pull/6398))
208216
- Fixed error on TPUs when there was no `ModelCheckpoint` ([#6654](https://github.com/PyTorchLightning/pytorch-lightning/pull/6654))
217+
- Fixed `trainer.test` freeze on TPUs ([#6654](https://github.com/PyTorchLightning/pytorch-lightning/pull/6654))
218+
- Fixed a bug where gradients were disabled after calling `Trainer.predict` ([#6657](https://github.com/PyTorchLightning/pytorch-lightning/pull/6657))
219+
- Fixed bug where no TPUs were detected in a TPU pod env ([#6719](https://github.com/PyTorchLightning/pytorch-lightning/pull/6719))
209220

210221

211-
- Fixed `trainer.test` freeze on TPUs ([#6654](https://github.com/PyTorchLightning/pytorch-lightning/pull/6654))
222+
## [1.2.5] - 2021-03-23
212223

224+
### Changed
213225

214-
- Fixed a bug where gradients were disabled after calling `Trainer.predict` ([#6657](https://github.com/PyTorchLightning/pytorch-lightning/pull/6657))
226+
- Update Gradient Clipping for the TPU Accelerator ([#6576](https://github.com/PyTorchLightning/pytorch-lightning/pull/6576))
227+
- Refactored setup for typing friendly ([#6590](https://github.com/PyTorchLightning/pytorch-lightning/pull/6590))
215228

229+
### Fixed
230+
231+
- Fixed a bug where `all_gather` would not work correctly with `tpu_cores=8` ([#6587](https://github.com/PyTorchLightning/pytorch-lightning/pull/6587))
232+
- Fixed comparing required versions ([#6434](https://github.com/PyTorchLightning/pytorch-lightning/pull/6434))
233+
- Fixed duplicate logs appearing in console when using the python logging module ([#6275](https://github.com/PyTorchLightning/pytorch-lightning/pull/6275))
234+
- Added Autocast in validation, test and predict modes for Native AMP ([#6565](https://github.com/PyTorchLightning/pytorch-lightning/pull/6565))
235+
236+
237+
- Fixed resolve a bug with omegaconf and xm.save ([#6741](https://github.com/PyTorchLightning/pytorch-lightning/pull/6741))
216238

217239
## [1.2.4] - 2021-03-16
218240

@@ -228,7 +250,6 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/).
228250
- Fixed broadcast to use PyTorch `broadcast_object_list` and add `reduce_decision` ([#6410](https://github.com/PyTorchLightning/pytorch-lightning/pull/6410))
229251
- Fixed logger creating directory structure too early in DDP ([#6380](https://github.com/PyTorchLightning/pytorch-lightning/pull/6380))
230252
- Fixed DeepSpeed additional memory use on rank 0 when default device not set early enough ([#6460](https://github.com/PyTorchLightning/pytorch-lightning/pull/6460))
231-
- Fixed `DummyLogger.log_hyperparams` raising a `TypeError` when running with `fast_dev_run=True` ([#6398](https://github.com/PyTorchLightning/pytorch-lightning/pull/6398))
232253
- Fixed an issue with `Tuner.scale_batch_size` not finding the batch size attribute in the datamodule ([#5968](https://github.com/PyTorchLightning/pytorch-lightning/pull/5968))
233254
- Fixed an exception in the layer summary when the model contains torch.jit scripted submodules ([#6511](https://github.com/PyTorchLightning/pytorch-lightning/pull/6511))
234255
- Fixed when Train loop config was run during `Trainer.predict` ([#6541](https://github.com/PyTorchLightning/pytorch-lightning/pull/6541))

0 commit comments

Comments
 (0)