Update pytorch_lightning.py

update deprecated property
This commit is contained in:
Phúc H. Lê Khắc 2023-08-02 16:23:57 +02:00 committed by GitHub
parent ec53de75b4
commit f85dc71f46
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -119,7 +119,7 @@ class GpuStatsLogger(Callback): # pylint: disable=too-many-instance-attributes
f'The root device type is {trainer.strategy.root_device.type}.',
)
device_ids = trainer.data_parallel_device_ids
device_ids = trainer.device_ids
try:
self._devices = get_devices_by_logical_ids(device_ids, unique=True)
except (libnvml.NVMLError, RuntimeError) as ex: