Shortcuts

mmengine.utils.track_iter_progress

mmengine.utils.track_iter_progress(tasks, bar_width=50, file=<_io.TextIOWrapper name='<stdout>' mode='w' encoding='utf-8'>)[source]

Track the progress of tasks iteration or enumeration with a progress bar.

Tasks are yielded with a simple for-loop.

Parameters:
  • tasks (Sequence) – If tasks is a tuple, it must contain two elements, the first being the tasks to be completed and the other being the number of tasks. If it is not a tuple, it represents the tasks to be completed.

  • bar_width (int) – Width of progress bar.

Yields:

list – The task results.