[data] Improve execution progress rendering#56992
[data] Improve execution progress rendering#56992bveeramani merged 39 commits intoray-project:masterfrom
Conversation
There was a problem hiding this comment.
Code Review
This pull request introduces a significant improvement to the execution progress rendering by replacing the custom ProgressBar with the rich library. This provides a much more modern and informative UI. The refactoring is extensive, touching the streaming executor, its state management, and operators.
The changes are generally well-implemented, but I've found a couple of critical issues that need to be addressed. One is a bug in how progress is updated, which would lead to incorrect progress display. The other is related to the WIP nature of the PR, where a missing dependency check for rich would cause a crash.
Additionally, there are several TODO comments, especially TODO (kyuds): remove, which should be cleaned up before this PR is merged.
Overall, this is a great enhancement, and with the suggested fixes, it will be a solid contribution.
3353ab9 to
16e16b4
Compare
|
cc @richardliaw for initial feedback! |
python/ray/data/_internal/execution/operators/base_physical_operator.py
Outdated
Show resolved
Hide resolved
|
/gemini review |
There was a problem hiding this comment.
Code Review
This pull request introduces a new rich-based execution progress manager, which is a significant improvement over the legacy progress bars. The refactoring across the streaming executor and operator state is well-executed. I've identified a few issues: a logic bug in progress metric calculation that could lead to incorrect progress display, a redundant stats generation call, and a minor type safety issue in the new OpDisplayMetrics dataclass. Overall, this is a great enhancement to Ray Data's user experience.
python/ray/data/_internal/execution/streaming_executor_state.py
Outdated
Show resolved
Hide resolved
goutamvenkat-anyscale
left a comment
There was a problem hiding this comment.
Thanks for the change! It's much needed. Also love the decoupling of the progress bar from the streaming executor.
python/ray/data/_internal/execution/operators/base_physical_operator.py
Outdated
Show resolved
Hide resolved
python/ray/data/_internal/execution/streaming_executor_state.py
Outdated
Show resolved
Hide resolved
|
I checked out the buildkite failures and they fall largely into two types: For failure type 1: These changes were introduced in #34997. I see two solutions for this:
I am open to either method For failure type 2: A potential solution I see: I am super new to the codebase, and I am more than welcome to any feedback/suggestions/etc!! |
|
Just checking back in to see if theres anything I could do! |
@kyuds Sorry for the delay. We use sub progress bars for all shuffle operations, cause there are multiple stages (like map and reduce). So simply turning off the bars is not a viable option imo. Can you estimate how much work it is to incorporate the management of sub progress bars inside your new progress bar manager? I believe it should be these operators (but please double check if there are more):
Or another option is we break it up into 2 PRs, in this one, we let the sub progress bars use As for the metics initialization I'm fine with decoupling that as well, as you suggested. |
|
Thank you for the feedback @goutamvenkat-anyscale ! I think its going to take me one to two days to make the subprogress bars work (however, as this was not part of the original spec, I would really appreciate getting feedback on how the sub-progress bars should actually look like. I'll do an initial design and I think we can exchange feedback and iterate from there). For decoupling the metrics, I think that can come later actually, otherwise the PR will become extremely bloated. The only problem for me right now is I recently had a medical operation so I can't even put on my glasses... (Im literally squinting hard at my screen trying to type this reply). I think I'll be able to implement the fixes starting early next-week and finish by end of mid week. Hope you understand the delay 🙏 . |
|
@kyuds Thanks for the contribution. No worries. Hope you feel better soon! Take care! |
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: kyuds <kyuds@everspin.co.kr>
Signed-off-by: kyuds <kyuds@everspin.co.kr>
Signed-off-by: Daniel Shin <kyuseung1016@gmail.com>
|
@iamjustinhsu pushed the fix for the rate string! Thank you so much! |
|
|
||
| # shuffle | ||
| self.shuffle_bar = None | ||
| self.shuffle_metrics = OpRuntimeMetrics(self) |
There was a problem hiding this comment.
Why is this reinitializing the metrics and resetting the bar?
There was a problem hiding this comment.
this is called once upon initializing progress manager, not called at all when using the tqdm progress bar implementation.
btw, when initializing the progress manager, the initialize_sub_progress_bars method is not called, so we need an alternative method of initializing the metrics, which is done in that function. Otherwise the program will crash entirely because metrics are not initialized at all.
However, I do understand the naming of the function may cause confusion. Would you have some suggestions for an alternative name?
There was a problem hiding this comment.
some ideas that come into mind: initialize_sub_progress_bar_infos, initialize_sub_progress_attrs
I'll submit a follow-up PR for this if any is ok with you. Any suggestions are, as always, very welcome
alexeykudinkin
left a comment
There was a problem hiding this comment.
@kyuds thank you for your great contribution!
As a follow-up would you mind actually doing the following:
- Abstracting both progress-bar implementations away completely from the StreamingExecutor behind ProgressManager interface
- Maintain 2 implementations (Rich-basd and tqdm) that could be extending ProgressManager (or being injected into)
| self.shuffle_bar = None | ||
| if self.shuffle_name is not None: | ||
| self.shuffle_bar, position = _create_sub_pb( | ||
| self.shuffle_name, self.num_output_rows_total(), position | ||
| ) | ||
| progress_bars_created += 1 | ||
| self.shuffle_bar, position = _create_sub_pb( |
There was a problem hiding this comment.
There's no need to set shuffle_bar to none and immediately overwrite it
| ... | ||
|
|
||
| @abstractmethod | ||
| def set_sub_progress_bar(self, name, pg): |
| if self._use_rich_progress() and self._progress_manager: | ||
| self._progress_manager.close_with_finishing_description( | ||
| desc, exception is None | ||
| ) | ||
| elif not self._use_rich_progress() and self._global_info: |
There was a problem hiding this comment.
This should be
if self._use_rich_progress():
...
elif self._global_info:
...
<!-- 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 ray-project#52505 <!-- For example: "Closes ray-project#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>
<!-- 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 ray-project#52505 <!-- For example: "Closes ray-project#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: xgui <xgui@anyscale.com>
Original PR #56992 by kyuds Original: ray-project/ray#56992
Merged from original PR #56992 Original: ray-project/ray#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>
<!-- 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 ray-project#52505 <!-- For example: "Closes ray-project#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>
<!-- 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 ray-project#52505 <!-- For example: "Closes ray-project#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: Aydin Abiar <aydin@anyscale.com>
<!-- 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 ray-project#52505 <!-- For example: "Closes ray-project#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: Future-Outlier <eric901201@gmail.com>
Why are these changes needed?
Link to video recording
Currently, by default, the original
tqdmbased progress is used. To enablerichprogress reporting as shown in the screenshot, set:or set the envvar:
Related issue number
Fixes #52505
Checks
git commit -s) in this PR.scripts/format.shto lint the changes in this PR.method in Tune, I've added it in
doc/source/tune/api/under thecorresponding
.rstfile.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.
progress_manager.pywithRichExecutionProgressManagerfor global/operator progress, rates, elapsed/remaining time, and live resource usage.PROGRESS_MANAGER_UPDATE_INTERVAL.OpStategainsOpDisplayMetrics,progress_manager_uuid,output_row_count, andupdate_display_metrics; removes legacy progress bar handling and summary methods._debug_dump_topologynow logsop_display_metrics.display_str().AllToAllOperatorandHashShuffleProgressBarMixin.build_streaming_topology(...)now returns onlyTopology(no progress bar count); all call sites and tests updated._ClosingIteratorupdates total progress via manager.Written by Cursor Bugbot for commit 935f3c3. This will update automatically on new commits. Configure here.