-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
Fix/rich progressbar visibility #19239
base: master
Are you sure you want to change the base?
Fix/rich progressbar visibility #19239
Conversation
Hey @Borda and @awaelchli, noticed my PR #19239 acting up during checks. 🤔 Any insights on why it failed and advice on the necessary tweaks to make it pass? Thanks a bunch! 🙏 |
@@ -1,5 +1,6 @@ | |||
mypy==1.5.1 | |||
torch==2.1.0 | |||
colored |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@manascb1344 We can't add a dependency to Lightning like this. The rich package is optional for Lightning. Is there a different way to detect the color?
The progress bar will now adjust its color depending on whether the terminal supports color and if it's a truecolor terminal.
Could you check whether this feature is already supported in rich itself? It feels like this is probably something that the package already handles, we just haven't configured it properly. I'm not familiar with this unfortunately.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, isn't purple suitable both for light and dark?
️✅ There are no secrets present in this pull request anymore.If these secrets were true positive and are still valid, we highly recommend you to revoke them. 🦉 GitGuardian detects secrets in your source code to help developers and security teams secure the modern development process. You are seeing this because you or someone else with access to this repository has authorized GitGuardian to scan your pull request. |
What does this PR do?
Summary of Change:
This commit introduces a dynamic progress bar color based on the system's color theme. The progress bar will now adjust its color depending on whether the terminal supports color and if it's a truecolor terminal. For dark themes, the progress bar color is set to green, while for light themes, it is set to blue. The
RichProgressBarTheme
is updated to allow customization of color values for both light and dark themes.Dependencies:
colored
library is required for color support detection.Fixes #17118
PR review
Anyone in the community is welcome to review the PR.
Before you start reviewing, make sure you have read the review guidelines. In short, see the following bullet-list:
Reviewer checklist
📚 Documentation preview 📚: https://pytorch-lightning--19239.org.readthedocs.build/en/19239/