class_docstr: A general callback object that handles multiple events.
  
  This class has `on_backward`, `on_batch`, `on_epoch`, and `on_end` methods, corresponding to
  each callback type. Each one receives the state of the wrapper object as `self`.
  This enables easier state sharing between related callbacks.
  
  Also, this callback type is instantiated with `serialization_dir` and `on_start` is called
  with the trainer instance as an argument. This might be handy in case of callback logging
  and saving its own files next to the config/checkpoints/logs/etc.
docstr: This callback hook is called after the final training epoch.
docstr_tok: ["This","callback","hook","is","called","after","the","final","training","epoch","."]
code: def on_end(
      self,
      trainer: "GradientDescentTrainer",
      metrics: Dict[str, Any] = None,
      epoch: int = None,
      is_primary: bool = True,
      **kwargs,
  ) -> None:
      """
      This callback hook is called after the final training epoch.
      """
      pass
  
file_path: allennlp/allennlp/training/callbacks/callback.py
imports: from typing import List, Dict, Any, Optional, TYPE_CHECKING
  import torch
  from allennlp.common import Registrable
  from allennlp.data import TensorDict
label_desc: Use image node_id 6 for calling the TrainerCallback obj's underlying member method code with example usage: obj.on_end(trainer, metrics, epoch, is_primary) without return types