class_docstr: Abstract Callback base class.
  
  Callbacks control the training of the GluonTS trainer. To write a custom
  Callback, you can subclass Callback and overwrite one or more of the hook
  methods. Hook methods with boolean return value stop the training if False
  is returned.
docstr: Hook that is called after every epoch. As `on_train_epoch_end` and
  `on_validation_epoch_end`, it returns a boolean whether training should
  continue. This hook is always called after `on_train_epoch_end` and
  `on_validation_epoch_end`. It is called regardless of these hooks'
  return values.
  
  Parameters
  ----------
  epoch_no
      The current epoch (the first epoch has `epoch_no = 0`).
  epoch_loss
      The validation loss that was recorded in the last epoch if
      validation data was provided. The training loss otherwise.
  training_network
      The network that is being trained.
  trainer
      The trainer which is running the training.
  best_epoch_info
      Aggregate information about the best epoch. Contains keys
      `params_path`, `epoch_no` and `score`. The score is the best
      validation loss if validation data is provided or the best training
      loss otherwise.
  ctx
      The MXNet context used.
  
  Returns
  -------
  bool
      A boolean whether the training should continue. Defaults to `True`.
docstr_tok: ["Hook","that","is","called","after","every","epoch",".","As","`","on_train_epoch_end","`","and","`","on_validation_epoch_end","`",",","it","returns","a","boolean","whether","training","should","continue",".","This","hook","is","always","called","after","`","on_train_epoch_end","`","and","`","on_validation_epoch_end","`",".","It","is","called","regardless","of","these","hooks'","return","values",".","Parameters","--","--","--","--","--","epoch_no","The","current","epoch","(","the","first","epoch","has","`","epoch_no","=","0","`",")",".","epoch_loss","The","validation","loss","that","was","recorded","in","the","last","epoch","if","validation","data","was","provided",".","The","training","loss","otherwise",".","training_network","The","network","that","is","being","trained",".","trainer","The","trainer","which","is","running","the","training",".","best_epoch_info","Aggregate","information","about","the","best","epoch",".","Contains","keys","`","params_path","`",",","`","epoch_no","`","and","`","score","`",".","The","score","is","the","best","validation","loss","if","validation","data","is","provided","or","the","best","training","loss","otherwise",".","ctx","The","MXNet","context","used",".","Returns","--","--","--","-","bool","A","boolean","whether","the","training","should","continue",".","Defaults","to","`","True","`","."]
code: def on_epoch_end(
      self,
      epoch_no: int,
      epoch_loss: float,
      training_network: nn.HybridBlock,
      trainer: gluon.Trainer,
      best_epoch_info: Dict[str, Any],
      ctx: mx.Context,
  ) -> bool:
      """
      Hook that is called after every epoch. As `on_train_epoch_end` and
      `on_validation_epoch_end`, it returns a boolean whether training should
      continue. This hook is always called after `on_train_epoch_end` and
      `on_validation_epoch_end`. It is called regardless of these hooks'
      return values.
  
      Parameters
      ----------
      epoch_no
          The current epoch (the first epoch has `epoch_no = 0`).
      epoch_loss
          The validation loss that was recorded in the last epoch if
          validation data was provided. The training loss otherwise.
      training_network
          The network that is being trained.
      trainer
          The trainer which is running the training.
      best_epoch_info
          Aggregate information about the best epoch. Contains keys
          `params_path`, `epoch_no` and `score`. The score is the best
          validation loss if validation data is provided or the best training
          loss otherwise.
      ctx
          The MXNet context used.
  
      Returns
      -------
      bool
          A boolean whether the training should continue. Defaults to `True`.
      """
      return True
  
imports: from dataclasses import dataclass, field
  from typing import List, Union, Dict, Any, Optional
  import logging
  import math
  import time
  import mxnet.gluon.nn
  import mxnet
  from mxnet import gluon
  from gluonts.core.component import validated
  from gluonts.mx.util import copy_parameters
  from gluonts.pydantic import BaseModel, PrivateAttr
label_desc: Use image node_id 9 for calling the Callback obj's underlying member method code with example usage: obj.on_epoch_end(epoch_no, epoch_loss, training_network, trainer, best_epoch_info, ctx) and returns: True