diff --git a/requirements.txt b/requirements.txt index cb72b0e3..4f189ab4 100644 --- a/requirements.txt +++ b/requirements.txt @@ -19,6 +19,5 @@ PyYAML>=3.12 requests-file>=1.4.2 requests>=2.20.0 six>=1.11.0 -tqdm>=4.19.5 typing>=3.6.4 ; python_version < '3.5' urllib3>=1.21.1 diff --git a/trains/debugging/log.py b/trains/debugging/log.py index c68b696d..3fbb8d6a 100644 --- a/trains/debugging/log.py +++ b/trains/debugging/log.py @@ -8,7 +8,6 @@ from platform import system from pathlib2 import Path from six import BytesIO -from tqdm import tqdm default_level = logging.INFO @@ -181,6 +180,8 @@ class TqdmLog(object): self._log.log(self._level, self._buf) def __init__(self, total, desc='', log_level=20, ascii=False, logger=None, smoothing=0, mininterval=5, initial=0): + from tqdm import tqdm + self._io = self._TqdmIO(level=log_level, logger=logger) self._tqdm = tqdm(total=total, desc=desc, file=self._io, ascii=ascii if not system() == 'Windows' else True, smoothing=smoothing,