class_docstr: Trains an instance of the Model class.
docstr: Dumps model into the backup_dir.
  
  Args:
    step: If provided, creates a checkpoint with the given step
      number, instead of overwriting the existing checkpoints.
docstr_tok: ["Dumps","model","into","the","backup_dir",".","Args",":","step",":","If","provided",",","creates","a","checkpoint","with","the","given","step","number",",","instead","of","overwriting","the","existing","checkpoints","."]
code: def save_model(
      self, checkpoint_dir: str, step: Optional[str] = None
  ) -> str:
      """Dumps model into the backup_dir.
  
      Args:
        step: If provided, creates a checkpoint with the given step
          number, instead of overwriting the existing checkpoints.
      """
      checkpoint_path = (
          os.path.join(checkpoint_dir, "epoch") + "-" + str(step)
      )
      logger.info(
          "Saving model checkpoint to {}".format(checkpoint_path)
      )
      self.trainer.save_model(
          os.path.join(checkpoint_path, "checkpoint")
      )
  
      return checkpoint_path
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  import time
  import six
  import os
  from typing import Dict, List, Optional, Union, Tuple
  from auto_augment.autoaug.utils import log
  import logging
  import auto_augment
label_desc: Use image node_id 5 for calling the HubFitterClassifer obj's underlying member method code with example usage: obj.save_model(checkpoint_dir, step) and returns: checkpoint_path