class ray.util.state.common.TaskSummaries(summary: Dict[str, ray.util.state.common.TaskSummaryPerFuncOrClassName] | List[ray.util.state.common.NestedTaskSummary], total_tasks: int, total_actor_tasks: int, total_actor_scheduled: int, summary_by: str = 'func_name')[source]#
total_tasks: int#

Total Ray tasks.

total_actor_tasks: int#

Total actor tasks.

total_actor_scheduled: int#

Total scheduled actors.

classmethod to_summary_by_lineage(*, tasks: List[Dict], actors: List[Dict]) TaskSummaries[source]#

This summarizes tasks by lineage. i.e. A task will be grouped with another task if they have the same parent.

This does things in 4 steps. Step 1: Iterate through all tasks and keep track of them by id and ownership Step 2: Put the tasks in a tree structure based on ownership Step 3: Merge together siblings in the tree if there are more than one with the same name. Step 4: Sort by running and then errored and then successful tasks Step 5: Total the children

This can probably be more efficient if we merge together some steps to reduce the amount of iterations but this algorithm produces very easy to understand code. We can optimize in the future.