class_docstr: Abstract base class used to build new callbacks.
  
  Subclass this class and override any of the relevant hooks
class_docstr_tok: ["Abstract","base","class","used","to","build","new","callbacks",".","Subclass","this","class","and","override","any","of","the","relevant","hooks"]
docstr: Formats a set of key-value pairs into a state key string with the callback class name prefixed. Useful for
  defining a :attr:`state_key`.
  
  Args:
      **kwargs: A set of key-value pairs. Must be serializable to :class:`str`.
docstr_tok: ["Formats","a","set","of","key-value","pairs","into","a","state","key","string","with","the","callback","class","name","prefixed",".","Useful","for","defining","a",":","attr",":","`","state_key","`",".","Args",":","*","*","kwargs",":","A","set","of","key-value","pairs",".","Must","be","serializable","to",":","class",":","`","str","`","."]
code: def _generate_state_key(self, **kwargs: Any) -> str:
      """Formats a set of key-value pairs into a state key string with the callback class name prefixed. Useful for
      defining a :attr:`state_key`.
  
      Args:
          **kwargs: A set of key-value pairs. Must be serializable to :class:`str`.
  
      """
      return f"{self.__class__.__qualname__}{repr(kwargs)}"
  
imports: from typing import Any, Dict, Type
  from torch import Tensor
  from torch.optim import Optimizer
  import lightning.pytorch
  from lightning.pytorch.utilities.types import STEP_OUTPUT
label_desc: Use image node_id 3 for calling the Callback obj's underlying member method code with example usage: obj._generate_state_key() and returns: self, repr