class_docstr: Default progression callback used in :class:`~poutyne.Model`. You can use the ``progress_options``
  in :class:`~poutyne.Model` instead of instantiating this callback. If you choose to use this callback
  anyway, make sure to pass ``verbose=False`` to :func:`~poutyne.Model.fit()` or
  :func:`~poutyne.Model.fit_generator()`.
  
  Args:
      coloring (Union[bool, Dict], optional): If bool, whether to display the progress of the training with
          default colors highlighting.
          If Dict, the field and the color to use as `colorama <https://pypi.org/project/colorama/>`_ . The fields
          are ``text_color``, ``ratio_color``, ``metric_value_color``, ``time_color`` and ``progress_bar_color``.
          In both case, will be ignore if verbose is set to False.
          (Default value = True)
      progress_bar (bool): Whether or not to display a progress bar showing the epoch progress.
          Note that if the size of the output text with the progress bar is larger than the shell output size,
          the formatting could be impacted (a line for every step).
          (Default value = True)
      equal_weights (bool): Whether or not the duration of each step is weighted equally when computing the
          average time of the steps and, thus, the ETA. By default, newer step times receive more weights than
          older step times. Set this to true to have equal weighting instead.
      show_on_valid (bool): Whether or not to display the progression during the validation phase.
          (Default value = True)
      show_every_n_train_steps (Union[str, int]): Show a subset of the training steps. If ``'all'``, show all steps.
          If ``'none'``, do not show the steps (i.e. only show the stats at the end of the epoch). If an integer
          ``n``, only show every n-th steps. (Default value = 'all').
      show_every_n_valid_steps (Union[str, int]): Show a subset of the validation steps. If ``'all'``, show all steps.
          If ``'none'``, do not show the steps (i.e. only show the stats at the end of the epoch). If an integer
          ``n``, only show every n-th steps. (Default value = 'all').
      show_every_n_test_steps (Union[str, int]): Show a subset of the testing steps. If ``'all'``, show all steps.
          If ``'none'``, do not show the steps (i.e. only show the stats at the end of the testing). If an integer
          ``n``, show only every n-th steps. (Default value = 'all').
class_docstr_tok: ["Default","progression","callback","used","in",":","class",":","`","~poutyne.Model","`",".","You","can","use","the","``","progress_options","``","in",":","class",":","`","~poutyne.Model","`","instead","of","instantiating","this","callback",".","If","you","choose","to","use","this","callback","anyway",",","make","sure","to","pass","``","verbose=False","``","to",":","func",":","`","~poutyne.Model.fit","(",")","`","or",":","func",":","`","~poutyne.Model.fit_generator","(",")","`",".","Args",":","coloring","(","Union","[","bool",",","Dict","]",",","optional",")",":","If","bool",",","whether","to","display","the","progress","of","the","training","with","default","colors","highlighting",".","If","Dict",",","the","field","and","the","color","to","use","as","`","colorama","<","https",":","\/\/pypi.org\/project\/colorama\/",">","`","_",".","The","fields","are","``","text_color","``",",","``","ratio_color","``",",","``","metric_value_color","``",",","``","time_color","``","and","``","progress_bar_color","``",".","In","both","case",",","will","be","ignore","if","verbose","is","set","to","False",".","(","Default","value","=","True",")","progress_bar","(","bool",")",":","Whether","or","not","to","display","a","progress","bar","showing","the","epoch","progress",".","Note","that","if","the","size","of","the","output","text","with","the","progress","bar","is","larger","than","the","shell","output","size",",","the","formatting","could","be","impacted","(","a","line","for","every","step",")",".","(","Default","value","=","True",")","equal_weights","(","bool",")",":","Whether","or","not","the","duration","of","each","step","is","weighted","equally","when","computing","the","average","time","of","the","steps","and",",","thus",",","the","ETA",".","By","default",",","newer","step","times","receive","more","weights","than","older","step","times",".","Set","this","to","true","to","have","equal","weighting","instead",".","show_on_valid","(","bool",")",":","Whether","or","not","to","display","the","progression","during","the","validation","phase",".","(","Default","value","=","True",")","show_every_n_train_steps","(","Union","[","str",",","int","]",")",":","Show","a","subset","of","the","training","steps",".","If","``","'all","'","``",",","show","all","steps",".","If","``","'none","'","``",",","do","not","show","the","steps","(","i.e",".","only","show","the","stats","at","the","end","of","the","epoch",")",".","If","an","integer","``","n","``",",","only","show","every","n-th","steps",".","(","Default","value","=","'all","'",")",".","show_every_n_valid_steps","(","Union","[","str",",","int","]",")",":","Show","a","subset","of","the","validation","steps",".","If","``","'all","'","``",",","show","all","steps",".","If","``","'none","'","``",",","do","not","show","the","steps","(","i.e",".","only","show","the","stats","at","the","end","of","the","epoch",")",".","If","an","integer","``","n","``",",","only","show","every","n-th","steps",".","(","Default","value","=","'all","'",")",".","show_every_n_test_steps","(","Union","[","str",",","int","]",")",":","Show","a","subset","of","the","testing","steps",".","If","``","'all","'","``",",","show","all","steps",".","If","``","'none","'","``",",","do","not","show","the","steps","(","i.e",".","only","show","the","stats","at","the","end","of","the","testing",")",".","If","an","integer","``","n","``",",","show","only","every","n-th","steps",".","(","Default","value","=","'all","'",")","."]
code: def _get_metrics_string(self, logs: Dict) -> str:
      train_metrics_str_gen = (
          f"{k}: {logs[k]:f}"
          for k in self.metrics
          if logs.get(k) is not None
      )
      val_metrics_str_gen = (
          f"{'val_' + k}: {logs['val_' + k]:f}"
          for k in self.metrics
          if logs.get("val_" + k) is not None
      )
      test_metrics_str_gen = (
          f"{'test_' + k}: {logs['test_' + k]:f}"
          for k in self.metrics
          if logs.get("test_" + k) is not None
      )
      return ", ".join(
          itertools.chain(
              train_metrics_str_gen,
              val_metrics_str_gen,
              test_metrics_str_gen,
          )
      )
  
imports: import itertools
  from typing import Callable, Dict
  from poutyne.framework.callbacks.callbacks import Callback
  from poutyne.framework.callbacks.color_formatting import ColorProgress
label_desc: Use image node_id 17 for calling the ProgressionCallback obj's underlying member method code with example usage: obj._get_metrics_string(logs) and returns: str