class_docstr: Snapshotter snapshots training data.
  
  When training, it saves data to binary files. When resuming,
  it loads from saved data.
  
  Args:
      snapshot_dir (str): Path to save the log and iteration snapshot.
      snapshot_mode (str): Mode to save the snapshot. Can be either "all"
          (all iterations will be saved), "last" (only the last iteration
          will be saved), "gap" (every snapshot_gap iterations are saved),
          "gap_and_last" (save the last iteration as 'params.pkl' and save
          every snapshot_gap iteration separately), "gap_overwrite" (same as
          gap but overwrites the last saved snapshot), or "none" (do not
          save snapshots).
      snapshot_gap (int): Gap between snapshot iterations. Wait this number
          of iterations before taking another snapshot.
class_docstr_tok: ["Snapshotter","snapshots","training","data",".","When","training",",","it","saves","data","to","binary","files",".","When","resuming",",","it","loads","from","saved","data",".","Args",":","snapshot_dir","(","str",")",":","Path","to","save","the","log","and","iteration","snapshot",".","snapshot_mode","(","str",")",":","Mode","to","save","the","snapshot",".","Can","be","either","``","all","''","(","all","iterations","will","be","saved",")",",","``","last","''","(","only","the","last","iteration","will","be","saved",")",",","``","gap","''","(","every","snapshot_gap","iterations","are","saved",")",",","``","gap_and_last","''","(","save","the","last","iteration","as","'params.pkl","'","and","save","every","snapshot_gap","iteration","separately",")",",","``","gap_overwrite","''","(","same","as","gap","but","overwrites","the","last","saved","snapshot",")",",","or","``","none","''","(","do","not","save","snapshots",")",".","snapshot_gap","(","int",")",":","Gap","between","snapshot","iterations",".","Wait","this","number","of","iterations","before","taking","another","snapshot","."]
docstr: Return the type of snapshot.
  
  Returns:
      str: The type of snapshot. Can be "all", "last", "gap",
          "gap_overwrite", "gap_and_last", or "none".
docstr_tok: ["Return","the","type","of","snapshot",".","Returns",":","str",":","The","type","of","snapshot",".","Can","be","``","all","''",",","``","last","''",",","``","gap","''",",","``","gap_overwrite","''",",","``","gap_and_last","''",",","or","``","none","''","."]
code: def snapshot_mode(self):
      """Return the type of snapshot.
  
      Returns:
          str: The type of snapshot. Can be "all", "last", "gap",
              "gap_overwrite", "gap_and_last", or "none".
  
      """
      return self._snapshot_mode
  
file_path: garage/src/garage/experiment/snapshotter.py
imports: import collections
  import errno
  import os
  import pathlib
  import cloudpickle
label_desc: Use image node_id 3 for calling the Snapshotter obj's underlying member method code with example usage: obj.snapshot_mode() and returns: self