Skip to content

[data] Improve execution progress rendering#56992

Merged
bveeramani merged 39 commits intoray-project:masterfrom
kyuds:better-progress-bar
Oct 16, 2025
Merged

[data] Improve execution progress rendering#56992
bveeramani merged 39 commits intoray-project:masterfrom
kyuds:better-progress-bar

Conversation

@kyuds
Copy link
Member

@kyuds kyuds commented Sep 28, 2025

Why are these changes needed?

Screenshot 2025-10-07 at 9 46 09 PM

Link to video recording

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

Related issue number

Fixes #52505

Checks

  • I've signed off every commit(by using the -s flag, i.e., git commit -s) in this PR.
  • I've run scripts/format.sh to lint the changes in this PR.
  • 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 :(

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.

Written by Cursor Bugbot for commit 935f3c3. This will update automatically on new commits. Configure here.

@kyuds kyuds requested a review from a team as a code owner September 28, 2025 15:05
@kyuds kyuds marked this pull request as draft September 28, 2025 15:06
Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@kyuds kyuds changed the title [wip][data] Improve execution progress rendering [data] Improve execution progress rendering Sep 29, 2025
@kyuds kyuds marked this pull request as ready for review September 29, 2025 06:50
@kyuds kyuds force-pushed the better-progress-bar branch from 3353ab9 to 16e16b4 Compare September 29, 2025 06:56
@kyuds
Copy link
Member Author

kyuds commented Sep 29, 2025

cc @richardliaw for initial feedback!

cursor[bot]

This comment was marked as outdated.

@ray-gardener ray-gardener bot added data Ray Data-related issues community-contribution Contributed by the community labels Sep 29, 2025
@goutamvenkat-anyscale
Copy link
Contributor

/gemini review

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

cursor[bot]

This comment was marked as outdated.

cursor[bot]

This comment was marked as outdated.

Copy link
Contributor

@goutamvenkat-anyscale goutamvenkat-anyscale left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the change! It's much needed. Also love the decoupling of the progress bar from the streaming executor.

cursor[bot]

This comment was marked as outdated.

@kyuds
Copy link
Member Author

kyuds commented Sep 29, 2025

I checked out the buildkite failures and they fall largely into two types:

For failure type 1:
As we consolidate progress reporting, we no longer support sub-progress bars that were initialized in initialize_sub_progress_bars. The errors for argument of type "NoneType" is non-iterable stems from that we try to get the sub-progress bars that we no longer use, hence we no longer initialize.

These changes were introduced in #34997.

I see two solutions for this:

  1. We remove the sub progress bars for good --> that is inline with the "simplification" of progress reporting
  2. We "turn off" sub progress bars for the context of this PR, and then we improve the UI to introduce sub-progress bars to the current layout (reserved for a future pr)

I am open to either method

For failure type 2:
Very similar to failure type 1, but now the error message is shuffle_metrics attribute doesn't exist. This happens because in initialize_sub_progress_bars, we also initialize OpRuntimeMetrics to I guess track the sub-progress of things. The only problem is, while OpRuntimeMetrics is a dataclass, it creates internal bundle queues that seems to store objects.

A potential solution I see:
Simply just only initialize OpRuntimeMetrics in a function like initialize_metrics, and check if our operator instance is of type HashShuffleProgressBarMixin, and initialize the metrics as appropriate.

I am super new to the codebase, and I am more than welcome to any feedback/suggestions/etc!!

cc @goutamvenkat-anyscale , @richardliaw

@kyuds
Copy link
Member Author

kyuds commented Oct 3, 2025

Just checking back in to see if theres anything I could do!

@goutamvenkat-anyscale
Copy link
Contributor

I checked out the buildkite failures and they fall largely into two types:

For failure type 1: As we consolidate progress reporting, we no longer support sub-progress bars that were initialized in initialize_sub_progress_bars. The errors for argument of type "NoneType" is non-iterable stems from that we try to get the sub-progress bars that we no longer use, hence we no longer initialize.

These changes were introduced in #34997.

I see two solutions for this:

  1. We remove the sub progress bars for good --> that is inline with the "simplification" of progress reporting
  2. We "turn off" sub progress bars for the context of this PR, and then we improve the UI to introduce sub-progress bars to the current layout (reserved for a future pr)

I am open to either method

For failure type 2: Very similar to failure type 1, but now the error message is shuffle_metrics attribute doesn't exist. This happens because in initialize_sub_progress_bars, we also initialize OpRuntimeMetrics to I guess track the sub-progress of things. The only problem is, while OpRuntimeMetrics is a dataclass, it creates internal bundle queues that seems to store objects.

A potential solution I see: Simply just only initialize OpRuntimeMetrics in a function like initialize_metrics, and check if our operator instance is of type HashShuffleProgressBarMixin, and initialize the metrics as appropriate.

I am super new to the codebase, and I am more than welcome to any feedback/suggestions/etc!!

cc @goutamvenkat-anyscale , @richardliaw

@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):

  • AllToAllOperator.initialize_sub_progress_bars()
  • HashShuffleProgressBarMixin.initialize_sub_progress_bars()
  • OpState.initialize_progress_bars()

