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
Fix: tqdm.auto requires ipywidgets for notebook support. #614
Conversation
Codecov Report
@@ Coverage Diff @@
## master #614 +/- ##
=======================================
Coverage 79.00% 79.00%
=======================================
Files 33 33
Lines 3225 3230 +5
Branches 688 688
=======================================
+ Hits 2548 2552 +4
- Misses 534 535 +1
Partials 143 143
Continue to review full report at Codecov.
|
Since tqdm/tqdm#1218 and tqdm/tqdm#1148 are merged, shouldn't this PR just be a tqdm version bump? Or have they not made a release since fixing those bugs? |
@tommy-waltmann That fix was made to tqdm after I created this PR. It doesn't look like tqdm 4.63.0 is out yet, which would include the fix. However, I'm also not sure if the "fix" acts like we want it to. I would like to fall back silently to text-based progress bars if ipywidgets is not available. It seems like the changes made in tqdm will throw a warning that ipywidgets is not available. For now, I know this PR acts like I want (no warnings, just silent fallback from HTML to text progress bars). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fair enough, if you want different behavior than the tqdm
default then you are going to have to wrap it somehow.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! The code makes sense and I checked with the tqdm docs.
I didn't test it locally.
Description
This is a workaround for half of the issue reported in #602:
This PR does not change the default behavior of showing/not showing progress bars. See #602 for more details on that issue.
This workaround requires tqdm/tqdm#1148, so the minimum tqdm version has been bumped to 4.60.0.
Motivation and Context
Workaround for tqdm/tqdm#1218
Types of Changes
Checklist:
If necessary: