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.

Force enable tqdm in Google Colab

See original GitHub issue

🚀 Feature

Recently, Google Colab deactivated tqdm progress bars in Jupyter notebooks. We currently get this message from Google:

image

Motivation

Users don’t see a progress bar despite our docs saying that it is enabled by default.

Pitch

Force enable the tqdm widgets when in Colab. We can detect whether the code is running in Google Colab.

from google.colab import output
output.enable_custom_widget_manager()

Alternatives

x

Additional context

Users reported this on Slack for the first time.


If you enjoy Lightning, check out our other projects! ⚡

  • Metrics: Machine learning metrics for distributed, scalable PyTorch applications.

  • Lite: enables pure PyTorch users to scale their existing code on any kind of device while retaining full control over their own loops and optimization logic.

  • Flash: The fastest way to get a Lightning baseline! A collection of tasks for fast prototyping, baselining, fine-tuning, and solving problems with deep learning.

  • Bolts: Pretrained SOTA Deep Learning models, callbacks, and more for research and production with PyTorch Lightning and PyTorch.

  • Lightning Transformers: Flexible interface for high-performance research using SOTA Transformers leveraging PyTorch Lightning, Transformers, and Hydra.

cc @tchaton @rohitgr7 @awaelchli

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
kaushikb11commented, Aug 23, 2022

@awaelchli TQDMProgressBar seems to be working now on Colab.

Could you confirm? Notebook

0reactions
awaelchlicommented, Aug 23, 2022

@kaushikb11 You are right. It looks like the problem has solved itself over night. I opened a fresh Colab notebook and the trainer produced the expected progress bars.

Read more comments on GitHub >

github_iconTop Results From Across the Web

python - Why is tqdm printing to a newline instead of updating ...
Try with position=0 and leave=True. (Solution working in Google Colab to avoid printing to a newline) from tqdm import tqdm import time def ......
Read more >
tqdm_notebook Google Colab Test.ipynb - Colaboratory
!pip install --force https://github.com/chengs/tqdm/archive/colab.zip ... Installing collected packages: tqdm Found existing installation: tqdm 4.28.1 ...
Read more >
tqdm - PyPI
tqdm works on any platform (Linux, Windows, Mac, FreeBSD, NetBSD, Solaris/SunOS), in any console or in a GUI, and is also friendly with...
Read more >
assignment_04 - GitHub Pages
You must run this notebook on Google Colab platform; there are some dependencies to ... create_vocab ! pip install -q tqdm flair from...
Read more >
Tqdm (Python) - Hacker News
I had to look these up (just me doing Google searches): ... I do think that "it's good that python is slow because...
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