From 593bf507597ae93bc82341c831096996c498a245 Mon Sep 17 00:00:00 2001 From: Jirka Borovec Date: Fri, 27 Mar 2020 13:40:47 +0100 Subject: [PATCH] update deprecation warning (#1258) --- 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 48a426dd..3e09a1cf 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 895f41fc..c91faec4 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 f1b64525..f1e8a81b 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 a9bc71e4..c40b7d18 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 e4527b7b..0ce86792 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