Example #1
0
    def __init__(self, iterator, save_dir=None):
        from tqdm import tqdm

        super(TQDMWrapper, self).__init__(save_dir)
        self.tqdm = tqdm(iterator, ncols=80)
        self._size = len(iterator)
        _set_tqdm_handler()
Example #2
0
    def __init__(self, ncols: int = 80) -> None:
        self.writer = None
        self._ncols = ncols
        self._temporal_memory = {}

        liblog._set_tqdm_handler()
        liblog._set_tqdm_stdout_stderr()
Example #3
0
    def __init__(self, iterator: Iterable, verb: bool = False):

        super(TQDMReporter, self).__init__()
        self.writer = tqdm.tqdm(iterator,
                                ncols=80) if is_master() else iterator
        self._verb = verb
        self._logger = liblog.get_logger(__name__)
        self._length = len(iterator)
        liblog._set_tqdm_handler()
Example #4
0
    def __init__(self, iterator: Iterable, verb: bool = False):

        super(TQDMReporter, self).__init__()
        self.writer = tqdm.tqdm(
            iterator, dynamic_ncols=True) if is_master() else iterator
        self._verb = verb
        self._logger = liblog.get_logger(__name__)
        self._length = len(iterator)
        self._max_accuracy = -1.0
        liblog._set_tqdm_handler()
        liblog._set_tqdm_print()