class_docstr: A Callback is an optional extension that can be used to supplement your loop with additional functionality. Good candidates
  for such logic are ones that can be re-used across units. Callbacks are generally not intended for modeling code; this should go
  in your `Unit <https://www.internalfb.com/intern/staticdocs/torchtnt/framework/unit.html>`_. To write your own callback,
  subclass the Callback class and add your own code into the hooks.
  
  Below is an example of a basic callback which prints a message at various points during execution.
  
  .. code-block:: python
  
    from torchtnt.framework.callback import Callback
    from torchtnt.framework.state import State
    from torchtnt.framework.unit import TEvalUnit, TPredictUnit, TTrainUnit
  
    class PrintingCallback(Callback):
        def on_train_start(self, state: State, unit: TTrainUnit) -> None:
            print("Starting training")
  
        def on_train_end(self, state: State, unit: TTrainUnit) -> None:
            print("Ending training")
  
        def on_eval_start(self, state: State, unit: TEvalUnit) -> None:
            print("Starting evaluation")
  
        def on_eval_end(self, state: State, unit: TEvalUnit) -> None:
            print("Ending evaluation")
  
        def on_predict_start(self, state: State, unit: TPredictUnit) -> None:
            print("Starting prediction")
  
        def on_predict_end(self, state: State, unit: TPredictUnit) -> None:
            print("Ending prediction")
  
  To use a callback, instantiate the class and pass it in the ``callbacks`` parameter to the :py:func:`~torchtnt.framework.train`, :py:func:`~torchtnt.framework.evaluate`,
  :py:func:`~torchtnt.framework.predict`, or :py:func:`~torchtnt.framework.fit` entry point.
  
  .. code-block:: python
  
    printing_callback = PrintingCallback()
    train(train_unit, train_dataloader, callbacks=[printing_callback])
class_docstr_tok: ["A","Callback","is","an","optional","extension","that","can","be","used","to","supplement","your","loop","with","additional","functionality",".","Good","candidates","for","such","logic","are","ones","that","can","be","re-used","across","units",".","Callbacks","are","generally","not","intended","for","modeling","code",";","this","should","go","in","your","`","Unit","<","https",":","\/\/www.internalfb.com\/intern\/staticdocs\/torchtnt\/framework\/unit.html",">","`","_",".","To","write","your","own","callback",",","subclass","the","Callback","class","and","add","your","own","code","into","the","hooks",".","Below","is","an","example","of","a","basic","callback","which","prints","a","message","at","various","points","during","execution",".","..","code-block",":",":","python","from","torchtnt.framework.callback","import","Callback","from","torchtnt.framework.state","import","State","from","torchtnt.framework.unit","import","TEvalUnit",",","TPredictUnit",",","TTrainUnit","class","PrintingCallback","(","Callback",")",":","def","on_train_start","(","self",",","state",":","State",",","unit",":","TTrainUnit",")","-",">","None",":","print","(","``","Starting","training","''",")","def","on_train_end","(","self",",","state",":","State",",","unit",":","TTrainUnit",")","-",">","None",":","print","(","``","Ending","training","''",")","def","on_eval_start","(","self",",","state",":","State",",","unit",":","TEvalUnit",")","-",">","None",":","print","(","``","Starting","evaluation","''",")","def","on_eval_end","(","self",",","state",":","State",",","unit",":","TEvalUnit",")","-",">","None",":","print","(","``","Ending","evaluation","''",")","def","on_predict_start","(","self",",","state",":","State",",","unit",":","TPredictUnit",")","-",">","None",":","print","(","``","Starting","prediction","''",")","def","on_predict_end","(","self",",","state",":","State",",","unit",":","TPredictUnit",")","-",">","None",":","print","(","``","Ending","prediction","''",")","To","use","a","callback",",","instantiate","the","class","and","pass","it","in","the","``","callbacks","``","parameter","to","the",":","py",":","func",":","`","~torchtnt.framework.train","`",",",":","py",":","func",":","`","~torchtnt.framework.evaluate","`",",",":","py",":","func",":","`","~torchtnt.framework.predict","`",",","or",":","py",":","func",":","`","~torchtnt.framework.fit","`","entry","point",".","..","code-block",":",":","python","printing_callback","=","PrintingCallback","(",")","train","(","train_unit",",","train_dataloader",",","callbacks=","[","printing_callback","]",")"]
docstr: Hook called after getting the data batch for the next eval step.
docstr_tok: ["Hook","called","after","getting","the","data","batch","for","the","next","eval","step","."]
code: def on_eval_get_next_batch_end(
      self, state: State, unit: TEvalUnit
  ) -> None:
      """Hook called after getting the data batch for the next eval step."""
      pass
  
imports: from typing import Union
  from torchtnt.framework.state import State
  from torchtnt.framework.unit import TEvalUnit, TPredictUnit, TTrainUnit
label_desc: Use image node_id 12 for calling the Callback obj's underlying member method code with example usage: obj.on_eval_get_next_batch_end(state, unit) without return types