Skip to content

Commit 27cc26e

Browse files
committed
remove AcceleratorConnector.parallel_devices
1 parent a9bfcc7 commit 27cc26e

File tree

3 files changed

+5
-6
lines changed

3 files changed

+5
-6
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -757,6 +757,9 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/).
757757
- Removed `AcceleratorConnector.parallel_device_ids` property ([#12072](https://github.com/PyTorchLightning/pytorch-lightning/pull/12072))
758758

759759

760+
- Removed `AcceleratorConnector.parallel_devices` property ([#12075](https://github.com/PyTorchLightning/pytorch-lightning/pull/12075))
761+
762+
760763
### Fixed
761764

762765
- Fixed an issue where `ModelCheckpoint` could delete older checkpoints when `dirpath` has changed during resumed training ([#12045](https://github.com/PyTorchLightning/pytorch-lightning/pull/12045))

pytorch_lightning/trainer/connectors/accelerator_connector.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -780,10 +780,6 @@ def _lazy_init_strategy(self) -> None:
780780
of accessing this information through the strategy/accelerator directly."""
781781
# TODO: deprecate all properties below
782782

783-
@property
784-
def parallel_devices(self) -> List[Union[torch.device, int]]:
785-
return self._parallel_devices
786-
787783
@property
788784
def devices(self) -> int:
789785
if isinstance(self.strategy, SingleDeviceStrategy):

tests/accelerators/test_common.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,9 +51,9 @@ def name():
5151
trainer = Trainer(accelerator=TestAccelerator(), devices=2, strategy="ddp")
5252
assert isinstance(trainer.accelerator, TestAccelerator)
5353
assert isinstance(trainer.strategy, DDPStrategy)
54-
assert trainer._accelerator_connector.parallel_devices == ["foo"] * 2
54+
assert trainer.strategy.parallel_devices == ["foo"] * 2
5555

5656
trainer = Trainer(strategy=DDPStrategy(TestAccelerator()), devices="auto")
5757
assert isinstance(trainer.accelerator, TestAccelerator)
5858
assert isinstance(trainer.strategy, DDPStrategy)
59-
assert trainer._accelerator_connector.parallel_devices == ["foo"] * 3
59+
assert trainer.strategy.parallel_devices == ["foo"] * 3

0 commit comments

Comments
 (0)