class_docstr: Save the model once triggered.
class_docstr_tok: ["Save","the","model","once","triggered","."]
code: def _trigger(self):
      try:
          self.saver.save(
              tf.get_default_session(),
              self.path,
              global_step=tf.train.get_global_step(),
              write_meta_graph=False,
          )
          logger.info(
              "Model saved to %s."
              % tf.train.get_checkpoint_state(
                  self.checkpoint_dir
              ).model_checkpoint_path
          )
      except (
          IOError,
          tf.errors.PermissionDeniedError,
          tf.errors.ResourceExhaustedError,
          tf.errors.AlreadyExistsError,
      ):  # disk error sometimes.. just ignore it
          logger.exception("Exception in ModelSaver!")
  
file_path: tensorpack/tensorpack/callbacks/saver.py
imports: import os
  from datetime import datetime
  from ..compat import tfv1
  from ..utils import fs, logger
  from .base import Callback
label_desc: Use image node_id 4 for calling the ModelSaver obj's underlying member method code with example usage: obj._trigger() without return types