class_docstr: Lightning module specialized for MMDet, with metrics support.
  
  The methods `forward`, `training_step`, `validation_step`, `validation_epoch_end`
  are already overriden.
  
  # Arguments
      model: The pytorch model to use.
      metrics: `Sequence` of metrics to use.
  
  # Returns
      A `LightningModule`.
class_docstr_tok: ["Lightning","module","specialized","for","MMDet",",","with","metrics","support",".","The","methods","`","forward","`",",","`","training_step","`",",","`","validation_step","`",",","`","validation_epoch_end","`","are","already","overriden",".","#","Arguments","model",":","The","pytorch","model","to","use",".","metrics",":","`","Sequence","`","of","metrics","to","use",".","#","Returns","A","`","LightningModule","`","."]
code: def _shared_eval(self, batch, loss_log_key):
      data, records = batch
  
      outputs = self.model.train_step(data=data, optimizer=None)
      raw_preds = self.model.forward_test(
          imgs=[data["img"]], img_metas=[data["img_metas"]]
      )
  
      preds = self.convert_raw_predictions(
          batch=data, raw_preds=raw_preds, records=records
      )
      self.accumulate_metrics(preds)
  
      for k, v in outputs["log_vars"].items():
          self.log(f"{loss_log_key}_{k}", v)
  
file_path: icevision/icevision/models/mmdet/lightning/model_adapter.py
imports: from icevision.imports import *
  from icevision.utils import *
  from icevision.metrics import *
  from icevision.engines.lightning.lightning_model_adapter import LightningModelAdapter
  from icevision.core.record_components import InstanceMasksRecordComponent, BBoxesRecordComponent
  from icevision.core.mask import MaskArray
  from icevision.core.bbox import BBox
  from icevision.models.mmdet.common.bbox import convert_raw_predictions
label_desc: Use image node_id 6 for calling the MMDetModelAdapter obj's underlying member method code with example usage: obj._shared_eval(batch, loss_log_key) without return types