class_docstr: The Accelerator base class for Lightning PyTorch.
  
  .. warning::  Writing your own accelerator is an :ref:`experimental <versioning:Experimental API>` feature.
docstr: Called by the Trainer to set up the accelerator before the model starts running on the device.
  
  Args:
      trainer: the trainer instance
docstr_tok: ["Called","by","the","Trainer","to","set","up","the","accelerator","before","the","model","starts","running","on","the","device",".","Args",":","trainer",":","the","trainer","instance"]
code: def setup(self, trainer: "pl.Trainer") -> None:
      """Called by the Trainer to set up the accelerator before the model starts running on the device.
  
      Args:
          trainer: the trainer instance
  
      """
  
file_path: pytorch-lightning/src/lightning/pytorch/accelerators/accelerator.py
imports: from abc import ABC
  from typing import Any, Dict
  import lightning.pytorch
  from lightning.fabric.accelerators.accelerator import Accelerator
  from lightning.fabric.utilities.types import _DEVICE
label_desc: Use image node_id 1 for calling the Accelerator obj's underlying member method code with example usage: obj.setup(trainer) without return types