class_docstr: Hook to checkpoint a model's task.
  
  Saves the checkpoints in checkpoint_folder.
code: def on_start(self, task) -> None:
      if not is_primary() or getattr(task, "test_only", False):
          return
      if not PathManager.exists(self.checkpoint_folder):
          err_msg = "Checkpoint folder '{}' does not exist.".format(
              self.checkpoint_folder
          )
          raise FileNotFoundError(err_msg)
  
file_path: ClassyVision/classy_vision/hooks/checkpoint_hook.py
imports: import logging
  from typing import Any, Collection, Dict, Optional
  from classy_vision.generic.distributed_util import is_primary
  from classy_vision.generic.util import get_checkpoint_dict, save_checkpoint
  from classy_vision.hooks import register_hook
  from classy_vision.hooks.classy_hook import ClassyHook
  from fvcore.common.file_io import PathManager
label_desc: Use image node_id 4 for calling the CheckpointHook obj's underlying member method code with example usage: obj.on_start(task) without return types