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

[WIP] Make RichProgressBar the default if rich is available #15321

Closed
wants to merge 9 commits into from

Conversation

awaelchli
Copy link
Contributor

@awaelchli awaelchli commented Oct 26, 2022

What does this PR do?

Continues #10912, #9647
Fixes #9580

Before submitting

  • Was this discussed/approved via a GitHub issue? (not for typos and docs)
  • Did you read the contributor guideline, Pull Request section?
  • Did you make sure your PR does only one thing, instead of bundling different changes together?
  • Did you make sure to update the documentation with your changes? (if necessary)
  • Did you write any new necessary tests? (not for typos and docs)
  • Did you verify new and existing tests pass locally with your changes?
  • Did you update the CHANGELOG? (not for typos, docs, test updates, or internal minor changes/refactorings)

PR review

Anyone in the community is free to review the PR once the tests have passed.
Before you start reviewing make sure you have read Review guidelines. In short, see the following bullet-list:

  • Is this pull request ready for review? (if not, please submit in draft mode)
  • Check that all items from Before submitting are resolved
  • Make sure the title is self-explanatory and the description concisely explains the PR
  • Add labels and milestones (and optionally projects) to the PR so it can be classified

Did you have fun?

I made sure I had fun coding 🙃

cc @Borda @justusschock @kaushikb11 @rohitgr7

@github-actions github-actions bot added the pl Generic label for PyTorch Lightning package label Oct 26, 2022
@awaelchli awaelchli added progress bar: rich bug Something isn't working and removed pl Generic label for PyTorch Lightning package labels Oct 26, 2022
@awaelchli awaelchli added this to the v1.8.x milestone Oct 26, 2022
@github-actions github-actions bot added the pl Generic label for PyTorch Lightning package label Oct 26, 2022
@awaelchli awaelchli changed the title WIP: (test) Reveal bugs with RichProgressBar by making it the default Make RichProgressBar the default if rich is available Oct 29, 2022
@awaelchli awaelchli modified the milestones: v1.8.x, v1.9 Oct 29, 2022
@@ -174,7 +178,7 @@ def _configure_progress_bar(self, enable_progress_bar: bool = True) -> None:
)

if enable_progress_bar:
progress_bar_callback = TQDMProgressBar()
progress_bar_callback = RichProgressBar() if _RICH_AVAILABLE else TQDMProgressBar()
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm hesitant of this change for two reasons:

  1. Rich pbar is slower than tqdm (there's an issue about this somewhere, cc @akihironitta)
  2. I believe CI installs rich, which means that now tqdm is untested. Since it's the most widely used, I find that risky.

@carmocca carmocca added the breaking change Includes a breaking change label Nov 2, 2022
@carmocca
Copy link
Contributor

carmocca commented Nov 2, 2022

Shouldn't this be labeled as "feature" and not "bug"?

Also I added "breaking change", as users might be expecting tqdm even if they have rich installed in their environments

@awaelchli
Copy link
Contributor Author

awaelchli commented Nov 2, 2022

Sorry everyone. This PR was initially just used to reveal bugs that were fixed in the linked PRs. Since jobs don't run on drafts, I had to mark it ready. But the PR is actually not ready for review. It is merely a proof of concept.

There are many open questions regarding

  • how good is our rich implementation
  • how do we keep the same test coverage for both bars if tqdm is battle tested while now switching to a very untested rich implementation
  • performance

that need to be discussed first before we can make the switch.

@awaelchli awaelchli changed the title Make RichProgressBar the default if rich is available [WIP] Make RichProgressBar the default if rich is available Nov 2, 2022
@awaelchli awaelchli added feature Is an improvement or enhancement and removed bug Something isn't working labels Nov 2, 2022
@awaelchli awaelchli marked this pull request as draft November 13, 2022 00:16
@Borda Borda requested review from carmocca and removed request for otaj and rohitgr7 December 9, 2022 11:11
@Borda
Copy link
Member

Borda commented Dec 9, 2022

@awaelchli could you check this one if you have time :)

@awaelchli
Copy link
Contributor Author

I currently don't have the capacity to pursue this further.

@awaelchli awaelchli closed this Dec 9, 2022
@awaelchli awaelchli deleted the feature/rich-default branch December 9, 2022 11:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking change Includes a breaking change feature Is an improvement or enhancement has conflicts pl Generic label for PyTorch Lightning package progress bar: rich tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Enable Rich Progress Bar/Model Summary if Rich is available
3 participants