-
Notifications
You must be signed in to change notification settings - Fork 613
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
Disable tqdm progress bar if no TTY attached #2000
Conversation
Hi @mssalvatore, thanks for investigating this issue! Just to be sure, the solution for TGI would be to disable progress bars when downloading? For what I understand the PR simply change that if For your info, disabling progress bars can be done by setting pinging @OlivierDehaene @Narsil who maintain TGI |
@Wauplin, yes, that's the intended fix. It preserves the current behavior which is that the progress bar is disabled if Regarding whether or not |
TIL from tqdm's docs: So yes, definitely agree with this PR! I wasn't aware of the nuance between |
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.
Thanks @mssalvatore for finding out about this and opening this PR! The change looks good to me now (didn't know about this default behavior before). Could you also update the tqdm in lfs.py as well (same fix + same comment). Thanks in advance!
When dockerized applications write to STDOUT/STDERR, the applications can block due to logging back pressure (see https://docs.docker.com/config/containers/logging/configure/#configure-the-delivery-mode-of-log-messages-from-container-to-log-driver6 HuggingFace's TGI container is one such example (see huggingface/text-generation-inference#1186). Setting tqdm's `disable=None` will disable the progress bar if no tty is attached and help to resolve TGI's issue #1186. References: huggingface/text-generation-inference#1186 (comment) huggingface/text-generation-inference#1186 (comment)
The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update. |
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.
Thanks for making the changes @mssalvatore ! Failed tests in CI are unrelated so let's get it merge :)
This just wasted me 3 hours to debug what caused by progress bar disappeared. Whoever merge this must be completely nonsense. Please do consider revert this as soon as possible! |
Hi, merger here 👋 What was your setup exactly and what solution would you suggest to address the issue described in the PR description? |
https://github.com/tqdm/tqdm?tab=readme-ov-file#faq-and-known-issues |
When dockerized applications write to STDOUT/STDERR, the applications can block due to logging back pressure (see
https://docs.docker.com/config/containers/logging/configure/#configure-the-delivery-mode-of-log-messages-from-container-to-log-driver6
HuggingFace's TGI container is one such example (see huggingface/text-generation-inference#1186).
Setting tqdm's
disable=None
will disable the progress bar if no tty is attached and help to resolve TGI's issue #1186.References:
huggingface/text-generation-inference#1186 (comment)
huggingface/text-generation-inference#1186 (comment)