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: Called when any trainer execution is interrupted by an exception.
docstr_tok: ["Called","when","any","trainer","execution","is","interrupted","by","an","exception","."]
code: def on_exception(
      self,
      trainer: "pl.Trainer",
      pl_module: "pl.LightningModule",
      exception: BaseException,
  ) -> None:
      """Called when any trainer execution is interrupted by an exception."""
  
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 34 for calling the Callback obj's underlying member method code with example usage: obj.on_exception(trainer, pl_module, exception) without return types