From 63d04f621c0f438498a9e7a43e7d8299c5056696 Mon Sep 17 00:00:00 2001 From: Jirka Date: Sun, 14 Jun 2020 13:15:11 +0200 Subject: [PATCH 1/7] final clean for v0.8.0 --- CHANGELOG.md | 12 ------------ README.md | 2 ++ pytorch_lightning/__init__.py | 7 +++---- 3 files changed, 5 insertions(+), 16 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6ab3901ee80ad..04a1ce3f915e6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,18 +4,6 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/). -## [unreleased] - YYYY-MM-DD - -### Added - -### Changed - -### Deprecated - -### Removed - -### Fixed - ## [0.8.0] - 2020-06-DD diff --git a/README.md b/README.md index aa2a84f80509a..ca184d2414086 100644 --- a/README.md +++ b/README.md @@ -47,6 +47,8 @@ conda install pytorch-lightning -c conda-forge ## Docs - [master](https://pytorch-lightning.readthedocs.io/en/latest) +- [stable](https://pytorch-lightning.readthedocs.io/en/stable) +- [0.8.0](https://pytorch-lightning.readthedocs.io/en/0.8.0/) - [0.7.6](https://pytorch-lightning.readthedocs.io/en/0.7.6/) - [0.7.5](https://pytorch-lightning.readthedocs.io/en/0.7.5/) - [0.7.3](https://pytorch-lightning.readthedocs.io/en/0.7.3/) diff --git a/pytorch_lightning/__init__.py b/pytorch_lightning/__init__.py index 15030092f3bfb..24e190c13a91b 100644 --- a/pytorch_lightning/__init__.py +++ b/pytorch_lightning/__init__.py @@ -1,6 +1,6 @@ """Root package info.""" -__version__ = '0.8.0rc4' +__version__ = '0.8.0' __author__ = 'William Falcon et al.' __author_email__ = 'waf2107@columbia.edu' __license__ = 'Apache-2.0' @@ -50,11 +50,10 @@ sys.stdout.write(f'Partial import of `{__name__}` during the build process.\n') # pragma: no-cover # We are not importing the rest of the lightning during the build process, as it may not be compiled yet else: - from pytorch_lightning.core import LightningModule + from pytorch_lightning.core import LightningModule, data_loader + from pytorch_lightning.callbacks import Callback from pytorch_lightning.trainer import Trainer from pytorch_lightning.utilities.seed import seed_everything - from pytorch_lightning.callbacks import Callback - from pytorch_lightning.core import data_loader __all__ = [ 'Trainer', From f248670855b90e6435a28e385041ed90c183cbdf Mon Sep 17 00:00:00 2001 From: Jirka Date: Sun, 14 Jun 2020 13:49:42 +0200 Subject: [PATCH 2/7] chlog --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 04a1ce3f915e6..d1e5a51cc0958 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -40,7 +40,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/). - Raise an error when lightning replaces an existing sampler ([#2020](https://github.com/PyTorchLightning/pytorch-lightning/pull/2020)) - Enabled prepare_data from correct processes - clarify local vs global rank ([#2166](https://github.com/PyTorchLightning/pytorch-lightning/pull/2166)) - Remove explicit flush from tensorboard logger ([#2126](https://github.com/PyTorchLightning/pytorch-lightning/pull/2126)) -- Changed epoch/step indexing from 1 instead of 0 ([#2206](https://github.com/PyTorchLightning/pytorch-lightning/pull/2206)) +- Changed epoch indexing from 1 instead of 0 ([#2206](https://github.com/PyTorchLightning/pytorch-lightning/pull/2206)) ### Deprecated From eac4496bb87a3ce7f96254e4e25eab2041fc243b Mon Sep 17 00:00:00 2001 From: Jirka Date: Mon, 15 Jun 2020 14:34:34 +0200 Subject: [PATCH 3/7] chlog --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d1e5a51cc0958..07686bdd1bf07 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -28,6 +28,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/). - Added loading checkpoints from URLs ([#1667](https://github.com/PyTorchLightning/pytorch-lightning/issues/1667)) - Added a callback method `on_keyboard_interrupt` for handling KeyboardInterrupt events during training ([#2134](https://github.com/PyTorchLightning/pytorch-lightning/pull/2134)) - 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)) +- Added `ckpt_path` option to `LightningModule.test(...)` to load particular checkpoint ([#2190](https://github.com/PyTorchLightning/pytorch-lightning/issues/2190)) ### Changed @@ -77,7 +78,6 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/). - 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)) - Fixed mistake in parameters' grad norm tracking ([#2012](https://github.com/PyTorchLightning/pytorch-lightning/pull/2012)) - Fixed CPU and hanging GPU crash ([#2118](https://github.com/PyTorchLightning/pytorch-lightning/pull/2118)) - - 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)) ## [0.7.6] - 2020-05-16 From 6e22008a3127a853894ac1464d7dd96fd6e8190d Mon Sep 17 00:00:00 2001 From: Jirka Date: Tue, 16 Jun 2020 13:26:32 +0200 Subject: [PATCH 4/7] date --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 07686bdd1bf07..c22409ac84dce 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,7 +5,7 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/). -## [0.8.0] - 2020-06-DD +## [0.8.0] - 2020-06-17 ### Added From 67bd301ab8b63973a25417282302eeeeb2d6466c Mon Sep 17 00:00:00 2001 From: Jirka Date: Thu, 18 Jun 2020 09:23:32 +0200 Subject: [PATCH 5/7] rename stage --- pytorch_lightning/callbacks/base.py | 4 ++-- pytorch_lightning/core/hooks.py | 4 ++-- pytorch_lightning/trainer/callback_hook.py | 8 ++++---- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/pytorch_lightning/callbacks/base.py b/pytorch_lightning/callbacks/base.py index ec59314888fc3..dac8ddc11c093 100644 --- a/pytorch_lightning/callbacks/base.py +++ b/pytorch_lightning/callbacks/base.py @@ -14,11 +14,11 @@ class Callback(abc.ABC): Abstract base class used to build new callbacks. """ - def setup(self, trainer, step: str): + def setup(self, trainer, stage: str): """Called when fit or test begins""" pass - def teardown(self, trainer, step: str): + def teardown(self, trainer, stage: str): """Called when fit or test ends""" pass diff --git a/pytorch_lightning/core/hooks.py b/pytorch_lightning/core/hooks.py index 672f3c09ce4a3..e4c5e67d851b9 100644 --- a/pytorch_lightning/core/hooks.py +++ b/pytorch_lightning/core/hooks.py @@ -17,7 +17,7 @@ class ModelHooks(Module): - def setup(self, step: str): + def setup(self, stage: str): """ Called at the beginning of fit and test. @@ -25,7 +25,7 @@ def setup(self, step: str): step: either 'fit' or 'test' """ - def teardown(self, step: str): + def teardown(self, stage: str): """ Called at the end of fit and test. diff --git a/pytorch_lightning/trainer/callback_hook.py b/pytorch_lightning/trainer/callback_hook.py index b3d8f31b1084f..50ea8bb7ce3c4 100644 --- a/pytorch_lightning/trainer/callback_hook.py +++ b/pytorch_lightning/trainer/callback_hook.py @@ -11,15 +11,15 @@ class TrainerCallbackHookMixin(ABC): callbacks: List[Callback] = [] get_model: Callable = ... - def setup(self, step: str): + def setup(self, stage: str): """Called in the beginning of fit and test""" for callback in self.callbacks: - callback.setup(self, step) + callback.setup(self, stage) - def teardown(self, step: str): + def teardown(self, stage: str): """Called at the end of fit and test""" for callback in self.callbacks: - callback.teardown(self, step) + callback.teardown(self, stage) def on_init_start(self): """Called when the trainer initialization begins, model has not yet been set.""" From 413468fb988be483ed1819cafce6fa7db86adc7e Mon Sep 17 00:00:00 2001 From: Jirka Date: Thu, 18 Jun 2020 09:44:07 +0200 Subject: [PATCH 6/7] date --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c22409ac84dce..bf40f0c6f3150 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,7 +5,7 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/). -## [0.8.0] - 2020-06-17 +## [0.8.0] - 2020-06-18 ### Added From 9169a206738c2f0c9a7d282541f00f0539c10d16 Mon Sep 17 00:00:00 2001 From: Jirka Date: Thu, 18 Jun 2020 10:05:14 +0200 Subject: [PATCH 7/7] missing --- CHANGELOG.md | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index bf40f0c6f3150..b53422e43a782 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -29,6 +29,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/). - Added a callback method `on_keyboard_interrupt` for handling KeyboardInterrupt events during training ([#2134](https://github.com/PyTorchLightning/pytorch-lightning/pull/2134)) - 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)) - Added `ckpt_path` option to `LightningModule.test(...)` to load particular checkpoint ([#2190](https://github.com/PyTorchLightning/pytorch-lightning/issues/2190)) +- Added `setup` and `teardown` hooks for model ([#2229](https://github.com/PyTorchLightning/pytorch-lightning/issues/2229)) ### Changed @@ -46,9 +47,9 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/). ### Deprecated - Deprecated flags: ([#2213](https://github.com/PyTorchLightning/pytorch-lightning/pull/2213)) - * `overfit_pct` >> `overfit_batches` - * `val_percent_check` >> `limit_val_batches` - * `test_percent_check` >> `limit_test_batches` + * `overfit_pct` in favour of `overfit_batches` + * `val_percent_check` in favour of `limit_val_batches` + * `test_percent_check` in favour of `limit_test_batches` - Deprecated `ModelCheckpoint`'s attributes `best` and `kth_best_model` ([#1799](https://github.com/PyTorchLightning/pytorch-lightning/pull/1799)) - Dropped official support/testing for older PyTorch versions <1.3 ([#1917](https://github.com/PyTorchLightning/pytorch-lightning/pull/1917)) @@ -79,6 +80,8 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/). - Fixed mistake in parameters' grad norm tracking ([#2012](https://github.com/PyTorchLightning/pytorch-lightning/pull/2012)) - Fixed CPU and hanging GPU crash ([#2118](https://github.com/PyTorchLightning/pytorch-lightning/pull/2118)) - 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)) +- Fixed Tpu logging ([#2230](https://github.com/PyTorchLightning/pytorch-lightning/pull/2230)) +- 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)) ## [0.7.6] - 2020-05-16