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.util.state.summarize_actors

Summarize the actors in cluster.

ray.util.state.summarize_objects

Summarize the objects in cluster.

ray.util.state.summarize_tasks

Summarize the tasks in cluster.

List APIs#

ray.util.state.list_actors

List actors in the cluster.

ray.util.state.list_placement_groups

List placement groups in the cluster.

ray.util.state.list_nodes

List nodes in the cluster.

ray.util.state.list_jobs

List jobs submitted to the cluster by ray job submission.

ray.util.state.list_workers

List workers in the cluster.

ray.util.state.list_tasks

List tasks in the cluster.

ray.util.state.list_objects

List objects in the cluster.

ray.util.state.list_runtime_envs

List runtime environments in the cluster.

Get APIs#

ray.util.state.get_actor

Get an actor by id.

ray.util.state.get_placement_group

Get a placement group by id.

ray.util.state.get_node

Get a node by id.

ray.util.state.get_worker

Get a worker by id.

ray.util.state.get_task

Get task attempts of a task by id.

ray.util.state.get_objects

Get objects by id.

Log APIs#

ray.util.state.list_logs

Listing log files available.

ray.util.state.get_log

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

State APIs Schema#

State APIs Exceptions#