class_docstr: Callback that standardizes the image-level and pixel-level anomaly scores.
class_docstr_tok: ["Callback","that","standardizes","the","image-level","and","pixel-level","anomaly","scores","."]
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.
  
      if pl_module.image_metrics is not None:
          pl_module.image_metrics.set_threshold(0.5)
      if pl_module.pixel_metrics is not None:
          pl_module.pixel_metrics.set_threshold(0.5)
  
imports: from __future__ import annotations
  import logging
  from typing import Any
  import pytorch_lightning
  from pytorch_lightning import Callback, Trainer
  from pytorch_lightning.utilities.types import STEP_OUTPUT
  from torch.distributions import LogNormal
  from anomalib.models import get_model
  from anomalib.models.components import AnomalyModule
  from anomalib.post_processing.normalization.cdf import normalize, standardize
  from anomalib.utils.metrics import AnomalyScoreDistribution
label_desc: Use image node_id 3 for calling the CdfNormalizationCallback obj's underlying member method code with example usage: obj.on_test_start(trainer, pl_module) without return types