- class ray.experimental.state.common.TaskSummaries(summary: Union[Dict[str, ray.experimental.state.common.TaskSummaryPerFuncOrClassName], List[ray.experimental.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]) ray.experimental.state.common.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: 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.