class_docstr: Test class for `MulticlassAUROC` metric.
class_docstr_tok: ["Test","class","for","`","MulticlassAUROC","`","metric","."]
docstr: Test that different types of `thresholds` argument lead to same result.
docstr_tok: ["Test","that","different","types","of","`","thresholds","`","argument","lead","to","same","result","."]
code: def test_multiclass_auroc_threshold_arg(self, inputs, average):
      """Test that different types of `thresholds` argument lead to same result."""
      preds, target = inputs
      if (preds < 0).any():
          preds = preds.softmax(dim=-1)
      for pred, true in zip(preds, target):
          pred = (
              torch.tensor(np.round(pred.numpy(), 2)) + 1e-6
          )  # rounding will simulate binning
          ap1 = multiclass_auroc(
              pred,
              true,
              num_classes=NUM_CLASSES,
              average=average,
              thresholds=None,
          )
          ap2 = multiclass_auroc(
              pred,
              true,
              num_classes=NUM_CLASSES,
              average=average,
              thresholds=torch.linspace(0, 1, 100),
          )
          assert torch.allclose(ap1, ap2)
  
imports: from functools import partial
  import numpy
  import pytest
  import torch
  from scipy.special import expit
  from scipy.special import softmax
  from sklearn.metrics import roc_auc_score
  from torchmetrics.classification.auroc import AUROC, BinaryAUROC, MulticlassAUROC, MultilabelAUROC
  from torchmetrics.functional.classification.auroc import binary_auroc, multiclass_auroc, multilabel_auroc
  from torchmetrics.functional.classification.roc import binary_roc
  from torchmetrics.metric import Metric
  from unittests import NUM_CLASSES
  from unittests.classification.inputs import _binary_cases, _multiclass_cases, _multilabel_cases
  from unittests.helpers import seed_all
  from unittests.helpers.testers import MetricTester, inject_ignore_index, remove_ignore_index
label_desc: Use image node_id 6 for calling the TestMulticlassAUROC obj's underlying member method code with example usage: obj.test_multiclass_auroc_threshold_arg(inputs, average) without return types