Or another option is we break it up into 2 PRs, in this one, we let the sub progress bars use tqdm/the current PB manager and then in the subsequent PR, you can make the set of changes needed to refactor subprogess bars to use rich and then deprecate the old manager.

As for the metics initialization I'm fine with decoupling that as well, as you suggested.

@kyuds
Copy link
Member Author

kyuds commented Oct 3, 2025

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 🙏 .

@gvspraveen
Copy link
Contributor

@kyuds Thanks for the contribution. No worries. Hope you feel better soon! Take care!

@gvspraveen gvspraveen added the @external-author-action-required Alternate tag for PRs where the author doesn't have labeling permission. label Oct 3, 2025
kyuds added 5 commits October 7, 2025 18:26
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>
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>
@kyuds
Copy link
Member Author

kyuds commented Oct 15, 2025

@iamjustinhsu pushed the fix for the rate string! Thank you so much!

@kyuds kyuds requested a review from iamjustinhsu October 15, 2025 10:16
Copy link
Contributor

@iamjustinhsu iamjustinhsu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice work!! :)

@bveeramani bveeramani merged commit 1bfc9be into ray-project:master Oct 16, 2025
6 checks passed
@kyuds kyuds deleted the better-progress-bar branch October 16, 2025 01:11

# shuffle
self.shuffle_bar = None
self.shuffle_metrics = OpRuntimeMetrics(self)
Copy link
Contributor

@alexeykudinkin alexeykudinkin Oct 16, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is this reinitializing the metrics and resetting the bar?

Copy link
Member Author

@kyuds kyuds Oct 16, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Copy link
Contributor

@alexeykudinkin alexeykudinkin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@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)

Comment on lines 388 to +389
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(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's no need to set shuffle_bar to none and immediately overwrite it

...

@abstractmethod
def set_sub_progress_bar(self, name, pg):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add typing

Comment on lines +293 to +297
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:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be

if self._use_rich_progress():
   ... 
elif self._global_info:
   ...

justinyeh1995 pushed a commit to justinyeh1995/ray that referenced this pull request Oct 20, 2025
<!-- 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>
xinyuangui2 pushed a commit to xinyuangui2/ray that referenced this pull request Oct 22, 2025
<!-- 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>
snorkelopstesting3-bot pushed a commit to snorkel-marlin-repos/ray-project_ray_pr_56992_6b4afc4e-b77c-4163-99fe-de53fd28c07e that referenced this pull request Oct 22, 2025
snorkelopsstgtesting1-spec added a commit to snorkel-marlin-repos/ray-project_ray_pr_56992_6b4afc4e-b77c-4163-99fe-de53fd28c07e that referenced this pull request Oct 22, 2025
elliot-barn pushed a commit that referenced this pull request Oct 23, 2025
<!-- 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>
landscapepainter pushed a commit to landscapepainter/ray that referenced this pull request Nov 17, 2025
<!-- 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>
Aydin-ab pushed a commit to Aydin-ab/ray-aydin that referenced this pull request Nov 19, 2025
<!-- 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>
Future-Outlier pushed a commit to Future-Outlier/ray that referenced this pull request Dec 7, 2025
<!-- 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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

community-contribution Contributed by the community data Ray Data-related issues @external-author-action-required Alternate tag for PRs where the author doesn't have labeling permission. go add ONLY when ready to merge, run all tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[data] Improve progress bars rendering

7 participants