Skip to content

[Data] Progress Manager Consolidation#58173

Closed
kyuds wants to merge 15 commits intoray-project:masterfrom
kyuds:progress-revamp
Closed

[Data] Progress Manager Consolidation#58173
kyuds wants to merge 15 commits intoray-project:masterfrom
kyuds:progress-revamp

Conversation

@kyuds
Copy link
Copy Markdown
Member

@kyuds kyuds commented Oct 26, 2025

Description

Follow up to previous PR on Ray Data progress manager consolidation

Related issues

Following feedback in #56992, there were suggestions for the following:

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)

This PR does them + some of the additional feedback given.

Additional Information

Need some edits after #58277 is merged to master

Signed-off-by: Daniel Shin <kyuseung1016@gmail.com>
@kyuds kyuds requested a review from a team as a code owner October 26, 2025 04:27
Copy link
Copy Markdown
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 is a great refactoring of the progress bar logic in Ray Data. It introduces a clean ProgressManager abstraction, separating the core execution logic from the UI/display logic. This makes the code more modular, easier to maintain, and extensible for other progress bar implementations in the future. The changes are well-executed across multiple files, resulting in a much cleaner StreamingExecutor.

I have a few suggestions to further improve the code, mainly around reducing some code duplication in the new progress manager implementations and a minor cleanup in one of the new classes.

kyuds added 2 commits October 26, 2025 13:30
Signed-off-by: Daniel Shin <kyuseung1016@gmail.com>
Signed-off-by: Daniel Shin <kyuseung1016@gmail.com>
@kyuds
Copy link
Copy Markdown
Member Author

kyuds commented Oct 26, 2025

kyuds added 2 commits October 26, 2025 14:20
Signed-off-by: Daniel Shin <kyuseung1016@gmail.com>
Signed-off-by: Daniel Shin <kyuseung1016@gmail.com>
@ray-gardener ray-gardener bot added data Ray Data-related issues community-contribution Contributed by the community labels Oct 26, 2025
kyuds added 2 commits October 26, 2025 16:06
Signed-off-by: Daniel Shin <kyuseung1016@gmail.com>
Signed-off-by: Daniel Shin <kyuseung1016@gmail.com>
@kyuds
Copy link
Copy Markdown
Member Author

kyuds commented Oct 26, 2025

Im seeing the failures in #3f5f2ce in other microcheck runs as well, so might need to merge master when that is fixed (might be due to flaky CI, as I've seen some cache misses and weird builds on buildkite, so I reran with empty commit). Preliminary manual inspection, at least to me, seems unrelated (reason being 1, failure logs are unrelated, 2, the tests passed for multiple prior commits, while almost nothing changed except for logging order and some bug fixes)

kyuds added 2 commits October 27, 2025 09:20
Signed-off-by: kyuds <kyuseung1016@gmail.com>
Signed-off-by: kyuds <kyuseung1016@gmail.com>
cursor[bot]

This comment was marked as outdated.

kyuds added 2 commits October 28, 2025 13:30
Signed-off-by: kyuds <kyuseung1016@gmail.com>
Signed-off-by: kyuds <kyuseung1016@gmail.com>
@kyuds kyuds requested a review from a team as a code owner October 29, 2025 00:52
Signed-off-by: kyuds <kyuseung1016@gmail.com>
@kyuds
Copy link
Copy Markdown
Member Author

kyuds commented Oct 29, 2025

btw, core test failure also fails on current master: https://buildkite.com/ray-project/microcheck/builds/30043

needs_warning = True


class ProgressBar(BaseProgressBar):
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Why not move to tqdm_progess.py since this is only for tqdm?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

We use original ProgressBar for other usecases in the codebase (for like datasources). I didnt think it was necessary to turn them into rich as well because they are one liners.

I separated TqdmSubProgressBar for abstraction mostly (and for the update_absolute)

kyuds added 2 commits November 7, 2025 21:22
Signed-off-by: Daniel Shin <kyuseung1016@gmail.com>
Signed-off-by: Daniel Shin <kyuseung1016@gmail.com>
Copy link
Copy Markdown

@cursor cursor bot left a comment

Choose a reason for hiding this comment

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

Bug: Typo Fix: Shuffle Progress Bar Label Correction

Typo in progress bar name: shuffle_progress_bar_name="Shufle" should be "Shuffle" (missing second 'f'). This causes the shuffle progress bar to display with an incorrect label.

