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

Does tqdm print properly with --log-output? #765

Open
hujc7 opened this issue Jan 1, 2024 · 1 comment · May be fixed by #810
Open

Does tqdm print properly with --log-output? #765

hujc7 opened this issue Jan 1, 2024 · 1 comment · May be fixed by #810

Comments

@hujc7
Copy link

hujc7 commented Jan 1, 2024

🐛 Bug

Not sure if it's a bug or it's expected. When I use tqdm in notebook and use the --log-output option, the progress bar keeps printing to a new line. Anyone having the same problem?

Notebook cell

from time import sleep
from tqdm import tqdm
 
for i in tqdm(range(int(5)), leave=True):
    sleep(0.1)

CMD

papermill papermill-test.ipynb papermill-test-out.ipynb --log-output

Output

Input Notebook:  papermill-test.ipynb
Output Notebook: papermill-test-out.ipynb
Executing notebook with kernel: python3
Executing Cell 1---------------------------------------
  0%|                    | 0/5 [00:00<?, ?it/s]
 20%|██▍         | 1/5 [00:00<00:00,  9.99it/s]
 40%|████▊       | 2/5 [00:00<00:00,  9.88it/s]
 60%|███████▏    | 3/5 [00:00<00:00,  9.85it/s]
 80%|█████████▌  | 4/5 [00:00<00:00,  9.83it/s]
100%|████████████| 5/5 [00:00<00:00,  9.83it/s]
100%|████████████| 5/5 [00:00<00:00,  9.82it/s]


Ending Cell 1------------------------------------------

tqdm: 4.65.2
papermill: 2.5.0

@Sarius2009
Copy link

Sarius2009 commented Apr 16, 2024

Same probelm here, would be really nice if this could be fixed!

Something that can be guessed from the shown output, but I also noticed: It even seems like the line is alreadyy updated, but then a new line is printed, so you end up with one line for each step, and an extra one for the current step.

@bryanvaz bryanvaz linked a pull request Oct 18, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants