decent_bench.utils.progress_bar#

class decent_bench.utils.progress_bar.ProgressBarController(manager: SyncManager, algorithms: list[DstAlgorithm], n_trials: int)[source]#

Bases: object

Controller of progress bars showing how far each algorithm has progressed and the estimated time remaining.

Parameters:
  • manager – used to create a progress increment queue that can be shared across processes

  • algorithms – algorithms that will be run, each gets its own bar

  • n_trials – number of trials the algorithms will run

start_progress_bar(algorithm: DstAlgorithm) None[source]#

Start the clock of algorithm’s progress bar without incrementing it.

Internally, this is done through sending an increment of 0 to the progress listener. The progress listener recognizes that the algorithm’s execution just started and resets its clock, which started when the progress bar was first rendered.

advance_progress_bar(algorithm: DstAlgorithm) None[source]#

Advance algorithm’s progress bar by one trial.