File tree Expand file tree Collapse file tree 1 file changed +2
-1
lines changed
Expand file tree Collapse file tree 1 file changed +2
-1
lines changed Original file line number Diff line number Diff line change 2828from lightning .fabric .utilities .device_parser import _parse_gpu_ids
2929from lightning .fabric .utilities .distributed import _suggested_max_num_threads
3030from lightning .fabric .utilities .load import _load_distributed_checkpoint
31- from lightning .pytorch .trainer .connectors .accelerator_connector import _AcceleratorConnector
3231
3332_log = logging .getLogger (__name__ )
3433
@@ -188,6 +187,8 @@ def _set_env_variables(args: Namespace) -> None:
188187
189188def _get_num_processes (accelerator : str , devices : str ) -> int :
190189 """Parse the `devices` argument to determine how many processes need to be launched on the current machine."""
190+ from lightning .pytorch .trainer .connectors .accelerator_connector import _AcceleratorConnector
191+
191192 if accelerator == "auto" or accelerator is None :
192193 accelerator = _AcceleratorConnector ._choose_auto_accelerator ()
193194 if devices == "auto" :
You can’t perform that action at this time.
0 commit comments