[Data] Progress Reporting Refactor 1#59350
Conversation
…ogress Signed-off-by: kyuds <kyuseung1016@gmail.com>
Signed-off-by: kyuds <kyuseung1016@gmail.com>
Signed-off-by: kyuds <kyuseung1016@gmail.com>
…om dataclass Signed-off-by: kyuds <kyuseung1016@gmail.com>
Signed-off-by: kyuds <kyuseung1016@gmail.com>
Signed-off-by: kyuds <kyuseung1016@gmail.com>
Signed-off-by: kyuds <kyuseung1016@gmail.com>
Signed-off-by: kyuds <kyuseung1016@gmail.com>
There was a problem hiding this comment.
Code Review
This pull request refactors the progress reporting mechanism in Ray Data, successfully decoupling it from the executor and operator states. The changes introduce dedicated progress manager classes (RichExecutionProgressManager and TqdmExecutionProgressManager) to centralize the logic for displaying progress, which improves modularity and allows for more flexible progress bar implementations. The removal of direct progress bar management from PhysicalOperator and OpState simplifies these core components. The changes are well-structured and consistent across the modified files, achieving the stated objective of the refactor.
Signed-off-by: Daniel Shin <kyuseung1016@gmail.com>
|
|
||
| ctx = DataContext.get_current() | ||
| self._enabled = ctx.enable_progress_bars | ||
| self._show_op_progress = self._enabled and ctx.enable_operator_progress_bars |
There was a problem hiding this comment.
Bug: verbose_progress option silently ignored after refactor
The refactoring removes usage of self._options.verbose_progress from the progress bar initialization. Previously, the old code in initialize_progress_bars used verbose_progress to control whether non-AllToAll (1:1) operators would show progress bars. The new progress managers (TqdmExecutionProgressManager and RichExecutionProgressManager) only check ctx.enable_operator_progress_bars, completely ignoring the verbose_progress execution option. This breaks backward compatibility for users who set verbose_progress=False expecting to hide individual operator progress bars while still seeing AllToAll operator progress. The option is still documented as functional in ExecutionOptions and used in tests like test_backpressure_e2e.py and test_sort.py.
Additional Locations (1)
bveeramani
left a comment
There was a problem hiding this comment.
LGTM except for the duplicate log issue.
We're doing a branch cut tomorrow -- I can land this after the branch cut (this is a non-trivial refactor, and I want to make sure we have time to catch issues if there are any)
|
|
||
| ctx = DataContext.get_current() | ||
| self._enabled = ctx.enable_progress_bars | ||
| self._show_op_progress = self._enabled and ctx.enable_operator_progress_bars |
| @@ -28,7 +28,6 @@ | |||
| from ray.data._internal.execution.interfaces.op_runtime_metrics import OpRuntimeMetrics | |||
There was a problem hiding this comment.
I'm seeing a duplicate "execution finished" message with the code on this PR.
python -c "import ray; ray.data.range(1).materialize()
PR
✔️ Dataset dataset_1_0 execution finished in 0.31 seconds: 100%|███████████████████████████████████████████████████████████████████████████████████| 1.00/1.00 [00:00<00:00, 3.40 row/s]
- ReadRange->SplitBlocks(20): Tasks: 0; Actors: 0; Queued blocks: 0 (0.0B); Resources: 0.0 CPU, 8.0B object store: 100%|████████████████████████████| 1.00/1.00 [00:00<00:00, 3.40 row/s]
2025-12-11 17:22:50,626 INFO streaming_executor.py:297 -- ✔️ Dataset dataset_1_0 execution finished in 0.31 seconds
Master
✔️ Dataset dataset_1_0 execution finished in 0.31 seconds: 100%|███████████████████████████████████████████████████████████████████████████████████| 1.00/1.00 [00:00<00:00, 3.29 row/s]
- ReadRange->SplitBlocks(20): Tasks: 0; Actors: 0; Queued blocks: 0 (0.0B); Resources: 0.0 CPU, 8.0B object store: 100%|████████████████████████████| 1.00/1.00 [00:00<00:00, 3.29 row/s]
| desc, exception is None | ||
| ) | ||
| elif not self._use_rich_progress() and self._global_info: | ||
| logger.info(desc) |
There was a problem hiding this comment.
if you see here, we logged in master too. Don't quite understand why it didn't show up tbh (maybe it showed up before tqdm?)
Signed-off-by: Daniel Shin <kyuseung1016@gmail.com>
Signed-off-by: Daniel Shin <kyuseung1016@gmail.com>
Signed-off-by: Daniel Shin <kyuseung1016@gmail.com>
Signed-off-by: Daniel Shin <kyuseung1016@gmail.com>
## Description Follow up to #59350 - motivation: better abstraction for progress bars and type checking in general. ## Related issues N/A ## Additional information N/A --------- Signed-off-by: kyuds <kyuseung1016@gmail.com> Signed-off-by: Daniel Shin <kyuseung1016@gmail.com>
## Description This is a series of PRs to refactor/consolidate progress reporting and to decouple it from the executor, opstates, etc. ## Related issues Split from ray-project#58173 ## Additional information N/A --------- Signed-off-by: kyuds <kyuseung1016@gmail.com> Signed-off-by: Daniel Shin <kyuseung1016@gmail.com> Signed-off-by: jasonwrwang <jasonwrwang@tencent.com>
## Description Follow up to ray-project#59350 - motivation: better abstraction for progress bars and type checking in general. ## Related issues N/A ## Additional information N/A --------- Signed-off-by: kyuds <kyuseung1016@gmail.com> Signed-off-by: Daniel Shin <kyuseung1016@gmail.com> Signed-off-by: jasonwrwang <jasonwrwang@tencent.com>
## Description This is a series of PRs to refactor/consolidate progress reporting and to decouple it from the executor, opstates, etc. ## Related issues Split from ray-project#58173 ## Additional information N/A --------- Signed-off-by: kyuds <kyuseung1016@gmail.com> Signed-off-by: Daniel Shin <kyuseung1016@gmail.com>
## Description Follow up to ray-project#59350 - motivation: better abstraction for progress bars and type checking in general. ## Related issues N/A ## Additional information N/A --------- Signed-off-by: kyuds <kyuseung1016@gmail.com> Signed-off-by: Daniel Shin <kyuseung1016@gmail.com>
## Description This is a series of PRs to refactor/consolidate progress reporting and to decouple it from the executor, opstates, etc. ## Related issues Split from ray-project#58173 ## Additional information N/A --------- Signed-off-by: kyuds <kyuseung1016@gmail.com> Signed-off-by: Daniel Shin <kyuseung1016@gmail.com> Signed-off-by: peterxcli <peterxcli@gmail.com>
## Description Follow up to ray-project#59350 - motivation: better abstraction for progress bars and type checking in general. ## Related issues N/A ## Additional information N/A --------- Signed-off-by: kyuds <kyuseung1016@gmail.com> Signed-off-by: Daniel Shin <kyuseung1016@gmail.com> Signed-off-by: peterxcli <peterxcli@gmail.com>
Description
This is a series of PRs to refactor/consolidate progress reporting and to decouple it from the executor, opstates, etc.
Related issues
Split from #58173
Additional information
N/A