class_docstr: Convenience class for periodically checkpointing.
  
  This can be used to checkpoint any object with trackable state (e.g.
  tensorflow variables or modules); see tf.train.Checkpoint for
  details. Objects inheriting from tf.train.experimental.PythonState can also
  be checkpointed.
  
  Typically people use Checkpointer to make sure that they can correctly recover
  from a machine going down during learning. For more permanent storage of self-
  contained "networks" see the Snapshotter object.
  
  Usage example:
  
  ```python
  model = snt.Linear(10)
  checkpointer = Checkpointer(objects_to_save={'model': model})
  
  for _ in range(100):
    # ...
    checkpointer.save()
  ```
class_docstr_tok: ["Convenience","class","for","periodically","checkpointing",".","This","can","be","used","to","checkpoint","any","object","with","trackable","state","(","e.g",".","tensorflow","variables","or","modules",")",";","see","tf.train.Checkpoint","for","details",".","Objects","inheriting","from","tf.train.experimental.PythonState","can","also","be","checkpointed",".","Typically","people","use","Checkpointer","to","make","sure","that","they","can","correctly","recover","from","a","machine","going","down","during","learning",".","For","more","permanent","storage","of","self-","contained","``","networks","''","see","the","Snapshotter","object",".","Usage","example",":","``","`","python","model","=","snt.Linear","(","10",")","checkpointer","=","Checkpointer","(","objects_to_save=","{","'model","'",":","model","}",")","for","_","in","range","(","100",")",":","#","...","checkpointer.save","(",")","``","`"]
docstr: Save the checkpoint if it's the appropriate time, otherwise no-ops.
  
  Args:
    force: Whether to force a save regardless of time elapsed since last save.
  
  Returns:
    A boolean indicating if a save event happened.
docstr_tok: ["Save","the","checkpoint","if","it","'s","the","appropriate","time",",","otherwise","no-ops",".","Args",":","force",":","Whether","to","force","a","save","regardless","of","time","elapsed","since","last","save",".","Returns",":","A","boolean","indicating","if","a","save","event","happened","."]
code: def save(self, force: bool = False) -> bool:
      """Save the checkpoint if it's the appropriate time, otherwise no-ops.
  
      Args:
        force: Whether to force a save regardless of time elapsed since last save.
  
      Returns:
        A boolean indicating if a save event happened.
      """
      if not self._enable_checkpointing:
          return False
  
      if (
          not force
          and time.time() - self._last_saved
          < 60 * self._time_delta_minutes
      ):
          return False
  
      checkpoint_manager: tf.train.CheckpointManager = (
          self.checkpoint_manager
      )
      # Save any checkpoints.
      logging.info(
          "Saving checkpoint: %s", checkpoint_manager.directory
      )
      checkpoint_manager.save()
      self._last_saved = time.time()
  
      return True
  
imports: import abc
  import datetime
  import os
  import pickle
  import time
  from typing import Mapping, Optional, Union
  from absl import logging
  from acme import core
  from acme.utils import signals
  from acme.utils import paths
  import sonnet
  import tensorflow
  import tree
  from tensorflow.python.saved_model import revived_types
label_desc: Use image node_id 2 for calling the Checkpointer obj's underlying member method code with example usage: obj.save(force) and returns: True, False, False