Skip to content

tqdm

allennlp.common.tqdm

[SOURCE]


allennlp.common.tqdm.Tqdm wraps tqdm so we can add configurable global defaults for certain tqdm parameters.

logger.propagate#

logger.propagate = False

replace_cr_with_newline#

def replace_cr_with_newline(message: str) -> str

TQDM and requests use carriage returns to get the training line to update for each batch without adding more lines to the terminal output. Displaying those in a file won't work correctly, so we'll just make sure that each batch shows up on its one line.

TqdmToLogsWriter#

class TqdmToLogsWriter(object):
 | def __init__(self)

write#

class TqdmToLogsWriter(object):
 | ...
 | def write(self, message)

flush#

class TqdmToLogsWriter(object):
 | ...
 | def flush(self)

Tqdm#

class Tqdm

tqdm#

class Tqdm:
 | ...
 | @staticmethod
 | def tqdm(*args, **kwargs)

Use a slower interval when FILE_FRIENDLY_LOGGING is set.