class_docstr: Metrics Configuration Callback.
docstr: Create image and pixel-level AnomalibMetricsCollection.
  
  This callback creates AnomalibMetricsCollection based on the
      list of strings provided for image and pixel-level metrics.
  After these MetricCollections are created, the callback assigns
  these to the lightning module.
  
  Args:
      task (TaskType): Task type of the current run.
      image_metrics (list[str] | None): List of image-level metrics.
      pixel_metrics (list[str] | None): List of pixel-level metrics.
docstr_tok: ["Create","image","and","pixel-level","AnomalibMetricsCollection",".","This","callback","creates","AnomalibMetricsCollection","based","on","the","list","of","strings","provided","for","image","and","pixel-level","metrics",".","After","these","MetricCollections","are","created",",","the","callback","assigns","these","to","the","lightning","module",".","Args",":","task","(","TaskType",")",":","Task","type","of","the","current","run",".","image_metrics","(","list","[","str","]","|","None",")",":","List","of","image-level","metrics",".","pixel_metrics","(","list","[","str","]","|","None",")",":","List","of","pixel-level","metrics","."]
code: def __init__(
      self,
      task: TaskType = TaskType.SEGMENTATION,
      image_metrics: list[str] | None = None,
      pixel_metrics: list[str] | None = None,
  ) -> None:
      """Create image and pixel-level AnomalibMetricsCollection.
  
      This callback creates AnomalibMetricsCollection based on the
          list of strings provided for image and pixel-level metrics.
      After these MetricCollections are created, the callback assigns
      these to the lightning module.
  
      Args:
          task (TaskType): Task type of the current run.
          image_metrics (list[str] | None): List of image-level metrics.
          pixel_metrics (list[str] | None): List of pixel-level metrics.
      """
      self.task = task
      self.image_metric_names = image_metrics
      self.pixel_metric_names = pixel_metrics
  
file_path: anomalib/src/anomalib/utils/callbacks/metrics_configuration.py
imports: from __future__ import annotations
  import logging
  import pytorch_lightning
  from pytorch_lightning.callbacks import Callback
  from anomalib.data import TaskType
  from anomalib.models.components.base.anomaly_module import AnomalyModule
  from anomalib.utils.metrics import create_metric_collection
label_desc: Use image node_id 1 to create a new MetricsConfigurationCallback object from inherited base classes: Callback with example: obj = MetricsConfigurationCallback(task, image_metrics, pixel_metrics)