class_docstr: Save model at the beginning of training and after every epoch.
  
  Similar to tf.keras.callbacks.ModelCheckpoint, but this allows us to specify
  a custom save fn to call, such as the HuggingFace model.save() which writes
  .h5 files and config information.
class_docstr_tok: ["Save","model","at","the","beginning","of","training","and","after","every","epoch",".","Similar","to","tf.keras.callbacks.ModelCheckpoint",",","but","this","allows","us","to","specify","a","custom","save","fn","to","call",",","such","as","the","HuggingFace","model.save","(",")","which","writes",".h5","files","and","config","information","."]
code: def __init__(self, save_path_base: str, save_fn=None):
      super().__init__()
      self.save_path_base = save_path_base
      self.save_fn = save_fn or self.model.save
  
file_path: lit/lit_nlp/examples/tools/glue_trainer.py
imports: from collections.abc import Sequence
  import os
  from absl import app
  from absl import flags
  from absl import logging
  from lit_nlp.examples.datasets import classification
  from lit_nlp.examples.datasets import glue
  from lit_nlp.examples.models import glue_models
  from lit_nlp.lib import serialize
  import tensorflow
label_desc: Use image node_id 1 to create a new EpochSaverCallback object from inherited base classes: tf.keras.callbacks with example: obj = EpochSaverCallback(save_path_base, save_fn)