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
Use standard tqdm if import ipywidgets fails in notebook #1218
Conversation
Co-authored-by: Bradley Dice <bdice@bradleydice.com>
Sourcery Code Quality Report❌ Merging this PR will decrease code quality in the affected files by 0.32%.
Here are some functions in these files that still need a tune-up:
Legend and ExplanationThe emojis denote the absolute quality of the code:
The 👍 and 👎 indicate whether the quality has improved or gotten worse with this pull request. Please see our documentation here for details on how these metrics are calculated. We are actively working on this report - lots more documentation and extra metrics to come! Help us improve this quality report! |
@casperdcl Hi! Do you know why this PR's CI appears stuck? (edit: It looks like a maintainer needs to approve it to run.) I'm interested in seeing a solution to issue #1082 and this PR seems like a viable route towards resolving it. |
Sorry for the massive delay in reviewing. Addressed in v4.63.0 :) |
@casperdcl Thank you very much! 👍 tqdm is a lovely package. It brings me joy every time I wrap an iterable in |
Using
tqdm
imported fromtqdm.auto
in jupyter notebook will fail ifipywidgets
is not available.The current behaviour means that a user with a minimum install of jupyter notebook will not be able to use packages that "naively" utilize
tqdm.auto
but do not rely onipywidgets
.This PR lets
tqdm.auto
revert to using the standard tqdm progress bar if the HTML one is unavailable.Fixes #1082, #1072.
Test by creating an environment without ipywidgets (ie.
conda create -n test notebook
and calling the code below:I ran into this issue coming from using the Dask tqdm Callback: #1217.