From 244c4c981e2b44b8decd6f257fdb9de7a26b949c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lubo=C5=A1=20M=C3=A1tl?= Date: Fri, 19 Nov 2021 09:09:27 +0100 Subject: [PATCH] Turned off tqdm thread monitor --- chamber/utils/tqdm.py | 25 ++++++++++++++----------- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/chamber/utils/tqdm.py b/chamber/utils/tqdm.py index 79732d6..47f64cd 100644 --- a/chamber/utils/tqdm.py +++ b/chamber/utils/tqdm.py @@ -21,14 +21,17 @@ def write(self, msg): self._out.write(msg, ending='') -def tqdm(*args, **kwargs): - file = kwargs.pop('file', None) - if file and isinstance(file, OutputWrapper): - file = CommandOutputTMDQWrapper(file) - - return original_tqdm( - *args, - file=file, - ncols=100, - **kwargs - ) +class tqdm(original_tqdm): + + monitor_interval = 0 + + def __init__(self, *args, **kwargs): + file = kwargs.pop('file', None) + if file and isinstance(file, OutputWrapper): + file = CommandOutputTMDQWrapper(file) + super().__init__( + *args, + file=file, + ncols=100, + **kwargs, + )