Commit 5ce3fbf
[data] Improve execution progress rendering (#56992)
<!-- Thank you for your contribution! Please review
https://github.com/ray-project/ray/blob/master/CONTRIBUTING.rst before
opening a pull request. -->
<!-- Please add a reviewer to the assignee section when you create a PR.
If you don't have the access to it, we will shortly find a reviewer and
assign them to your PR. -->
## Why are these changes needed?
<img width="1263" height="859" alt="Screenshot 2025-10-07 at 9 46 09 PM"
src="https://github.com/user-attachments/assets/45249e77-af49-4e3d-a758-608a51d15e10"
/>
[Link to video
recording](https://drive.google.com/file/d/13Erjd_K4OXmn1r_7iMS97u8cgUdBgTvG/view?usp=sharing)
Currently, by default, the original `tqdm` based progress is used. To
enable `rich` progress reporting as shown in the screenshot, set:
```
ray.data.DataContext.get_current().enable_rich_progress_bars = True
```
or set the envvar:
```
export RAY_DATA_ENABLE_RICH_PROGRESS_BARS=1
```
<!-- Please give a short summary of the change and the problem this
solves. -->
## Related issue number
Fixes #52505
<!-- For example: "Closes #1234" -->
## Checks
- [x] I've signed off every commit(by using the -s flag, i.e., `git
commit -s`) in this PR.
- [x] I've run `scripts/format.sh` to lint the changes in this PR.
- [x] I've included any doc changes needed for
https://docs.ray.io/en/master/.
- [ ] I've added any new APIs to the API Reference. For example, if I
added a
method in Tune, I've added it in `doc/source/tune/api/` under the
corresponding `.rst` file.
- [ ] I've made sure the tests are passing. Note that there might be a
few flaky tests, see the recent failures at https://flakey-tests.ray.io/
- Testing Strategy
- [ ] Unit tests
- [ ] Release tests
- [ ] This PR is not tested :(
<!-- CURSOR_SUMMARY -->
---
> [!NOTE]
> Replaces legacy per-operator/global progress bars with a Rich-based
progress manager that tracks global/operator progress and resources,
refactors topology/progress APIs, and updates tests.
>
> - **Execution Progress (Rich-based)**:
> - Introduces `progress_manager.py` with `RichExecutionProgressManager`
for global/operator progress, rates, elapsed/remaining time, and live
resource usage.
> - Streaming executor integrates manager (start/refresh/close,
finishing messages), updates on row/output and resources, and periodic
refresh via `PROGRESS_MANAGER_UPDATE_INTERVAL`.
> - **Operator/State Refactor**:
> - `OpState` gains `OpDisplayMetrics`, `progress_manager_uuid`,
`output_row_count`, and `update_display_metrics`; removes legacy
progress bar handling and summary methods.
> - `_debug_dump_topology` now logs `op_display_metrics.display_str()`.
> - Minor: add TODOs on sub-progress-bar helpers in `AllToAllOperator`
and `HashShuffleProgressBarMixin`.
> - **Topology API**:
> - `build_streaming_topology(...)` now returns only `Topology` (no
progress bar count); all call sites and tests updated.
> - **Iterator/Reporting**:
> - `_ClosingIterator` updates total progress via manager.
> - Resource reporting moved to progress manager.
> - **Tests**:
> - Adjust unit tests to new topology return type and removed progress
bar expectations.
>
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
935f3c3. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
---------
Signed-off-by: Daniel Shin <kyuseung1016@gmail.com>
Signed-off-by: kyuds <kyuseung1016@gmail.com>
Signed-off-by: kyuds <kyuds@everspin.co.kr>
Signed-off-by: elliot-barn <elliot.barnwell@anyscale.com>1 parent 7da5398 commit 5ce3fbf
File tree
12 files changed
+905
-194
lines changed- doc/source/data
- python/ray/data
- _internal
- execution
- operators
- tests
12 files changed
+905
-194
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
43 | 46 | | |
44 | 47 | | |
45 | 48 | | |
| |||
Lines changed: 16 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| 11 | + | |
11 | 12 | | |
12 | 13 | | |
13 | 14 | | |
14 | 15 | | |
15 | 16 | | |
16 | | - | |
17 | | - | |
| 17 | + | |
| 18 | + | |
18 | 19 | | |
19 | 20 | | |
20 | 21 | | |
| |||
47 | 48 | | |
48 | 49 | | |
49 | 50 | | |
50 | | - | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
51 | 54 | | |
52 | 55 | | |
53 | 56 | | |
| |||
169 | 172 | | |
170 | 173 | | |
171 | 174 | | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
172 | 184 | | |
173 | 185 | | |
174 | 186 | | |
| |||
Lines changed: 39 additions & 14 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
45 | 45 | | |
46 | 46 | | |
47 | 47 | | |
| 48 | + | |
48 | 49 | | |
49 | 50 | | |
50 | 51 | | |
| |||
363 | 364 | | |
364 | 365 | | |
365 | 366 | | |
366 | | - | |
| 367 | + | |
367 | 368 | | |
368 | 369 | | |
369 | 370 | | |
| |||
374 | 375 | | |
375 | 376 | | |
376 | 377 | | |
| 378 | + | |
| 379 | + | |
| 380 | + | |
| 381 | + | |
377 | 382 | | |
378 | | - | |
| 383 | + | |
| 384 | + | |
379 | 385 | | |
380 | 386 | | |
381 | 387 | | |
382 | 388 | | |
383 | | - | |
384 | | - | |
385 | | - | |
386 | | - | |
387 | | - | |
| 389 | + | |
| 390 | + | |
| 391 | + | |
| 392 | + | |
388 | 393 | | |
389 | 394 | | |
390 | 395 | | |
391 | 396 | | |
392 | | - | |
393 | | - | |
394 | | - | |
395 | | - | |
396 | | - | |
| 397 | + | |
| 398 | + | |
| 399 | + | |
| 400 | + | |
397 | 401 | | |
398 | 402 | | |
399 | 403 | | |
| |||
403 | 407 | | |
404 | 408 | | |
405 | 409 | | |
| 410 | + | |
| 411 | + | |
| 412 | + | |
| 413 | + | |
| 414 | + | |
| 415 | + | |
| 416 | + | |
| 417 | + | |
| 418 | + | |
| 419 | + | |
| 420 | + | |
| 421 | + | |
| 422 | + | |
| 423 | + | |
| 424 | + | |
| 425 | + | |
| 426 | + | |
| 427 | + | |
| 428 | + | |
| 429 | + | |
| 430 | + | |
406 | 431 | | |
407 | 432 | | |
408 | 433 | | |
| |||
705 | 730 | | |
706 | 731 | | |
707 | 732 | | |
708 | | - | |
| 733 | + | |
709 | 734 | | |
710 | 735 | | |
711 | 736 | | |
| |||
823 | 848 | | |
824 | 849 | | |
825 | 850 | | |
826 | | - | |
| 851 | + | |
827 | 852 | | |
828 | 853 | | |
829 | 854 | | |
| |||
Lines changed: 28 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
0 commit comments