class_docstr: Test class for `RetrievalAUROC` metric.
class_docstr_tok: ["Test","class","for","`","RetrievalAUROC","`","metric","."]
docstr: Test class implementation of metric with ignore_index argument.
docstr_tok: ["Test","class","implementation","of","metric","with","ignore_index","argument","."]
code: def test_class_metric_ignore_index(
      self,
      ddp: bool,
      indexes: Tensor,
      preds: Tensor,
      target: Tensor,
      empty_target_action: str,
      k: int,
      max_fpr: Optional[float],
  ):
      """Test class implementation of metric with ignore_index argument."""
      metric_args = {
          "empty_target_action": empty_target_action,
          "top_k": k,
          "ignore_index": -100,
          "max_fpr": max_fpr,
      }
  
      self.run_class_metric_test(
          ddp=ddp,
          indexes=indexes,
          preds=preds,
          target=target,
          metric_class=RetrievalAUROC,
          reference_metric=_auroc_at_k,
          metric_args=metric_args,
      )
  
file_path: torchmetrics/tests/unittests/retrieval/test_auroc.py
imports: from typing import Callable, Optional, Union
  import numpy
  import pytest
  from sklearn.metrics import roc_auc_score
  from torch import Tensor
  from torchmetrics.functional.retrieval.auroc import retrieval_auroc
  from torchmetrics.retrieval.auroc import RetrievalAUROC
  from typing_extensions import Literal
  from unittests.helpers import seed_all
  from unittests.retrieval.helpers import RetrievalMetricTester, _concat_tests, _custom_aggregate_fn, _default_metric_class_input_arguments, _default_metric_class_input_arguments_ignore_index, _default_metric_functional_input_arguments, _errors_test_class_metric_parameters_default, _errors_test_class_metric_parameters_k, _errors_test_class_metric_parameters_no_pos_target, _errors_test_functional_metric_parameters_default, _errors_test_functional_metric_parameters_k
label_desc: Use image node_id 2 for calling the TestAUROC obj's underlying member method code with example usage: obj.test_class_metric_ignore_index(ddp, indexes, preds, target, empty_target_action, k, max_fpr) without return types