Skip to content

Commit 53d5266

Browse files
hyanwongbenjeffery
authored andcommitted
Make tqdm work nicely in notebooks
1 parent 7ed9df4 commit 53d5266

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tsinfer/progress.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
"""
2020
A progress monitor class for tsinfer
2121
"""
22-
import tqdm
22+
from tqdm.auto import tqdm
2323

2424

2525
class ProgressMonitor:
@@ -79,7 +79,7 @@ def get(self, key, total):
7979
"{desc}{percentage:3.0f}%|{bar}"
8080
"| {n_fmt}/{total_fmt} [{elapsed}, {rate_fmt}{postfix}]"
8181
)
82-
self.current_instance = tqdm.tqdm(
82+
self.current_instance = tqdm(
8383
desc=desc,
8484
total=total,
8585
disable=not self.enabled,

0 commit comments

Comments
 (0)