class_docstr: Callback that visualizes the results of a model.
  
  To save the images to the filesystem, add the 'local' keyword to the `project.log_images_to` parameter in the
  config.yaml file.
class_docstr_tok: ["Callback","that","visualizes","the","results","of","a","model",".","To","save","the","images","to","the","filesystem",",","add","the","'local","'","keyword","to","the","`","project.log_images_to","`","parameter","in","the","config.yaml","file","."]
docstr: Sync logs.
  
  Currently only ``AnomalibWandbLogger.save`` is called from this method.
  This is because logging as a single batch ensures that all images appear as part of the same step.
  
  Args:
      trainer (pl.Trainer): Pytorch Lightning trainer
      pl_module (AnomalyModule): Anomaly module (unused)
docstr_tok: ["Sync","logs",".","Currently","only","``","AnomalibWandbLogger.save","``","is","called","from","this","method",".","This","is","because","logging","as","a","single","batch","ensures","that","all","images","appear","as","part","of","the","same","step",".","Args",":","trainer","(","pl.Trainer",")",":","Pytorch","Lightning","trainer","pl_module","(","AnomalyModule",")",":","Anomaly","module","(","unused",")"]
code: def on_test_end(
      self, trainer: pl.Trainer, pl_module: AnomalyModule
  ) -> None:
      """Sync logs.
  
      Currently only ``AnomalibWandbLogger.save`` is called from this method.
      This is because logging as a single batch ensures that all images appear as part of the same step.
  
      Args:
          trainer (pl.Trainer): Pytorch Lightning trainer
          pl_module (AnomalyModule): Anomaly module (unused)
      """
      del pl_module  # `pl_module` is not used.
  
      for logger in trainer.loggers:
          if isinstance(logger, AnomalibWandbLogger):
              logger.save()
  
file_path: anomalib/src/anomalib/utils/callbacks/visualizer/visualizer_base.py
imports: from __future__ import annotations
  from pathlib import Path
  from typing import cast
  import numpy
  import pytorch_lightning
  from pytorch_lightning import Callback
  from anomalib.data import TaskType
  from anomalib.models.components import AnomalyModule
  from anomalib.post_processing import VisualizationMode, Visualizer
  from anomalib.utils.loggers import AnomalibWandbLogger
  from anomalib.utils.loggers.base import ImageLoggerBase
label_desc: Use image node_id 3 for calling the BaseVisualizerCallback obj's underlying member method code with example usage: obj.on_test_end(trainer, pl_module) without return types