(
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,
)
| 97 | |
| 98 | class 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: |
nothing calls this directly
no test coverage detected