code: def NotebookProgressCallback_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"]}
          for metric in DPOTrainer_metrics:
              if metric in logs:
                  values[metric.replace("/", " / ")] = logs[metric]
              else:
                  # Maybe not a DPO Trainer anymore? Redo the tracker
                  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
                      )
                  break
              pass
          pass
          # First column is necessarily Step since we're not in epoch eval strategy
          values["Step"] = state.global_step
          self.training_tracker.write_line(values)
      pass
  
imports: from transformers.utils.notebook import IntervalStrategy, NotebookTrainingTracker, NotebookProgressCallback
label_desc: Use image node_id 2 for calling a global function with example usage: NotebookProgressCallback_on_log(args, state, control, logs) without return types