class_docstr: A [`TrainerCallback`] that displays the progress of training or evaluation, optimized for Jupyter Notebooks or
  Google colab.
class_docstr_tok: ["A","[","`","TrainerCallback","`","]","that","displays","the","progress","of","training","or","evaluation",",","optimized","for","Jupyter","Notebooks","or","Google","colab","."]
code: def on_log(self, args, state, control, logs=None, **kwargs):
      # Only for when there is no evaluation
      if (
          args.evaluation_strategy == IntervalStrategy.NO
          and "loss" in logs
      ):
          values = {"Training Loss": logs["loss"]}
          # First column is necessarily Step sine we're not in epoch eval strategy
          values["Step"] = state.global_step
          self.training_tracker.write_line(values)
  
imports: import re
  import time
  from typing import Optional
  import IPython.display
  from ..trainer_callback import TrainerCallback
  from ..trainer_utils import IntervalStrategy, has_length
label_desc: Use image node_id 6 for calling the NotebookProgressCallback obj's underlying member method code with example usage: obj.on_log(args, state, control, logs) without return types