From 4ffb27d3587cf57fa10be09e6b45137f14745f7b Mon Sep 17 00:00:00 2001 From: Yan Wong Date: Thu, 22 Feb 2024 19:28:43 +0000 Subject: [PATCH] Make tqdm work nicely in notebooks --- tsinfer/progress.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tsinfer/progress.py b/tsinfer/progress.py index b5f52b6c..cdc2f85b 100644 --- a/tsinfer/progress.py +++ b/tsinfer/progress.py @@ -19,7 +19,7 @@ """ A progress monitor class for tsinfer """ -import tqdm +from tqdm.auto import tqdm class ProgressMonitor: @@ -83,7 +83,7 @@ def get(self, key, total): "{desc}{percentage:3.0f}%|{bar}" "| {n_fmt}/{total_fmt} [{elapsed}, {rate_fmt}{postfix}]" ) - self.current_instance = tqdm.tqdm( + self.current_instance = tqdm( desc=desc, total=total, disable=not self.enabled,