import sys import time import inspect from numbers import Number from datetime import datetime from contextlib import contextmanager from collections import OrderedDict, defaultdict import numpy as np from odin.visual.bashplot import print_bar, print_confusion try: from tqdm import __version__ as tqdm_version tqdm_version = int(tqdm_version.split(".")[0]) if tqdm_version < 4: raise ImportError from tqdm import tqdm as _tqdm from tqdm._utils import _environ_cols_wrapper except ImportError: sys.stderr.write("[ERROR] Cannot import `tqdm` version >= 4.\n") exit() try: import colorama colorama.init() from colorama import Fore as _Fore _RED = _Fore.RED _YELLOW = _Fore.YELLOW _CYAN = _Fore.CYAN
def test_version(): """ Test version string """ from tqdm import __version__ assert 3 <= len(__version__.split('.')) <= 4
def test_version(): from tqdm import __version__ assert 3 <= len(__version__.split('.')) <= 4