class_docstr: Callback that normalizes the image-level and pixel-level anomaly scores using min-max normalization.
class_docstr_tok: ["Callback","that","normalizes","the","image-level","and","pixel-level","anomaly","scores","using","min-max","normalization","."]
docstr: Called when the test begins.
docstr_tok: ["Called","when","the","test","begins","."]
code: def on_test_start(
      self, trainer: pl.Trainer, pl_module: AnomalyModule
  ) -> None:
      """Called when the test begins."""
      del trainer  # `trainer` variable is not used.
  
      for metric in (pl_module.image_metrics, pl_module.pixel_metrics):
          if metric is not None:
              metric.set_threshold(0.5)
  
file_path: anomalib/src/anomalib/utils/callbacks/min_max_normalization.py
imports: from __future__ import annotations
  from typing import Any
  import pytorch_lightning
  import torch
  from pytorch_lightning import Callback
  from pytorch_lightning.utilities.types import STEP_OUTPUT
  from anomalib.models.components import AnomalyModule
  from anomalib.post_processing.normalization.min_max import normalize
  from anomalib.utils.metrics import MinMax
label_desc: Use image node_id 2 for calling the MinMaxNormalizationCallback obj's underlying member method code with example usage: obj.on_test_start(trainer, pl_module) without return types