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_train_begin(self, args, state, control, **kwargs):
      self.first_column = (
          "Epoch"
          if args.evaluation_strategy == IntervalStrategy.EPOCH
          else "Step"
      )
      self.training_loss = 0
      self.last_log = 0
      column_names = [self.first_column] + ["Training Loss"]
      if args.evaluation_strategy != IntervalStrategy.NO:
          column_names.append("Validation Loss")
      self.training_tracker = NotebookTrainingTracker(
          state.max_steps, column_names
      )
  
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 2 for calling the NotebookProgressCallback obj's underlying member method code with example usage: obj.on_train_begin(args, state, control) without return types