remove deprecated sync step argument from WandbLogger (#8763)

* remove deprecated sync step

* update chlog
This commit is contained in:
Adrian Wälchli 2021-08-09 09:45:25 +02:00 committed by GitHub
parent f3442db3f0
commit 87093a3339
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 3 additions and 14 deletions

View File

@ -102,6 +102,9 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/).
- Removed the deprecated `model` argument from `ModelCheckpoint.save_checkpoint` ([#8688](https://github.com/PyTorchLightning/pytorch-lightning/pull/8688))
- Removed the deprecated `sync_step` argument from `WandbLogger` ([#8763](https://github.com/PyTorchLightning/pytorch-lightning/pull/8763))
### Fixed
- Fixed `trainer.fit_loop.split_idx` always returning `None` ([#8601](https://github.com/PyTorchLightning/pytorch-lightning/pull/8601))

View File

@ -113,7 +113,6 @@ class WandbLogger(LightningLoggerBase):
log_model: Optional[bool] = False,
experiment=None,
prefix: Optional[str] = "",
sync_step: Optional[bool] = None,
**kwargs,
):
if wandb is None:
@ -136,12 +135,6 @@ class WandbLogger(LightningLoggerBase):
"Hint: Upgrade with `pip install --ugrade wandb`."
)
if sync_step is not None:
warning_cache.deprecation(
"`WandbLogger(sync_step=(True|False))` is deprecated in v1.2.1 and will be removed in v1.5."
" Metrics are now logged separately and automatically synchronized."
)
super().__init__()
self._offline = offline
self._log_model = log_model

View File

@ -22,7 +22,6 @@ import torch
from pytorch_lightning import Callback, Trainer
from pytorch_lightning.callbacks import ModelCheckpoint
from pytorch_lightning.core.decorators import auto_move_data
from pytorch_lightning.loggers import WandbLogger
from pytorch_lightning.plugins import DeepSpeedPlugin
from pytorch_lightning.profiler import AdvancedProfiler, BaseProfiler, PyTorchProfiler, SimpleProfiler
from tests.deprecated_api import no_deprecated_call
@ -31,12 +30,6 @@ from tests.helpers.runif import RunIf
from tests.helpers.utils import no_warning_call
@mock.patch("pytorch_lightning.loggers.wandb.wandb")
def test_v1_5_0_wandb_unused_sync_step(_):
with pytest.deprecated_call(match=r"v1.2.1 and will be removed in v1.5"):
WandbLogger(sync_step=True)
def test_v1_5_0_old_callback_on_save_checkpoint(tmpdir):
class OldSignature(Callback):
def on_save_checkpoint(self, trainer, pl_module):