ray.util.tpu.get_tpu_nodes_for_slice#
- ray.util.tpu.get_tpu_nodes_for_slice(slice_name: str, nodes: List[Dict[str, Any]] | None = None) List[Dict[str, Any]][source]#
Returns all alive Ray nodes belonging to the specified TPU slice.
- Parameters:
slice_name – The TPU slice name to filter by.
nodes – Optional list of Ray node dictionaries. If not provided, it will be fetched via
ray.nodes()from GCS.
- Returns:
A list of node dictionaries that are alive and belong to the specified TPU slice.
PublicAPI (alpha): This API is in alpha and may change before becoming stable.