MCPcopy Create free account
hub / github.com/InternLM/InternBootcamp / __init__

Method __init__

verl/verl/single_controller/ray/base.py:99–114  ·  view source on GitHub ↗
(
        self,
        process_on_nodes: Optional[list[int]] = None,
        use_gpu: bool = True,
        name_prefix: str = None,
        max_colocate_count: int = 10,
        detached=False,
        accelerator_type: Optional[str] = None,
    )

Source from the content-addressed store, hash-verified

97
98class RayResourcePool(ResourcePool):
99 def __init__(
100 self,
101 process_on_nodes: Optional[list[int]] = None,
102 use_gpu: bool = True,
103 name_prefix: str = None,
104 max_colocate_count: int = 10,
105 detached=False,
106 accelerator_type: Optional[str] = None,
107 ) -> None:
108 super().__init__(process_on_nodes, max_colocate_count)
109 self.use_gpu = use_gpu
110 # print(f"in RayProcessDispatchConfiguration: name_prefix = {name_prefix}")
111 self.name_prefix = get_random_string(length=6) if name_prefix is None else name_prefix
112 self.pgs = None
113 self.detached = detached
114 self.accelerator_type = accelerator_type
115
116 def get_placement_groups(self, strategy="STRICT_PACK", name=None, device_name="cuda"):
117 if self.pgs is not None:

Callers

nothing calls this directly

Calls 2

get_random_stringFunction · 0.85
__init__Method · 0.45

Tested by

no test coverage detected