PlacementGroupState#

class ray.util.state.common.PlacementGroupState(placement_group_id: str, name: str, creator_job_id: str, state: Literal['PENDING', 'PREPARED', 'CREATED', 'REMOVED', 'RESCHEDULING'], bundles: List[dict] | None = None, is_detached: bool | None = None, stats: dict | None = None, topology_strategy: dict | None = None, topology_assignments: dict | None = None)[source]#

Bases: StateSchema

PlacementGroup State

Below columns can be used for the --filter option.

state

is_detached

name

creator_job_id

placement_group_id

Below columns are available only when get API is used,

--detail is specified through CLI, or detail=True is given to Python APIs.

state

topology_assignments

is_detached

name

stats

creator_job_id

bundles

placement_group_id

topology_strategy

placement_group_id: str#

The id of the placement group.

name: str#

The name of the placement group if it is given by the name argument.

creator_job_id: str#

The job id of the placement group.

state: Literal['PENDING', 'PREPARED', 'CREATED', 'REMOVED', 'RESCHEDULING']#

The state of the placement group.

  • PENDING: The placement group creation is pending scheduling. It could be because there’s not enough resources, some of creation stage has failed (e.g., failed to commit placement gropus because the node is dead).

  • CREATED: The placement group is created.

  • REMOVED: The placement group is removed.

  • RESCHEDULING: The placement group is rescheduling because some of bundles are dead because they were on dead nodes.

bundles: List[dict] | None = None#

The bundle specification of the placement group.

is_detached: bool | None = None#

True if the placement group is detached. False otherwise.

stats: dict | None = None#

The scheduling stats of the placement group.

topology_strategy: dict | None = None#

a dict mapping each topology label key (e.g. “ray.io/gpu-domain”) to a placement strategy (e.g. “STRICT_PACK”). Empty dict if the placement group does not use topology-aware scheduling.

NOTE: This field is experimental and may change in the future.

Type:

The topology strategy for this placement group

topology_assignments: dict | None = None#

a dict mapping each topology label key to the value the scheduler has selected for this PG (e.g. {“ray.io/gpu-domain”: “rack-1”}). Empty dict if no topology values have been selected yet.

NOTE: This field is experimental and may change in the future.

Type:

Topology assignments