class_docstr: Tune base callback that can be extended and passed to a ``TrialRunner``
  
  Tune callbacks are called from within the ``TrialRunner`` class. There are
  several hooks that can be used, all of which are found in the submethod
  definitions of this base class.
  
  The parameters passed to the ``**info`` dict vary between hooks. The
  parameters passed are described in the docstrings of the methods.
  
  This example will print a metric each time a result is received:
  
  .. testcode::
  
      from ray import train, tune
      from ray.tune import Callback
  
  
      class MyCallback(Callback):
          def on_trial_result(self, iteration, trials, trial, result,
                              **info):
              print(f"Got result: {result['metric']}")
  
  
      def train_func(config):
          for i in range(10):
              tune.report(metric=i)
  
      tuner = tune.Tuner(
          train_func,
          run_config=train.RunConfig(
              callbacks=[MyCallback()]
          )
      )
      tuner.fit()
  
  .. testoutput::
      :hide:
  
      ...
class_docstr_tok: ["Tune","base","callback","that","can","be","extended","and","passed","to","a","``","TrialRunner","``","Tune","callbacks","are","called","from","within","the","``","TrialRunner","``","class",".","There","are","several","hooks","that","can","be","used",",","all","of","which","are","found","in","the","submethod","definitions","of","this","base","class",".","The","parameters","passed","to","the","``","*","*","info","``","dict","vary","between","hooks",".","The","parameters","passed","are","described","in","the","docstrings","of","the","methods",".","This","example","will","print","a","metric","each","time","a","result","is","received",":","..","testcode",":",":","from","ray","import","train",",","tune","from","ray.tune","import","Callback","class","MyCallback","(","Callback",")",":","def","on_trial_result","(","self",",","iteration",",","trials",",","trial",",","result",",","*","*","info",")",":","print","(","f","''","Got","result",":","{","result","[","'metric","'","]","}","''",")","def","train_func","(","config",")",":","for","i","in","range","(","10",")",":","tune.report","(","metric=i",")","tuner","=","tune.Tuner","(","train_func",",","run_config=train.RunConfig","(","callbacks=","[","MyCallback","(",")","]",")",")","tuner.fit","(",")","..","testoutput",":",":",":","hide",":","..."]
docstr: Called after a trial saved a checkpoint with Tune.
  
  Arguments:
      iteration: Number of iterations of the tuning loop.
      trials: List of trials.
      trial: Trial that just has errored.
      checkpoint: Checkpoint object that has been saved
          by the trial.
      **info: Kwargs dict for forward compatibility.
docstr_tok: ["Called","after","a","trial","saved","a","checkpoint","with","Tune",".","Arguments",":","iteration",":","Number","of","iterations","of","the","tuning","loop",".","trials",":","List","of","trials",".","trial",":","Trial","that","just","has","errored",".","checkpoint",":","Checkpoint","object","that","has","been","saved","by","the","trial",".","*","*","info",":","Kwargs","dict","for","forward","compatibility","."]
code: def on_checkpoint(
      self,
      iteration: int,
      trials: List["Trial"],
      trial: "Trial",
      checkpoint: "Checkpoint",
      **info,
  ):
      """Called after a trial saved a checkpoint with Tune.
  
      Arguments:
          iteration: Number of iterations of the tuning loop.
          trials: List of trials.
          trial: Trial that just has errored.
          checkpoint: Checkpoint object that has been saved
              by the trial.
          **info: Kwargs dict for forward compatibility.
      """
      pass
  
imports: from abc import ABCMeta
  import glob
  import os
  from typing import TYPE_CHECKING, Any, Dict, List, Optional, Tuple
  import warnings
  from ray.util.annotations import PublicAPI, DeveloperAPI
  from ray.tune.utils.util import _atomic_save, _load_newest_checkpoint
label_desc: Use image node_id 11 for calling the Callback obj's underlying member method code with example usage: obj.on_checkpoint(iteration, trials, trial, checkpoint) without return types