MCPcopy
hub / github.com/ray-project/ray / get_placement_group_id

Method get_placement_group_id

python/ray/runtime_context.py:483–490  ·  view source on GitHub ↗

Get the current Placement group ID of this worker. Returns: The current placement group id in hex format of this worker.

(self)

Source from the content-addressed store, hash-verified

481 return self.worker.placement_group_id
482
483 def get_placement_group_id(self) -> Optional[str]:
484 """Get the current Placement group ID of this worker.
485
486 Returns:
487 The current placement group id in hex format of this worker.
488 """
489 pg_id = self.worker.placement_group_id
490 return pg_id.hex() if not pg_id.is_nil() else None
491
492 @property
493 def should_capture_child_tasks_in_placement_group(self):

Callers

nothing calls this directly

Calls 2

hexMethod · 0.45
is_nilMethod · 0.45

Tested by

no test coverage detected