Skip to content

Progress bar always rendered in Google Colab/Jupyter Notebook #1015

@EugenHotaj

Description

@EugenHotaj

On the terminal, it is possible to disable the progress bar by not specifying "{bar}" in bar_format. For example bar_format="{l_bar}{r_bar}" will render the left and right sides of the bar, but not the actual progress bar itself.

On Google Colab/Jupyter Notebook, the bar will always render on the left side, even when disabled. My guess is that this happens because an IProgress is always created in status_printer . A simple fix might be to create a component for the description instead of implicitly using IProgress and set the IProgress component to invisible if no "{bar}: is given, e.g.:

# in status_printer
desc = HTML()
pbar = IProgres(...)
ptext = HTM()
container = HBOX(children=[desc, pbar, ptext])
...

# in display
desc, pbar, ptext = self.container.children
...
if we_dont_want_the_bar:
  pbar.closer()  # or pbar.visible = False
...
  • I have marked all applicable categories:
    • exception-raising bug
    • visual output bug
    • documentation request (i.e. "X is missing from the documentation." If instead I want to ask "how to use X?" I understand StackOverflow#tqdm is more appropriate)
    • new feature request
  • I have visited the source website, and in particular
    read the known issues
  • I have searched through the issue tracker for duplicates
  • I have mentioned version numbers, operating system and
    environment, where applicable:
    Google colab
    4.41.1 3.6.9 (default, Apr 18 2020, 01:56:04)
    [GCC 8.4.0] linux
    

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions