diff --git a/src/lightning/fabric/connector.py b/src/lightning/fabric/connector.py index f677893100..9fb6625583 100644 --- a/src/lightning/fabric/connector.py +++ b/src/lightning/fabric/connector.py @@ -313,7 +313,8 @@ class _Connector: f" using {accelerator_name} accelerator." ) - def _choose_auto_accelerator(self) -> str: + @staticmethod + def _choose_auto_accelerator() -> str: """Choose the accelerator type (str) based on availability when ``accelerator='auto'``.""" if XLAAccelerator.is_available(): return "tpu" diff --git a/src/lightning/pytorch/trainer/connectors/accelerator_connector.py b/src/lightning/pytorch/trainer/connectors/accelerator_connector.py index 1c97a223b1..06f3ee366b 100644 --- a/src/lightning/pytorch/trainer/connectors/accelerator_connector.py +++ b/src/lightning/pytorch/trainer/connectors/accelerator_connector.py @@ -328,7 +328,8 @@ class _AcceleratorConnector: f" using {accelerator_name} accelerator." ) - def _choose_auto_accelerator(self) -> str: + @staticmethod + def _choose_auto_accelerator() -> str: """Choose the accelerator type (str) based on availability.""" if XLAAccelerator.is_available(): return "tpu"