Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Data] Do not show AllToAll progress bar if the disable flag is set #45136

Merged
merged 2 commits into from
May 6, 2024

Conversation

jrosti
Copy link
Contributor

@jrosti jrosti commented May 3, 2024

Why are these changes needed?

AllToAll main progress bar is shown even if progress bars are disabled.

Related issue number

Closes #44770

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
    • Tested manually the visibility

Signed-off-by: Jari Rosti <jari@iprally.com>
@jrosti jrosti force-pushed the fix/progress-bars-visible branch from b411547 to 1c94ebe Compare May 3, 2024 23:18
@jrosti jrosti marked this pull request as ready for review May 3, 2024 23:25
@jrosti jrosti marked this pull request as draft May 3, 2024 23:32
@jrosti jrosti marked this pull request as ready for review May 4, 2024 06:04
enabled = is_all_to_all or (
DataContext.get_current().enable_progress_bars and verbose_progress
progress_bar_enabled = DataContext.get_current().enable_progress_bars and (
is_all_to_all or verbose_progress
)
self.progress_bar = ProgressBar(
Copy link
Contributor Author

@jrosti jrosti May 4, 2024

Choose a reason for hiding this comment

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

ProgressBar is bit confusing name because it has responsibilities in the monitoring lifecycle: e.g. if sub_progress_bars are not initialized the program does not work.

I'd change name to ProgressMonitor - which can then have progress-bar property as it currently has - I think it makes the intention bit more clear: it is not just a visual detail, but it tells the completion of the underlying operation which is then coupled to the control flow.

Copy link
Contributor

Choose a reason for hiding this comment

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

Got it, I agree with you in general, I think it's a nit for now, so we can live with ProgressBar without updating too many places.

# Initialize must be called for sub progress bars, even the
# bars are not enabled via the DataContext.
num_progress_bars += self.op.initialize_sub_progress_bars(index + 1)
return num_progress_bars if progress_bar_enabled else 0
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Original code wants to return number of enabled progress bars, although I think that number of created "ProgressBar" instances would be more meaningful.

I preserved original behaviour since I did not follow the calls if the visibility of the progress bar is really what client wants to know.

Copy link
Contributor

Choose a reason for hiding this comment

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

yes, let's keep existing behavior.

Copy link
Contributor

@c21 c21 left a comment

Choose a reason for hiding this comment

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

Thank you @jrosti for the fix!

@c21 c21 changed the title Do not show AllToAll progress bar if the disable flag is set [Data] Do not show AllToAll progress bar if the disable flag is set May 6, 2024
@c21 c21 merged commit e5c80c6 into ray-project:master May 6, 2024
5 checks passed
harborn pushed a commit to harborn/ray that referenced this pull request May 8, 2024
…ay-project#45136)

AllToAll main progress bar is shown even if progress bars are disabled.

Signed-off-by: Jari Rosti <jari@iprally.com>
peytondmurray pushed a commit to peytondmurray/ray that referenced this pull request May 13, 2024
…ay-project#45136)

AllToAll main progress bar is shown even if progress bars are disabled.

Signed-off-by: Jari Rosti <jari@iprally.com>
ryanaoleary pushed a commit to ryanaoleary/ray that referenced this pull request Jun 6, 2024
…ay-project#45136)

AllToAll main progress bar is shown even if progress bars are disabled.

Signed-off-by: Jari Rosti <jari@iprally.com>
Signed-off-by: Ryan O'Leary <ryanaoleary@google.com>
ryanaoleary pushed a commit to ryanaoleary/ray that referenced this pull request Jun 7, 2024
…ay-project#45136)

AllToAll main progress bar is shown even if progress bars are disabled.

Signed-off-by: Jari Rosti <jari@iprally.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Data] Ray Data Sort progress bar shown when progress bars are disabled
2 participants