class_docstr: TQDM Progress Bar for Tensorflow Keras.
  
  Args:
      metrics_separator: Custom separator between metrics.
          Defaults to ' - '.
      overall_bar_format: Custom bar format for overall
          (outer) progress bar, see https://github.com/tqdm/tqdm#parameters
          for more detail.
      epoch_bar_format: Custom bar format for epoch
          (inner) progress bar, see https://github.com/tqdm/tqdm#parameters
          for more detail.
      update_per_second: Maximum number of updates in the epochs bar
          per second, this is to prevent small batches from slowing down
          training. Defaults to 10.
      metrics_format: Custom format for how metrics are formatted.
          See https://github.com/tqdm/tqdm#parameters for more detail.
      leave_epoch_progress: `True` to leave epoch progress bars.
      leave_overall_progress: `True` to leave overall progress bar.
      show_epoch_progress: `False` to hide epoch progress bars.
      show_overall_progress: `False` to hide overall progress bar.
class_docstr_tok: ["TQDM","Progress","Bar","for","Tensorflow","Keras",".","Args",":","metrics_separator",":","Custom","separator","between","metrics",".","Defaults","to","'","-","'",".","overall_bar_format",":","Custom","bar","format","for","overall","(","outer",")","progress","bar",",","see","https",":","\/\/github.com\/tqdm\/tqdm","#","parameters","for","more","detail",".","epoch_bar_format",":","Custom","bar","format","for","epoch","(","inner",")","progress","bar",",","see","https",":","\/\/github.com\/tqdm\/tqdm","#","parameters","for","more","detail",".","update_per_second",":","Maximum","number","of","updates","in","the","epochs","bar","per","second",",","this","is","to","prevent","small","batches","from","slowing","down","training",".","Defaults","to","10.","metrics_format",":","Custom","format","for","how","metrics","are","formatted",".","See","https",":","\/\/github.com\/tqdm\/tqdm","#","parameters","for","more","detail",".","leave_epoch_progress",":","`","True","`","to","leave","epoch","progress","bars",".","leave_overall_progress",":","`","True","`","to","leave","overall","progress","bar",".","show_epoch_progress",":","`","False","`","to","hide","epoch","progress","bars",".","show_overall_progress",":","`","False","`","to","hide","overall","progress","bar","."]
docstr: Format metrics in logs into a string.
  
  Args:
      logs: dictionary of metrics and their values. Defaults to
          empty dictionary.
      factor (int): The factor we want to divide the metrics in logs
          by, useful when we are computing the logs after each batch.
          Defaults to 1.
  
  Returns:
      metrics_string: a string displaying metrics using the given
      formators passed in through the constructor.
docstr_tok: ["Format","metrics","in","logs","into","a","string",".","Args",":","logs",":","dictionary","of","metrics","and","their","values",".","Defaults","to","empty","dictionary",".","factor","(","int",")",":","The","factor","we","want","to","divide","the","metrics","in","logs","by",",","useful","when","we","are","computing","the","logs","after","each","batch",".","Defaults","to","1",".","Returns",":","metrics_string",":","a","string","displaying","metrics","using","the","given","formators","passed","in","through","the","constructor","."]
code: def format_metrics(self, logs={}, factor=1):
      """Format metrics in logs into a string.
  
      Args:
          logs: dictionary of metrics and their values. Defaults to
              empty dictionary.
          factor (int): The factor we want to divide the metrics in logs
              by, useful when we are computing the logs after each batch.
              Defaults to 1.
  
      Returns:
          metrics_string: a string displaying metrics using the given
          formators passed in through the constructor.
      """
  
      metric_value_pairs = []
      for key, value in logs.items():
          if key in ["batch", "size"]:
              continue
          pair = self.metrics_format.format(
              name=key, value=value / factor
          )
          metric_value_pairs.append(pair)
      metrics_string = self.metrics_separator.join(metric_value_pairs)
      return metrics_string
  
imports: import time
  import tensorflow
  from collections import defaultdict
  from typeguard import typechecked
  from tensorflow.keras.callbacks import Callback
label_desc: Use image node_id 13 for calling the TQDMProgressBar obj's underlying member method code with example usage: obj.format_metrics(logs, factor) and returns: metrics_string