diff --git a/pytorch_lightning/core/model_saving.py b/pytorch_lightning/core/model_saving.py index 13dbfd25..233ea229 100644 --- a/pytorch_lightning/core/model_saving.py +++ b/pytorch_lightning/core/model_saving.py @@ -4,7 +4,8 @@ """ from pytorch_lightning.utilities import rank_zero_warn -from pytorch_lightning.core.saving import * # noqa: F403 rank_zero_warn("`model_saving` module has been renamed to `saving` since v0.6.0." " The deprecated module name will be removed in v0.8.0.", DeprecationWarning) + +from pytorch_lightning.core.saving import * # noqa: F403 E402 diff --git a/pytorch_lightning/core/root_module.py b/pytorch_lightning/core/root_module.py index afbd8919..b66cfd0d 100644 --- a/pytorch_lightning/core/root_module.py +++ b/pytorch_lightning/core/root_module.py @@ -4,7 +4,8 @@ """ from pytorch_lightning.utilities import rank_zero_warn -from pytorch_lightning.core.lightning import * # noqa: F403 rank_zero_warn("`root_module` module has been renamed to `lightning` since v0.6.0." " The deprecated module name will be removed in v0.8.0.", DeprecationWarning) + +from pytorch_lightning.core.lightning import * # noqa: F403 E402 diff --git a/pytorch_lightning/logging/__init__.py b/pytorch_lightning/logging/__init__.py index 7d0323a6..07416ad8 100644 --- a/pytorch_lightning/logging/__init__.py +++ b/pytorch_lightning/logging/__init__.py @@ -4,7 +4,8 @@ """ from pytorch_lightning.utilities import rank_zero_warn -from pytorch_lightning.loggers import * # noqa: F403 rank_zero_warn("`logging` package has been renamed to `loggers` since v0.7.0" " The deprecated package name will be removed in v0.9.0.", DeprecationWarning) + +from pytorch_lightning.loggers import * # noqa: F403 E402 diff --git a/pytorch_lightning/logging/comet.py b/pytorch_lightning/logging/comet.py index 7fe59468..5bce210e 100644 --- a/pytorch_lightning/logging/comet.py +++ b/pytorch_lightning/logging/comet.py @@ -3,7 +3,8 @@ """ from pytorch_lightning.utilities import rank_zero_warn -from pytorch_lightning.loggers.comet import CometLogger # noqa: F403 rank_zero_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 E402 diff --git a/pytorch_lightning/logging/mlflow.py b/pytorch_lightning/logging/mlflow.py index 75d1c0db..dea954b1 100644 --- a/pytorch_lightning/logging/mlflow.py +++ b/pytorch_lightning/logging/mlflow.py @@ -3,7 +3,8 @@ """ from pytorch_lightning.utilities import rank_zero_warn -from pytorch_lightning.loggers.mlflow import MLFlowLogger # noqa: F403 rank_zero_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 E402 diff --git a/pytorch_lightning/logging/neptune.py b/pytorch_lightning/logging/neptune.py index 8d63cb48..19079b68 100644 --- a/pytorch_lightning/logging/neptune.py +++ b/pytorch_lightning/logging/neptune.py @@ -3,7 +3,8 @@ """ from pytorch_lightning.utilities import rank_zero_warn -from pytorch_lightning.loggers.neptune import NeptuneLogger # noqa: F403 rank_zero_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 E402 diff --git a/pytorch_lightning/logging/test_tube.py b/pytorch_lightning/logging/test_tube.py index 5c629e84..2fa56691 100644 --- a/pytorch_lightning/logging/test_tube.py +++ b/pytorch_lightning/logging/test_tube.py @@ -3,7 +3,8 @@ """ from pytorch_lightning.utilities import rank_zero_warn -from pytorch_lightning.loggers.test_tube import TestTubeLogger # noqa: F403 rank_zero_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 E402 diff --git a/pytorch_lightning/logging/wandb.py b/pytorch_lightning/logging/wandb.py index ee5ad1b6..a10c0af4 100644 --- a/pytorch_lightning/logging/wandb.py +++ b/pytorch_lightning/logging/wandb.py @@ -3,7 +3,8 @@ """ from pytorch_lightning.utilities import rank_zero_warn -from pytorch_lightning.loggers.wandb import WandbLogger # noqa: F403 rank_zero_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 E402 diff --git a/pytorch_lightning/pt_overrides/override_data_parallel.py b/pytorch_lightning/pt_overrides/override_data_parallel.py index 0515c206..e6c87164 100644 --- a/pytorch_lightning/pt_overrides/override_data_parallel.py +++ b/pytorch_lightning/pt_overrides/override_data_parallel.py @@ -4,8 +4,9 @@ """ from pytorch_lightning.utilities import rank_zero_warn -from pytorch_lightning.overrides.data_parallel import ( # noqa: F402 - get_a_var, parallel_apply, LightningDataParallel, LightningDistributedDataParallel) rank_zero_warn("`override_data_parallel` module has been renamed to `data_parallel` since v0.6.0." " The deprecated module name will be removed in v0.8.0.", DeprecationWarning) + +from pytorch_lightning.overrides.data_parallel import ( # noqa: F402 E402 + get_a_var, parallel_apply, LightningDataParallel, LightningDistributedDataParallel) diff --git a/pytorch_lightning/root_module/decorators.py b/pytorch_lightning/root_module/decorators.py index 2d4b9ef2..a8fd39a2 100644 --- a/pytorch_lightning/root_module/decorators.py +++ b/pytorch_lightning/root_module/decorators.py @@ -4,7 +4,8 @@ """ from pytorch_lightning.utilities import rank_zero_warn -from pytorch_lightning.core.decorators import * # noqa: F403 rank_zero_warn("`root_module.decorators` module has been renamed to `core.decorators` since v0.6.0." " The deprecated module name will be removed in v0.8.0.", DeprecationWarning) + +from pytorch_lightning.core.decorators import * # noqa: F403 E402 diff --git a/pytorch_lightning/root_module/grads.py b/pytorch_lightning/root_module/grads.py index b6ea9875..540becd8 100644 --- a/pytorch_lightning/root_module/grads.py +++ b/pytorch_lightning/root_module/grads.py @@ -4,7 +4,8 @@ """ from pytorch_lightning.utilities import rank_zero_warn -from pytorch_lightning.core.grads import * # noqa: F403 rank_zero_warn("`root_module.grads` module has been renamed to `core.grads` since v0.6.0." " The deprecated module name will be removed in v0.8.0.", DeprecationWarning) + +from pytorch_lightning.core.grads import * # noqa: F403 E402 diff --git a/pytorch_lightning/root_module/hooks.py b/pytorch_lightning/root_module/hooks.py index c6b492f6..04f4c5a6 100644 --- a/pytorch_lightning/root_module/hooks.py +++ b/pytorch_lightning/root_module/hooks.py @@ -4,7 +4,8 @@ """ from pytorch_lightning.utilities import rank_zero_warn -from pytorch_lightning.core.hooks import * # noqa: F403 rank_zero_warn("`root_module.hooks` module has been renamed to `core.hooks` since v0.6.0." " The deprecated module name will be removed in v0.8.0.", DeprecationWarning) + +from pytorch_lightning.core.hooks import * # noqa: F403 E402 diff --git a/pytorch_lightning/root_module/memory.py b/pytorch_lightning/root_module/memory.py index e63ed528..00a06f64 100644 --- a/pytorch_lightning/root_module/memory.py +++ b/pytorch_lightning/root_module/memory.py @@ -4,7 +4,8 @@ """ from pytorch_lightning.utilities import rank_zero_warn -from pytorch_lightning.core.memory import * # noqa: F403 rank_zero_warn("`root_module.memory` module has been renamed to `core.memory` since v0.6.0." " The deprecated module name will be removed in v0.8.0.", DeprecationWarning) + +from pytorch_lightning.core.memory import * # noqa: F403 E402 diff --git a/pytorch_lightning/root_module/model_saving.py b/pytorch_lightning/root_module/model_saving.py index 3227905d..93b346be 100644 --- a/pytorch_lightning/root_module/model_saving.py +++ b/pytorch_lightning/root_module/model_saving.py @@ -4,7 +4,8 @@ """ from pytorch_lightning.utilities import rank_zero_warn -from pytorch_lightning.core.saving import * # noqa: F403 rank_zero_warn("`root_module.model_saving` module has been renamed to `core.saving` since v0.6.0." " The deprecated module name will be removed in v0.8.0.", DeprecationWarning) + +from pytorch_lightning.core.saving import * # noqa: F403 E402 diff --git a/pytorch_lightning/root_module/root_module.py b/pytorch_lightning/root_module/root_module.py index b0e49860..98750798 100644 --- a/pytorch_lightning/root_module/root_module.py +++ b/pytorch_lightning/root_module/root_module.py @@ -4,7 +4,8 @@ """ from pytorch_lightning.utilities import rank_zero_warn -from pytorch_lightning.core.lightning import * # noqa: F403 rank_zero_warn("`root_module.root_module` module has been renamed to `core.lightning` since v0.6.0." " The deprecated module name will be removed in v0.8.0.", DeprecationWarning) + +from pytorch_lightning.core.lightning import * # noqa: F403 E402 diff --git a/pytorch_lightning/trainer/distrib_parts.py b/pytorch_lightning/trainer/distrib_parts.py index 8c54faf5..1bd235ce 100644 --- a/pytorch_lightning/trainer/distrib_parts.py +++ b/pytorch_lightning/trainer/distrib_parts.py @@ -627,6 +627,9 @@ class TrainerDPMixin(ABC): self.run_pretrain_routine(model) + # Make sure all workers have finished training before returning to the user + hvd.join() + def normalize_parse_gpu_string_input(s): if isinstance(s, str):