From 8d2a284c5f2296530399634d08ad29e1f155716a Mon Sep 17 00:00:00 2001 From: DuYicong515 Date: Wed, 23 Feb 2022 16:17:31 -0800 Subject: [PATCH 1/3] remove AccleratorConnector.device_type --- .../trainer/connectors/accelerator_connector.py | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/pytorch_lightning/trainer/connectors/accelerator_connector.py b/pytorch_lightning/trainer/connectors/accelerator_connector.py index f2d27a249f6f2..6a52f1eda2fa6 100644 --- a/pytorch_lightning/trainer/connectors/accelerator_connector.py +++ b/pytorch_lightning/trainer/connectors/accelerator_connector.py @@ -763,17 +763,6 @@ def _lazy_init_strategy(self) -> None: def parallel_devices(self) -> List[Union[torch.device, int]]: return self._parallel_devices - @property - def device_type(self) -> str: - if isinstance(self.accelerator, CPUAccelerator): - return "cpu" - if isinstance(self.accelerator, GPUAccelerator): - return "gpu" - if isinstance(self.accelerator, TPUAccelerator): - return "tpu" - if isinstance(self.accelerator, IPUAccelerator): - return "ipu" - @property def num_nodes(self) -> int: return self._num_nodes_flag From c3a968a8a1227779e6deaad169d2522baf0f5450 Mon Sep 17 00:00:00 2001 From: DuYicong515 Date: Wed, 23 Feb 2022 16:28:30 -0800 Subject: [PATCH 2/3] update CHANGELOG --- CHANGELOG.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index aacfbf781d2ea..35384b59b3ca6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -583,6 +583,9 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/). - Removed `_aggregate_metrics`, `_reduce_agg_metrics`, and `_finalize_agg_metrics` from `LightningLoggerBase` ([#12053](https://github.com/PyTorchLightning/pytorch-lightning/pull/12053)) +- Removed deprecated `AcceleratorConnector.device_type` property ([#12081](https://github.com/PyTorchLightning/pytorch-lightning/pull/12081)) + + ### Fixed - Fixed an issue where `HorovodStrategy.teardown()` did not complete gracefully if an exception was thrown during callback setup [#11752](https://github.com/PyTorchLightning/pytorch-lightning/pull/11752) From 5c5ccd04af3a2b04111c698672a6ab6f2d0f142a Mon Sep 17 00:00:00 2001 From: DuYicong515 Date: Thu, 24 Feb 2022 16:54:04 -0800 Subject: [PATCH 3/3] Update CHANGELOG.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Carlos MocholĂ­ --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 35384b59b3ca6..287450f5571a6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -583,7 +583,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/). - Removed `_aggregate_metrics`, `_reduce_agg_metrics`, and `_finalize_agg_metrics` from `LightningLoggerBase` ([#12053](https://github.com/PyTorchLightning/pytorch-lightning/pull/12053)) -- Removed deprecated `AcceleratorConnector.device_type` property ([#12081](https://github.com/PyTorchLightning/pytorch-lightning/pull/12081)) +- Removed the `AcceleratorConnector.device_type` property ([#12081](https://github.com/PyTorchLightning/pytorch-lightning/pull/12081)) ### Fixed