class_docstr: Setup Lightning DDP training environment for Ray cluster.
class_docstr_tok: ["Setup","Lightning","DDP","training","environment","for","Ray","cluster","."]
code: def set_global_rank(self, rank: int) -> None:
      # Disable it since `global_rank()` directly returns data from Train.
      pass
  
imports: import logging
  import os
  import shutil
  import tempfile
  from typing import Any, Dict
  import torch
  from packaging.version import Version
  import ray
  from ray import train
  from ray._private.usage.usage_lib import TagKey, record_extra_usage_tag
  from ray.train import Checkpoint
  from ray.util import PublicAPI
label_desc: Use image node_id 7 for calling the RayLightningEnvironment obj's underlying member method code with example usage: obj.set_global_rank(rank) without return types