class_docstr: Area under the PR curve.
class_docstr_tok: ["Area","under","the","PR","curve","."]
docstr: Update state with new values.
  
  Need to flatten new values as PrecicionRecallCurve expects them in this format for binary classification.
  
  Args:
      preds (Tensor): predictions of the model
      target (Tensor): ground truth targets
docstr_tok: ["Update","state","with","new","values",".","Need","to","flatten","new","values","as","PrecicionRecallCurve","expects","them","in","this","format","for","binary","classification",".","Args",":","preds","(","Tensor",")",":","predictions","of","the","model","target","(","Tensor",")",":","ground","truth","targets"]
code: def update(self, preds: Tensor, target: Tensor) -> None:  # type: ignore
      """Update state with new values.
  
      Need to flatten new values as PrecicionRecallCurve expects them in this format for binary classification.
  
      Args:
          preds (Tensor): predictions of the model
          target (Tensor): ground truth targets
      """
      super().update(preds.flatten(), target.flatten())
  
file_path: anomalib/src/anomalib/utils/metrics/aupr.py
imports: from __future__ import annotations
  from matplotlib.figure import Figure
  from torch import Tensor
  from torchmetrics import PrecisionRecallCurve
  from torchmetrics.functional import auc
  from torchmetrics.utilities.data import dim_zero_cat
  from .plotting_utils import plot_figure
label_desc: Use image node_id 2 for calling the AUPR obj's underlying member method code with example usage: obj.update(preds, target) without return types