State API#

Note

APIs are alpha. This feature requires a full installation of Ray using pip install "ray[default]".

For an overview with examples see Monitoring Ray States.

For the CLI reference see Ray State CLI Reference or Ray Log CLI Reference.

State Python SDK#

State APIs are also exported as functions.

Summary APIs#

ray.experimental.state.api.summarize_actors([...])

Summarize the actors in cluster.

ray.experimental.state.api.summarize_objects([...])

Summarize the objects in cluster.

ray.experimental.state.api.summarize_tasks([...])

Summarize the tasks in cluster.

List APIs#

ray.experimental.state.api.list_actors([...])

List actors in the cluster.

ray.experimental.state.api.list_placement_groups([...])

List placement groups in the cluster.

ray.experimental.state.api.list_nodes([...])

List nodes in the cluster.

ray.experimental.state.api.list_jobs([...])

List jobs submitted to the cluster by :ref: ray job submission.

ray.experimental.state.api.list_workers([...])

List workers in the cluster.

ray.experimental.state.api.list_tasks([...])

List tasks in the cluster.

ray.experimental.state.api.list_objects([...])

List objects in the cluster.

ray.experimental.state.api.list_runtime_envs([...])

List runtime environments in the cluster.

Get APIs#

ray.experimental.state.api.get_actor(id[, ...])

Get an actor by id.

ray.experimental.state.api.get_placement_group(id)

Get a placement group by id.

ray.experimental.state.api.get_node(id[, ...])

Get a node by id.

ray.experimental.state.api.get_worker(id[, ...])

Get a worker by id.

ray.experimental.state.api.get_task(id[, ...])

Get task attempts of a task by id.

ray.experimental.state.api.get_objects(id[, ...])

Get objects by id.

Log APIs#

ray.experimental.state.api.list_logs([...])

Listing log files available.

ray.experimental.state.api.get_log([...])

Retrieve log file based on file name or some entities ids (pid, actor id, task id).

State APIs Schema#

ray.experimental.state.common.ActorState(...)

Actor State

ray.experimental.state.common.TaskState(...)

Task State

ray.experimental.state.common.NodeState(...)

Node State

ray.experimental.state.common.PlacementGroupState(...)

PlacementGroup State

ray.experimental.state.common.WorkerState(...)

Worker State

ray.experimental.state.common.ObjectState(...)

Object State

ray.experimental.state.common.RuntimeEnvState(...)

Runtime Environment State

ray.experimental.state.common.JobState(...)

The state of the job that's submitted by Ray's Job APIs

ray.experimental.state.common.StateSummary(...)

ray.experimental.state.common.TaskSummaries(...)

ray.experimental.state.common.TaskSummaryPerFuncOrClassName(...)

ray.experimental.state.common.ActorSummaries(...)

ray.experimental.state.common.ActorSummaryPerClass(...)

ray.experimental.state.common.ObjectSummaries(...)

ray.experimental.state.common.ObjectSummaryPerKey(...)

State APIs Exceptions#

ray.experimental.state.exception.RayStateApiException(...)