class_docstr: Control the loops for training, evaluation, and prediction. This module is independent of
  the model definition. This class inherits from the Pytorch Lightning's LightningModule:
  https://lightning.ai/docs/pytorch/stable/common/lightning_module.html
code: def _compute_metric_score(
      self,
      metric: torchmetrics.Metric,
      custom_metric_func: Callable,
      logits: torch.Tensor,
      label: torch.Tensor,
      **kwargs,
  ):
      if isinstance(metric, Multiclass_IoU):
          metric.update(kwargs["semantic_masks"], label)
      else:
          metric.update(logits.float(), label)
  
file_path: autogluon/multimodal/src/autogluon/multimodal/optimization/lit_semantic_seg.py
imports: import logging
  from typing import Callable, Dict
  import torch
  import torchmetrics
  from transformers.models.mask2former.modeling_mask2former import Mask2FormerLoss
  from ..constants import CLASS_LOGITS, LOGITS, SEMANTIC_MASK, WEIGHT
  from ..models.utils import run_model
  from .lit_module import LitModule
  from .semantic_seg_metrics import Multiclass_IoU
label_desc: Use image node_id 2 for calling the SemanticSegmentationLitModule obj's underlying member method code with example usage: obj._compute_metric_score(metric, custom_metric_func, logits, label) without return types