diff --git a/CHANGELOG.md b/CHANGELOG.md index 20bbde54b67db..bfec18599ab76 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -57,6 +57,9 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/). ### Removed +- Remove deprecated method `ClusterEnvironment.creates_children` ([#10339](https://github.com/PyTorchLightning/pytorch-lightning/issues/10339)) + + - Removed deprecated `TrainerModelHooksMixin.is_function_implemented` and `TrainerModelHooksMixin.has_arg` ([#10322](https://github.com/PyTorchLightning/pytorch-lightning/pull/10322)) diff --git a/pytorch_lightning/plugins/environments/cluster_environment.py b/pytorch_lightning/plugins/environments/cluster_environment.py index 237842b4ffb59..dd1a43c45756a 100644 --- a/pytorch_lightning/plugins/environments/cluster_environment.py +++ b/pytorch_lightning/plugins/environments/cluster_environment.py @@ -13,8 +13,6 @@ # limitations under the License. from abc import ABC, abstractmethod -from pytorch_lightning.utilities import rank_zero_deprecation - class ClusterEnvironment(ABC): """Specification of a cluster environment.""" @@ -24,19 +22,6 @@ class ClusterEnvironment(ABC): def creates_processes_externally(self) -> bool: """Whether the environment creates the subprocesses or not.""" - def creates_children(self) -> bool: - """Whether the environment creates the subprocesses or not. - - .. deprecated:: v1.5 - This method was deprecated in v1.5 and will be removed in v1.6. Use the property - :attr:`creates_processes_externally` instead. - """ - rank_zero_deprecation( - f"`{self.__class__.__name__}.creates_children()` was deprecated in v1.5 and will be removed in v1.6." - " Use the property :attr:`creates_processes_externally` instead." - ) - return self.creates_processes_externally - @abstractmethod def master_address(self) -> str: """The master address through which all processes connect and communicate.""" diff --git a/tests/deprecated_api/test_remove_1-6.py b/tests/deprecated_api/test_remove_1-6.py index 9faf80435d953..a19a3487c6077 100644 --- a/tests/deprecated_api/test_remove_1-6.py +++ b/tests/deprecated_api/test_remove_1-6.py @@ -22,12 +22,6 @@ from pytorch_lightning.callbacks import ModelCheckpoint from pytorch_lightning.callbacks.early_stopping import EarlyStopping from pytorch_lightning.plugins import PrecisionPlugin -from pytorch_lightning.plugins.environments import ( - KubeflowEnvironment, - LightningEnvironment, - SLURMEnvironment, - TorchElasticEnvironment, -) from pytorch_lightning.plugins.training_type import DDPPlugin, DDPSpawnPlugin from pytorch_lightning.utilities.distributed import rank_zero_deprecation, rank_zero_warn from pytorch_lightning.utilities.model_helpers import is_overridden @@ -420,20 +414,6 @@ def test_v1_6_0_is_slurm_managing_tasks(): trainer._accelerator_connector.is_slurm_managing_tasks = False -@pytest.mark.parametrize( - "cluster_environment", - [ - KubeflowEnvironment(), - LightningEnvironment(), - SLURMEnvironment(), - TorchElasticEnvironment(), - ], -) -def test_v1_6_0_cluster_environment_creates_children(cluster_environment): - with pytest.deprecated_call(match="was deprecated in v1.5 and will be removed in v1.6"): - cluster_environment.creates_children() - - def test_v1_6_0_master_params(): with pytest.deprecated_call(match="`PrecisionPlugin.master_params` was deprecated in v1.5"): PrecisionPlugin().master_params(Mock(spec=Optimizer))