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

[BUG] Setting style to TaskProgressColumn does not change displayed text style #3133

Open
2 tasks done
nikita-savelyevv opened this issue Sep 25, 2023 · 1 comment
Open
2 tasks done

Comments

@nikita-savelyevv
Copy link

nikita-savelyevv commented Sep 25, 2023

Describe the bug

Setting style to TaskProgressColumn does not change displayed text style:

from time import sleep

from rich.progress import Progress, TaskProgressColumn

progress_column = TaskProgressColumn(style="red")
progress = Progress(progress_column)

with progress:
    for n in progress.track(range(100)):
        sleep(0.1)

Result:
image
(not red)

Platform

Click to expand

What platform (Win/Linux/Mac) are you running on?

  • Windows 11 connected to Ubuntu 20.04 via ssh

What terminal software are you using?

  • Windows Terminal

I may ask you to copy and paste the output of the following commands. It may save some time if you do it now.

If you're using Rich in a terminal:

╭───────────────────────── <class 'rich.console.Console'> ─────────────────────────╮
│ A high level console interface. │
│ │
│ ╭──────────────────────────────────────────────────────────────────────────────╮ │
│ │ │ │
│ ╰──────────────────────────────────────────────────────────────────────────────╯ │
│ │
│ color_system = '256' │
│ encoding = 'utf-8' │
│ file = <_io.TextIOWrapper name='' mode='w' encoding='utf-8'> │
│ height = 38 │
│ is_alt_screen = False │
│ is_dumb_terminal = False │
│ is_interactive = True │
│ is_jupyter = False │
│ is_terminal = True │
│ legacy_windows = False │
│ no_color = False │
│ options = ConsoleOptions( │
│ size=ConsoleDimensions(width=156, height=38), │
│ legacy_windows=False, │
│ min_width=1, │
│ max_width=156, │
│ is_terminal=True, │
│ encoding='utf-8', │
│ max_height=38, │
│ justify=None, │
│ overflow=None, │
│ no_wrap=False, │
│ highlight=None, │
│ markup=None, │
│ height=None │
│ ) │
│ quiet = False │
│ record = False │
│ safe_box = True │
│ size = ConsoleDimensions(width=156, height=38) │
│ soft_wrap = False │
│ stderr = False │
│ style = None │
│ tab_size = 8 │
│ width = 156 │
╰──────────────────────────────────────────────────────────────────────────────────╯
╭─── <class 'rich._windows.WindowsConsoleFeatures'> ────╮
│ Windows features available. │
│ │
│ ╭───────────────────────────────────────────────────╮ │
│ │ WindowsConsoleFeatures(vt=False, truecolor=False) │ │
│ ╰───────────────────────────────────────────────────╯ │
│ │
│ truecolor = False │
│ vt = False │
╰───────────────────────────────────────────────────────╯
╭────── Environment Variables ───────╮
│ { │
│ 'TERM': 'xterm-256color', │
│ 'COLORTERM': None, │
│ 'CLICOLOR': None, │
│ 'NO_COLOR': None, │
│ 'TERM_PROGRAM': None, │
│ 'COLUMNS': None, │
│ 'LINES': None, │
│ 'JUPYTER_COLUMNS': None, │
│ 'JUPYTER_LINES': None, │
│ 'JPY_PARENT_PID': None, │
│ 'VSCODE_VERBOSE_LOGGING': None │
│ } │
╰────────────────────────────────────╯
platform="Linux"

rich==13.5.3

@github-actions
Copy link

Thank you for your issue. Give us a little time to review it.

PS. You might want to check the FAQ if you haven't done so already.

This is an automated reply, generated by FAQtory

alexsu52 pushed a commit to openvinotoolkit/nncf that referenced this issue Oct 3, 2023
### Changes

- Progress bar now extends to screen width
- Iteration count, time spent and time remaining text components are now
Intel blue (RGB [0,104,181])

How it looks in terminal (Windows Terminal):

![image](https://github.com/openvinotoolkit/nncf/assets/23343961/cd10196a-ecdc-4b3a-a59e-b89341b6848c)


How it looks in Jupyter:

![image](https://github.com/openvinotoolkit/nncf/assets/23343961/131e2e10-887e-45ac-8640-dd0752f37593)


Please see how it looked before at #2132

Note: I've tried changing color for progress percent too, but couldn't,
most probably due to a bug in rich
Textualize/rich#3133

### Reason for changes

- Improving user experience

Special thanks to @AlexanderDokuchaev and @kshpv for suggesting these
changes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant