class_docstr: Environment for PTL training on a Ray cluster.
class_docstr_tok: ["Environment","for","PTL","training","on","a","Ray","cluster","."]
docstr: Create a Ray environment.
docstr_tok: ["Create","a","Ray","environment","."]
code: def __init__(self, world_size):
      """Create a Ray environment."""
      self.set_world_size(world_size)
      self._global_rank = 0
      self._is_remote = False
      self._main_port = -1
  
file_path: BigDL/python/nano/src/bigdl/nano/deps/ray/ray_envbase.py
imports: import os
  from pytorch_lightning.plugins.environments import ClusterEnvironment
  from pytorch_lightning.utilities import rank_zero_only
label_desc: Use image node_id 1 to create a new RayEnvironment object from inherited base classes: ClusterEnvironment with example: obj = RayEnvironment(world_size)