class_docstr: Displays a progress bar to show progress in processing batches.
docstr: Create and display a progress bar with 0 progress.
code: def on_phase_start(self, task) -> None:
      """Create and display a progress bar with 0 progress."""
      if not progressbar_available:
          raise RuntimeError(
              "progressbar module not installed, cannot use ProgressBarHook"
          )
  
      if is_primary():
          self.bar_size = task.num_batches_per_phase
          self.batches = 0
          self.progress_bar = progressbar.ProgressBar(self.bar_size)
          self.progress_bar.start()
  
file_path: ClassyVision/classy_vision/hooks/progress_bar_hook.py
imports: from typing import Any, Dict, Optional
  from classy_vision.generic.distributed_util import is_primary
  from classy_vision.hooks import register_hook
  from classy_vision.hooks.classy_hook import ClassyHook
label_desc: Use image node_id 2 for calling the ProgressBarHook obj's underlying member method code with example usage: obj.on_phase_start(task) without return types