diff --git a/CHANGELOG.md b/CHANGELOG.md index e303de94c7d68..5dabc5cf97c07 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,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/). + ## [1.3.7] - 2021-06-22 - Fixed a bug where skipping an optimizer while using amp causes amp to trigger an assertion error ([#7975](https://github.com/PyTorchLightning/pytorch-lightning/pull/7975)) @@ -11,6 +12,8 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/). - Fixed setting a `DistributedSampler` when using a distributed plugin in a custom accelerator ([#7814](https://github.com/PyTorchLightning/pytorch-lightning/pull/7814)) - Improved `PyTorchProfiler` chrome traces names ([#8009](https://github.com/PyTorchLightning/pytorch-lightning/pull/8009)) - Fixed moving the best score to device in `EarlyStopping` callback for TPU devices ([#7959](https://github.com/PyTorchLightning/pytorch-lightning/pull/7959)) +- Fixed backward compatibility of moved functions `rank_zero_warn` and `rank_zero_deprecation` ([#8085](https://github.com/PyTorchLightning/pytorch-lightning/pull/8085)) + ## [1.3.6] - 2021-06-15 diff --git a/pytorch_lightning/__about__.py b/pytorch_lightning/__about__.py index 776edf534fa14..fb6dea08dbfc5 100644 --- a/pytorch_lightning/__about__.py +++ b/pytorch_lightning/__about__.py @@ -1,7 +1,7 @@ import time _this_year = time.strftime("%Y") -__version__ = '1.3.7' +__version__ = '1.3.7post0' __author__ = 'William Falcon et al.' __author_email__ = 'waf2107@columbia.edu' __license__ = 'Apache-2.0' diff --git a/pytorch_lightning/utilities/distributed.py b/pytorch_lightning/utilities/distributed.py index a66f8f5a95113..8ce905a774d61 100644 --- a/pytorch_lightning/utilities/distributed.py +++ b/pytorch_lightning/utilities/distributed.py @@ -65,6 +65,24 @@ def _get_rank() -> int: rank_zero_only.rank = getattr(rank_zero_only, 'rank', _get_rank()) +def rank_zero_warn(*args, stacklevel: int = 5, **kwargs): + from pytorch_lightning.utilities.warnings import rank_zero_deprecation, rank_zero_warn + rank_zero_deprecation( + '`pytorch_lightning.utilities.distributed.rank_zero_warn` has been moved to' + ' `pytorch_lightning.utilities.rank_zero_warn` in v1.3.7 and will be removed in v1.6' + ) + return rank_zero_warn(*args, stacklevel=stacklevel, **kwargs) + + +def rank_zero_deprecation(*args, stacklevel: int = 5, **kwargs): + from pytorch_lightning.utilities.warnings import rank_zero_deprecation + rank_zero_deprecation( + '`pytorch_lightning.utilities.distributed.rank_zero_deprecation` has been moved to' + ' `pytorch_lightning.utilities.rank_zero_deprecation` in v1.3.7 and will be removed in v1.6' + ) + return rank_zero_deprecation(*args, stacklevel=stacklevel, **kwargs) + + def _info(*args, stacklevel: int = 2, **kwargs): if python_version() >= "3.8.0": kwargs['stacklevel'] = stacklevel