ed.Progbar

Class Progbar

Aliases:

  • Class ed.Progbar
  • Class ed.util.Progbar

Defined in edward/util/progbar.py.

Methods

init

__init__(
    target,
    width=30,
    interval=0.01,
    verbose=1
)

(Yet another) progress bar.

Args:

  • target: int. Total number of steps expected.
  • width: int. Width of progress bar.
  • interval: float. Minimum time (in seconds) for progress bar to be displayed during updates.
  • verbose: int. Level of verbosity. 0 suppresses output; 1 is default.

update

update(
    current,
    values=None,
    force=False
)

Update progress bar, and print to standard output if force is True, or the last update was completed longer than interval amount of time ago, or current >= target.

The written output is the progress bar and all unique values.

Args:

  • current: int. Index of current step.
  • values: dict of str to float. Dict of name by value-for-last-step. The progress bar will display averages for these values.
  • force: bool. Whether to force visual progress update.