From 31e1e06361e63a9ea113f6db41a48602b6d9a3e3 Mon Sep 17 00:00:00 2001 From: Scott Lee Date: Mon, 15 Jul 2024 12:05:52 -0700 Subject: [PATCH 1/2] update plan docstring Signed-off-by: Scott Lee --- python/ray/data/_internal/plan.py | 30 +++++++++++------------------- 1 file changed, 11 insertions(+), 19 deletions(-) diff --git a/python/ray/data/_internal/plan.py b/python/ray/data/_internal/plan.py index 6c0ca99b70cc..0f4c1dcb57c0 100644 --- a/python/ray/data/_internal/plan.py +++ b/python/ray/data/_internal/plan.py @@ -35,24 +35,16 @@ class ExecutionPlan: - """A lazy execution plan for a Dataset.""" - - # Implementation Notes: - # - # This lazy execution plan takes in an input block list and builds up a chain of - # List[BlockRef] --> List[BlockRef] operators. Prior to execution, - # we apply a set of logical plan optimizations, such as operator fusion, - # in order to reduce Ray task overhead and data copies. - # - # Internally, the execution plan holds two block lists: - # * _in_blocks: The (possibly lazy) input block list. - # * _snapshot_blocks: A snapshot of a computed block list, where this snapshot - # is the cached output of executing some prefix in the operator chain. - # - # The operators in this execution plan are partitioned into two subchains: - # before the snapshot and after the snapshot. When the snapshot exists from a - # previous execution, any future executions will only have to execute the "after the - # snapshot" subchain, using the snapshot as the input to that subchain. + """A lazy execution plan for a Dataset. + + This lazy execution plan builds up a chain of ``List[RefBundle]`` --> + ``List[RefBundle]`` operators. Prior to execution, we apply a set of logical + plan optimizations, such as operator fusion, in order to reduce Ray task + overhead and data copies. + + Internally, the execution plan holds a snapshot of a computed list of + blocks and their associated metadata under ``self._snapshot_bundle``, + where this snapshot is the cached output of executing the operator chain.""" def __init__( self, @@ -64,7 +56,7 @@ def __init__( Args: stats: Stats for the base blocks. - dataset_uuid: Dataset's UUID. + data_context: DataContext object to use for execution. """ self._in_stats = stats # A computed snapshot of some prefix of operators and their corresponding From aea1ebcb04008928b8ac8a2ca95a66b86e6d0495 Mon Sep 17 00:00:00 2001 From: Scott Lee Date: Mon, 15 Jul 2024 12:07:40 -0700 Subject: [PATCH 2/2] format Signed-off-by: Scott Lee --- python/ray/data/_internal/plan.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/python/ray/data/_internal/plan.py b/python/ray/data/_internal/plan.py index 0f4c1dcb57c0..b0cbef0b6e54 100644 --- a/python/ray/data/_internal/plan.py +++ b/python/ray/data/_internal/plan.py @@ -56,7 +56,8 @@ def __init__( Args: stats: Stats for the base blocks. - data_context: DataContext object to use for execution. + data_context: :class:`~ray.data.context.DataContext` + object to use for execution. """ self._in_stats = stats # A computed snapshot of some prefix of operators and their corresponding