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

tqdm_notebook leave=False Leaves Whitespace Behind #479

Closed
utkonos opened this issue Nov 15, 2017 · 10 comments
Closed

tqdm_notebook leave=False Leaves Whitespace Behind #479

utkonos opened this issue Nov 15, 2017 · 10 comments
Assignees
Labels
duplicate 🗐 Seen it before submodule-notebook 📓 Much web such IDE

Comments

@utkonos
Copy link

utkonos commented Nov 15, 2017

python 3.6.3

ipykernel (4.6.1)
ipython (6.2.1)
jupyter (1.0.0)
jupyter-client (5.1.0)
jupyter-console (5.2.0)
jupyter-core (4.4.0)
tqdm (4.19.4)

All installed by pip3 on macOS 10.13.1 and Chrome 62.0.3202.94 (Official Build) (64-bit)

I am seeing extra spaces added on redrawing nested progress meters. The inner meters slowly creep farther from the top bar. Here is a quick script that demonstrates the problem:

import tqdm

address_space = set()

for i in tqdm.tqdm_notebook(range(256), desc='First Octet'):
    for j in tqdm.tqdm_notebook(range(256), desc='Second Octet', leave=False):
        for k in range(256):
            for l in range(256):
                address_space.add('{}.{}.{}.{}'.format(i, j, k, l))

If you substitute the third and fourth nested range(256) with more tqdm, the problem is even more obvious.

I have attached an animated GIF of the problem.

tqdm

@casperdcl casperdcl added the submodule-notebook 📓 Much web such IDE label Nov 15, 2017
@casperdcl casperdcl added this to the >5 milestone Nov 15, 2017
@casperdcl
Copy link
Sponsor Member

wait this is #433

@gorogm
Copy link

gorogm commented Oct 13, 2020

Appears also with Windows, appears also in Firefox.

casperdcl added a commit that referenced this issue Dec 19, 2020
- fixed and/or realted to #433, #479, #550, #935
casperdcl added a commit that referenced this issue Dec 19, 2020
- fixes and/or related to #433, #479, #550, #935
casperdcl added a commit that referenced this issue Dec 20, 2020
- fixes and/or related to #433, #479, #550, #935
@joooeey
Copy link

joooeey commented Nov 2, 2021

This still happens on v4.62.3 on Linux Mint 20.1 and Firefox 90.0.2.

@poldpold
Copy link

poldpold commented Nov 30, 2021

This still happens on v4.62.3 on Linux Mint 20.1 and Firefox 90.0.2.

Same on Chrome 90.0.4430.212 and Windows 10 Enterprise 21H2.

@thefrol
Copy link

thefrol commented Dec 5, 2021

Still on Firefox 94.0 on Ubuntu 18.04

@JRitmeester
Copy link

Still on Chrome 100.0.4896.127 on Windows 10. Will this ever get fixed?

@tommedema
Copy link

After much trial and error this is the only workaround that worked for me in JupyterLab:

from IPython.core.display import HTML

# See https://github.com/bstriner/keras-tqdm/issues/21#issuecomment-443019223
display(HTML("""
    <style>
        .jp-OutputArea-child:has(.jp-OutputArea-prompt:empty) {
              padding: 0 !important;
        }
    </style>
"""))

@gersonjferreira
Copy link

it does not work on vscode

@utkonos
Copy link
Author

utkonos commented Jun 12, 2023

@gersonjferreira I would open a new issue. The issue that I reported above is fixed (leaving space behind in Jupyter when using the leave parameter).

@thariq-nugrohotomo
Copy link

TqdmCallback for Keras doesn't have this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate 🗐 Seen it before submodule-notebook 📓 Much web such IDE
Projects
None yet
Development

No branches or pull requests