class_docstr: This class implements the RecMetricComputation for AUC, i.e. Area Under the Curve.
  
  The constructor arguments are defined in RecMetricComputation.
  See the docstring of RecMetricComputation for more detail.
  Args:
      grouped_auc (bool): If True, computes AUC per group and returns average AUC across all groups.
          The `grouping_keys` is provided during state updates along with predictions, labels, weights.
          This feature is currently not enabled for `fused_update_limit`.
class_docstr_tok: ["This","class","implements","the","RecMetricComputation","for","AUC",",","i.e",".","Area","Under","the","Curve",".","The","constructor","arguments","are","defined","in","RecMetricComputation",".","See","the","docstring","of","RecMetricComputation","for","more","detail",".","Args",":","grouped_auc","(","bool",")",":","If","True",",","computes","AUC","per","group","and","returns","average","AUC","across","all","groups",".","The","`","grouping_keys","`","is","provided","during","state","updates","along","with","predictions",",","labels",",","weights",".","This","feature","is","currently","not","enabled","for","`","fused_update_limit","`","."]
code: def __init__(
      self,
      *args: Any,
      grouped_auc: bool = False,
      apply_bin: bool = False,
      fused_update_limit: int = 0,
      **kwargs: Any,
  ) -> None:
      super().__init__(*args, **kwargs)
      if grouped_auc and fused_update_limit > 0:
          raise RecMetricException(
              "Grouped AUC and Fused Update Limit cannot be enabled together yet."
          )
  
      self._grouped_auc: bool = grouped_auc
      self._apply_bin: bool = apply_bin
      self._add_state(
          PREDICTIONS,
          [],
          add_window_state=False,
          dist_reduce_fx=_state_reduction,
          persistent=False,
      )
      self._add_state(
          LABELS,
          [],
          add_window_state=False,
          dist_reduce_fx=_state_reduction,
          persistent=False,
      )
      self._add_state(
          WEIGHTS,
          [],
          add_window_state=False,
          dist_reduce_fx=_state_reduction,
          persistent=False,
      )
      if self._grouped_auc:
          self._add_state(
              GROUPING_KEYS,
              [],
              add_window_state=False,
              dist_reduce_fx=_grouping_keys_state_reduction,
              persistent=False,
          )
      self._init_states()
  
imports: from functools import partial
  from typing import Any, cast, Dict, List, Optional, Type
  import torch
  import torch.distributed
  from torchrec.metrics.metrics_config import RecComputeMode, RecTaskInfo
  from torchrec.metrics.metrics_namespace import MetricName, MetricNamespace, MetricPrefix
  from torchrec.metrics.rec_metric import MetricComputationReport, RecMetric, RecMetricComputation, RecMetricException
label_desc: Use image node_id 1 to create a new AUCMetricComputation object from inherited base classes: RecMetricComputation with example: obj = AUCMetricComputation()