list_placement_groups#
- ray.util.state.list_placement_groups(address: str | None = None, filters: List[Tuple[str, str, str | bool | int | float]] | None = None, limit: int = 100, timeout: int = 30, detail: bool = False, raise_on_missing_output: bool = True, _explain: bool = False) List[PlacementGroupState][source]#
List placement groups in the cluster.
- Parameters:
address (str | None) – Ray bootstrap address, could be
auto,localhost:6379. If None, it will be resolved automatically from an initialized ray.filters (List[Tuple[str, str, str | bool | int | float]] | None) – List of tuples of filter key, predicate (=, or !=), and the filter value. E.g.,
("state", "=", "abcd")String filter values are case-insensitive.limit (int) – Max number of entries returned by the state backend.
timeout (int) – Max timeout value for the state APIs requests made.
detail (bool) – When True, more details info (specified in
PlacementGroupState) will be queried and returned. SeePlacementGroupState.raise_on_missing_output (bool) – When True, exceptions will be raised if there is missing data due to truncation/data source unavailable.
_explain (bool) – Print the API information such as API latency or failed query information.
- Returns:
List of
PlacementGroupState.- Raises:
RayStateApiException – if the CLI failed to query the data.
- Return type:
DeveloperAPI: This API may change across minor Ray releases.