def disable_tqdm(): from tqdm import tqdm from functools import partialmethod tqdm.__init__ = partialmethod(tqdm.__init__, disable=True)