gemseo / third_party

tqdm module

A progress bar implementation

class gemseo.third_party.tqdm.StatusPrinter[source]

Bases: object

Prints the status, recors the last printed status This class is multiprocessing-safe : the counters values are shared among all processes

print_status(status)[source]

Prints the status

Parameters

status – the status

class gemseo.third_party.tqdm.Tqdm(max_iter, desc='', mininterval=0.5, miniters=1)[source]

Bases: object

TQDM iterator progress bar

Prints a progress meter and updates it every time the next() ethod is called. ‘desc’ can contain a short string, describing the progress, that is added in the beginning of the line. If less than mininterval seconds or miniters iterations have passed since the last progress meter update, it is not updated again.

close(obj_val=None)[source]

Closes the progress bar

next(obj_val=None)[source]

Iterates the progress bar

Parameters

obj_val – objective value (Default value = None)

gemseo.third_party.tqdm.format_interval(time_inter)[source]

Formats a time interval

Parameters

time_inter – the time interval to format

gemseo.third_party.tqdm.format_meter(n_iter, max_iter, elapsed, obj_val=None)[source]

Format a message

Parameters
  • n_iter – number of finished iterations

  • obj_val – objective value (Default value = None)

  • max_iter – total number of iterations, or None

  • elapsed – number of seconds passed since start

gemseo.third_party.tqdm.get_printable_rate(n_iter, elapsed)[source]