From 603ac9ab6db794784d6d1482fa6a88d4ebb45545 Mon Sep 17 00:00:00 2001 From: "J. Borovec" Date: Fri, 27 Mar 2020 11:26:35 +0100 Subject: [PATCH] update deprecation warning --- pytorch_lightning/logging/comet.py | 5 +++++ pytorch_lightning/logging/mlflow.py | 5 +++++ pytorch_lightning/logging/neptune.py | 5 +++++ pytorch_lightning/logging/test_tube.py | 5 +++++ pytorch_lightning/logging/wandb.py | 5 +++++ 5 files changed, 25 insertions(+) diff --git a/pytorch_lightning/logging/comet.py b/pytorch_lightning/logging/comet.py index 48a426dd4d53e..3e09a1cfc1979 100644 --- a/pytorch_lightning/logging/comet.py +++ b/pytorch_lightning/logging/comet.py @@ -2,4 +2,9 @@ .. warning:: `logging` package has been renamed to `loggers` since v0.7.0 and will be removed in v0.9.0 """ +import warnings + +warnings.warn("`logging.comet` module has been renamed to `loggers.comet` since v0.7.0." + " The deprecated module name will be removed in v0.9.0.", DeprecationWarning) + from pytorch_lightning.loggers.comet import CometLogger # noqa: F403 diff --git a/pytorch_lightning/logging/mlflow.py b/pytorch_lightning/logging/mlflow.py index 895f41fc5175a..c91faec47f995 100644 --- a/pytorch_lightning/logging/mlflow.py +++ b/pytorch_lightning/logging/mlflow.py @@ -2,4 +2,9 @@ .. warning:: `logging` package has been renamed to `loggers` since v0.7.0 and will be removed in v0.9.0 """ +import warnings + +warnings.warn("`logging.mlflow` module has been renamed to `loggers.mlflow` since v0.7.0." + " The deprecated module name will be removed in v0.9.0.", DeprecationWarning) + from pytorch_lightning.loggers.mlflow import MLFlowLogger # noqa: F403 diff --git a/pytorch_lightning/logging/neptune.py b/pytorch_lightning/logging/neptune.py index f1b64525fe160..f1e8a81b55180 100644 --- a/pytorch_lightning/logging/neptune.py +++ b/pytorch_lightning/logging/neptune.py @@ -2,4 +2,9 @@ .. warning:: `logging` package has been renamed to `loggers` since v0.7.0 and will be removed in v0.9.0 """ +import warnings + +warnings.warn("`logging.neptune` module has been renamed to `loggers.neptune` since v0.7.0." + " The deprecated module name will be removed in v0.9.0.", DeprecationWarning) + from pytorch_lightning.loggers.neptune import NeptuneLogger # noqa: F403 diff --git a/pytorch_lightning/logging/test_tube.py b/pytorch_lightning/logging/test_tube.py index a9bc71e4885dd..c40b7d187ab1b 100644 --- a/pytorch_lightning/logging/test_tube.py +++ b/pytorch_lightning/logging/test_tube.py @@ -2,4 +2,9 @@ .. warning:: `logging` package has been renamed to `loggers` since v0.7.0 and will be removed in v0.9.0 """ +import warnings + +warnings.warn("`logging.test_tube` module has been renamed to `loggers.test_tube` since v0.7.0." + " The deprecated module name will be removed in v0.9.0.", DeprecationWarning) + from pytorch_lightning.loggers.test_tube import TestTubeLogger # noqa: F403 diff --git a/pytorch_lightning/logging/wandb.py b/pytorch_lightning/logging/wandb.py index e4527b7b8734a..0ce8679215b9a 100644 --- a/pytorch_lightning/logging/wandb.py +++ b/pytorch_lightning/logging/wandb.py @@ -2,4 +2,9 @@ .. warning:: `logging` package has been renamed to `loggers` since v0.7.0 and will be removed in v0.9.0 """ +import warnings + +warnings.warn("`logging.wandb` module has been renamed to `loggers.wandb` since v0.7.0." + " The deprecated module name will be removed in v0.9.0.", DeprecationWarning) + from pytorch_lightning.loggers.wandb import WandbLogger # noqa: F403