class_docstr: Strategy for training with multiple processes in parallel.
class_docstr_tok: ["Strategy","for","training","with","multiple","processes","in","parallel","."]
code: def __init__(
      self,
      accelerator: Optional[Accelerator] = None,
      parallel_devices: Optional[List[torch.device]] = None,
      cluster_environment: Optional[ClusterEnvironment] = None,
      checkpoint_io: Optional[CheckpointIO] = None,
      precision: Optional[Precision] = None,
  ):
      super().__init__(
          accelerator=accelerator,
          checkpoint_io=checkpoint_io,
          precision=precision,
      )
      self.parallel_devices = parallel_devices
      self.cluster_environment: Optional[
          ClusterEnvironment
      ] = cluster_environment
  
imports: from abc import ABC
  from typing import Any, Dict, List, Optional
  import torch
  from torch import Tensor
  from typing_extensions import override
  from lightning.fabric.accelerators.accelerator import Accelerator
  from lightning.fabric.plugins.environments.cluster_environment import ClusterEnvironment
  from lightning.fabric.plugins.io.checkpoint_io import CheckpointIO
  from lightning.fabric.plugins.precision import Precision
  from lightning.fabric.strategies.strategy import Strategy
  from lightning.fabric.utilities.distributed import _all_gather_ddp_if_available
  from lightning.fabric.utilities.types import ReduceOp
label_desc: Use image node_id 1 to create a new ParallelStrategy object from inherited base classes: Strategy, ABC with example: obj = ParallelStrategy(accelerator, parallel_devices, cluster_environment, checkpoint_io, precision)