class_docstr: Test class for `BinaryAUROC` metric.
class_docstr_tok: ["Test","class","for","`","BinaryAUROC","`","metric","."]
docstr: Test dtype support of the metric on CPU.
docstr_tok: ["Test","dtype","support","of","the","metric","on","CPU","."]
code: def test_binary_auroc_dtype_cpu(self, inputs, dtype):
      """Test dtype support of the metric on CPU."""
      preds, target = inputs
  
      if (preds < 0).any() and dtype == torch.half:
          pytest.xfail(
              reason="torch.sigmoid in metric does not support cpu + half precision"
          )
      self.run_precision_test_cpu(
          preds=preds,
          target=target,
          metric_module=BinaryAUROC,
          metric_functional=binary_auroc,
          metric_args={"thresholds": None},
          dtype=dtype,
      )
  
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 4 for calling the TestBinaryAUROC obj's underlying member method code with example usage: obj.test_binary_auroc_dtype_cpu(inputs, dtype) without return types