question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. ItĀ collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Progress bar in Jupyter adds newlines for each validation step

See original GitHub issue

šŸ› Bug

Pytorch lightning prints newlines when showing the validation progress bar. See attached screenshot.

This may be a bug with nested progress bars in tqdm. I’m using the recent tqdm 4.45.0; I also had the issue with tqdm 4.43.0.

Screenshot 2020-04-07 at 12 31 30

To Reproduce

Steps to reproduce the behavior:

In a Jupyter notebook, run trainer.fit(model) on any model that has a validation step.

Code sample

Expected behavior

No newlines should be added.

Environment

cuda:
        GPU:
                Tesla K80
        available:           True
        version:             10.1
packages:
        numpy:               1.17.4
        pyTorch_debug:       False
        pyTorch_version:     1.4.0
        pytorch-lightning:   0.7.1
        tensorboard:         2.2.0
        tqdm:                4.45.0
system:
        OS:                  Linux
        architecture:
                64bit

        processor:           
        python:              3.7.3
        version:             #1 SMP Debian 4.9.168-1+deb9u4 (2019-07-19)

Additional context

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:11 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
tcwalthercommented, Apr 7, 2020

I had a look at that issue you linked, but it didn’t seem fully relevant. I’ve filed a new issue:

tqdm/tqdm#935

1reaction
tcwalthercommented, Apr 7, 2020

Turns out this is a bug in tqdm. I will file an issue there. Easiest way to reproduce:

from tqdm.auto import tqdm
from time import sleep

for _ in tqdm(range(5)):
    for _ in tqdm(range(5), leave=False):
        sleep(0.01)

Feel free to close this issue. And thanks for replying so swiftly, it really motivated to dig into the issue myself 😃.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Progress bar in Jupyter adds newlines for each validation step
In a Jupyter notebook, run trainer.fit(model) on any model that has a validation step. Code sample. Expected behavior. No newlines should beĀ ...
Read more >
Customize the progress bar - PyTorch Lightning
Lightning supports two different types of progress bars (tqdm and rich). ... visible during validation; shows total progress over all validation datasets.
Read more >
PyTorch Lightning training console output is weird
The default PL progress bar uses tqdm and you can have issues if tqdm ... Trainer is configured to run the validation loop...
Read more >
Python Progress Bars with Tqdm by Example
For this example, you need to add a requests package and validators to your Python site-packages via pip. $ pip install requests validators#Ā ......
Read more >
Progress bar reprints during validation - PyTorch Lightning
Hi! My progress bar updates in place nicely during training steps, but then during validation something weird happens and it starts printingĀ ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found