python/ray/data/_internal/execution/operators/hash_shuffle.py#L1196-L1197

),
shuffle_progress_bar_name="Shufle",

Fix in Cursor Fix in Web


Signed-off-by: Daniel Shin <kyuseung1016@gmail.com>
@kyuds kyuds requested a review from owenowenisme November 7, 2025 14:11
@gvspraveen gvspraveen requested a review from bveeramani November 7, 2025 17:52
@iamjustinhsu
Copy link
Copy Markdown
Contributor

Hey @kyuds, do u think u can rebase from master?
cc: @bveeramani

@bveeramani
Copy link
Copy Markdown
Member

@iamjustinhsu next action is on me to provide guidance on how to do this refactor

@bveeramani
Copy link
Copy Markdown
Member

@kyuds I finally dug into this.

The spaghetti has gotten pretty deep over the years for the progress bar code, and I think we should clean it up in steps.

Here are two immediate issues I think we should clean up:

Fix 1: Two Subprogress Bar Interfaces

Current state:

  • Interface 1 (AllToAllOperator, HashShuffleOperator)

    • initialize_sub_progress_bars(), close_sub_progress_bars(), set_sub_progress_bars()
    • Operators manage ProgressBar instances directly
    • Used with old TQDM display
  • Interface 2 (HashShuffleOperator)

    • SubProgressBarMixin with get_sub_progress_bar_names() / set_sub_progress_bar()
    • Operators declare needs; RichExecutionProgressManager creates the bars
    • Used with new Rich display

Problem: Confusing and increases maintenance — which interface should new subprogress bars use?

Proposed solution:
Unify on SubProgressBarMixin:

  • Refactor it to work for both TQDM and Rich, and for both operators
  • Remove initialize_sub_progress_bars(), close_sub_progress_bars(), set_sub_progress_bars()

Fix 2: Operators Managing Progress Bar Lifecycle

Problem:

  • Tightly couples operators to progress bar rendering, making it harder to change display/output (e.g., logs vs terminal).
  • Complicates operator interface: they handle execution and progress visualization.

Proposed solution:

  • Operators should only describe progress, e.g., via a simple dict[str, int] like {"shuffle": 4}.
  • Progress rendering/management should be handled elsewhere.

@kyuds
Copy link
Copy Markdown
Member Author

kyuds commented Nov 20, 2025

will be rebasing to master soon. Im a bit clogged this week, but should be able to get to this soon

@kyuds
Copy link
Copy Markdown
Member Author

kyuds commented Nov 20, 2025

to respond to comments from @bveeramani , this specific PR actually is the proposed fix for problem 1. Problem 2 is also sort of addressed here. Because BaseProgressManager is an abstract class and all progress managers implement that class, we are able to just switch out the implementation for BaseProgressManager and progress can be changed easily.

@bveeramani bveeramani marked this pull request as draft November 21, 2025 18:59
@bveeramani
Copy link
Copy Markdown
Member

Discussed with @kyuds over Slack -- we're going to park this PR for now, and come back to it later, maybe after we've de-spaghettified some of our code

@github-actions
Copy link
Copy Markdown

github-actions bot commented Dec 6, 2025

This pull request has been automatically marked as stale because it has not had
any activity for 14 days. It will be closed in another 14 days if no further activity occurs.
Thank you for your contributions.

You can always ask for help on our discussion forum or Ray's public slack channel.

If you'd like to keep this open, just leave any comment, and the stale label will be removed.

@github-actions github-actions bot added the stale The issue is stale. It will be closed within 7 days unless there are further conversation label Dec 6, 2025
@kyuds
Copy link
Copy Markdown
Member Author

kyuds commented Dec 11, 2025

superceded by follow up prs

@kyuds kyuds closed this Dec 11, 2025
bveeramani pushed a commit that referenced this pull request Dec 23, 2025
## 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

---------

Signed-off-by: kyuds <kyuseung1016@gmail.com>
Signed-off-by: Daniel Shin <kyuseung1016@gmail.com>
AYou0207 pushed a commit to AYou0207/ray that referenced this pull request Jan 13, 2026
## 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>
@kyuds kyuds deleted the progress-revamp branch January 20, 2026 05:41
lee1258561 pushed a commit to pinterest/ray that referenced this pull request Feb 3, 2026
## 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>
peterxcli pushed a commit to peterxcli/ray that referenced this pull request Feb 25, 2026
## 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>
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 stale The issue is stale. It will be closed within 7 days unless there are further conversation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants