Skip to content

Commit a2d3ee8

Browse files
authored
final cleanup for v0.8.0 (#2181)
* final clean for v0.8.0 * chlog * chlog * date * rename stage * date * missing
1 parent 476911d commit a2d3ee8

File tree

6 files changed

+22
-30
lines changed

6 files changed

+22
-30
lines changed

CHANGELOG.md

Lines changed: 9 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -4,20 +4,8 @@ All notable changes to this project will be documented in this file.
44

55
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/).
66

7-
## [unreleased] - YYYY-MM-DD
87

9-
### Added
10-
11-
### Changed
12-
13-
### Deprecated
14-
15-
### Removed
16-
17-
### Fixed
18-
19-
20-
## [0.8.0] - 2020-06-DD
8+
## [0.8.0] - 2020-06-18
219

2210
### Added
2311

@@ -40,6 +28,8 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/).
4028
- Added loading checkpoints from URLs ([#1667](https://github.com/PyTorchLightning/pytorch-lightning/issues/1667))
4129
- Added a callback method `on_keyboard_interrupt` for handling KeyboardInterrupt events during training ([#2134](https://github.com/PyTorchLightning/pytorch-lightning/pull/2134))
4230
- Added a decorator `auto_move_data` that moves data to the correct device when using the LightningModule for inference ([#1905](https://github.com/PyTorchLightning/pytorch-lightning/pull/1905))
31+
- Added `ckpt_path` option to `LightningModule.test(...)` to load particular checkpoint ([#2190](https://github.com/PyTorchLightning/pytorch-lightning/issues/2190))
32+
- Added `setup` and `teardown` hooks for model ([#2229](https://github.com/PyTorchLightning/pytorch-lightning/issues/2229))
4333

4434
### Changed
4535

@@ -52,14 +42,14 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/).
5242
- Raise an error when lightning replaces an existing sampler ([#2020](https://github.com/PyTorchLightning/pytorch-lightning/pull/2020))
5343
- Enabled prepare_data from correct processes - clarify local vs global rank ([#2166](https://github.com/PyTorchLightning/pytorch-lightning/pull/2166))
5444
- Remove explicit flush from tensorboard logger ([#2126](https://github.com/PyTorchLightning/pytorch-lightning/pull/2126))
55-
- Changed epoch/step indexing from 1 instead of 0 ([#2206](https://github.com/PyTorchLightning/pytorch-lightning/pull/2206))
45+
- Changed epoch indexing from 1 instead of 0 ([#2206](https://github.com/PyTorchLightning/pytorch-lightning/pull/2206))
5646

5747
### Deprecated
5848

5949
- Deprecated flags: ([#2213](https://github.com/PyTorchLightning/pytorch-lightning/pull/2213))
60-
* `overfit_pct` >> `overfit_batches`
61-
* `val_percent_check` >> `limit_val_batches`
62-
* `test_percent_check` >> `limit_test_batches`
50+
* `overfit_pct` in favour of `overfit_batches`
51+
* `val_percent_check` in favour of `limit_val_batches`
52+
* `test_percent_check` in favour of `limit_test_batches`
6353
- Deprecated `ModelCheckpoint`'s attributes `best` and `kth_best_model` ([#1799](https://github.com/PyTorchLightning/pytorch-lightning/pull/1799))
6454
- Dropped official support/testing for older PyTorch versions <1.3 ([#1917](https://github.com/PyTorchLightning/pytorch-lightning/pull/1917))
6555

@@ -89,8 +79,9 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/).
8979
- Fixed an issue with `_auto_collect_arguments` collecting local variables that are not constructor arguments and not working for signatures that have the instance not named `self` ([#2048](https://github.com/PyTorchLightning/pytorch-lightning/pull/2048))
9080
- Fixed mistake in parameters' grad norm tracking ([#2012](https://github.com/PyTorchLightning/pytorch-lightning/pull/2012))
9181
- Fixed CPU and hanging GPU crash ([#2118](https://github.com/PyTorchLightning/pytorch-lightning/pull/2118))
92-
9382
- Fixed an issue with the model summary and `example_input_array` depending on a specific ordering of the submodules in a LightningModule ([#1773](https://github.com/PyTorchLightning/pytorch-lightning/pull/1773))
83+
- Fixed Tpu logging ([#2230](https://github.com/PyTorchLightning/pytorch-lightning/pull/2230))
84+
- Fixed Pid port + duplicate `rank_zero` logging ([#2140](https://github.com/PyTorchLightning/pytorch-lightning/pull/2140), [#2231](https://github.com/PyTorchLightning/pytorch-lightning/pull/2231))
9485

9586
## [0.7.6] - 2020-05-16
9687

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,8 @@ conda install pytorch-lightning -c conda-forge
4747

4848
## Docs
4949
- [master](https://pytorch-lightning.readthedocs.io/en/latest)
50+
- [stable](https://pytorch-lightning.readthedocs.io/en/stable)
51+
- [0.8.0](https://pytorch-lightning.readthedocs.io/en/0.8.0/)
5052
- [0.7.6](https://pytorch-lightning.readthedocs.io/en/0.7.6/)
5153
- [0.7.5](https://pytorch-lightning.readthedocs.io/en/0.7.5/)
5254
- [0.7.3](https://pytorch-lightning.readthedocs.io/en/0.7.3/)

pytorch_lightning/__init__.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
"""Root package info."""
22

3-
__version__ = '0.8.0rc4'
3+
__version__ = '0.8.0'
44
__author__ = 'William Falcon et al.'
55
__author_email__ = '[email protected]'
66
__license__ = 'Apache-2.0'
@@ -50,11 +50,10 @@
5050
sys.stdout.write(f'Partial import of `{__name__}` during the build process.\n') # pragma: no-cover
5151
# We are not importing the rest of the lightning during the build process, as it may not be compiled yet
5252
else:
53-
from pytorch_lightning.core import LightningModule
53+
from pytorch_lightning.core import LightningModule, data_loader
54+
from pytorch_lightning.callbacks import Callback
5455
from pytorch_lightning.trainer import Trainer
5556
from pytorch_lightning.utilities.seed import seed_everything
56-
from pytorch_lightning.callbacks import Callback
57-
from pytorch_lightning.core import data_loader
5857

5958
__all__ = [
6059
'Trainer',

pytorch_lightning/callbacks/base.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,11 @@ class Callback(abc.ABC):
1414
Abstract base class used to build new callbacks.
1515
"""
1616

17-
def setup(self, trainer, step: str):
17+
def setup(self, trainer, stage: str):
1818
"""Called when fit or test begins"""
1919
pass
2020

21-
def teardown(self, trainer, step: str):
21+
def teardown(self, trainer, stage: str):
2222
"""Called when fit or test ends"""
2323
pass
2424

pytorch_lightning/core/hooks.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,15 +17,15 @@
1717

1818
class ModelHooks(Module):
1919

20-
def setup(self, step: str):
20+
def setup(self, stage: str):
2121
"""
2222
Called at the beginning of fit and test.
2323
2424
Args:
2525
step: either 'fit' or 'test'
2626
"""
2727

28-
def teardown(self, step: str):
28+
def teardown(self, stage: str):
2929
"""
3030
Called at the end of fit and test.
3131

pytorch_lightning/trainer/callback_hook.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,15 @@ class TrainerCallbackHookMixin(ABC):
1111
callbacks: List[Callback] = []
1212
get_model: Callable = ...
1313

14-
def setup(self, step: str):
14+
def setup(self, stage: str):
1515
"""Called in the beginning of fit and test"""
1616
for callback in self.callbacks:
17-
callback.setup(self, step)
17+
callback.setup(self, stage)
1818

19-
def teardown(self, step: str):
19+
def teardown(self, stage: str):
2020
"""Called at the end of fit and test"""
2121
for callback in self.callbacks:
22-
callback.teardown(self, step)
22+
callback.teardown(self, stage)
2323

2424
def on_init_start(self):
2525
"""Called when the trainer initialization begins, model has not yet been set."""

0 commit comments

Comments
 (0)