class_docstr: Test class for `KendallRankCorrCoef` metric.
class_docstr_tok: ["Test","class","for","`","KendallRankCorrCoef","`","metric","."]
docstr: Test the differentiability of the metric, according to its `is_differentiable` attribute.
docstr_tok: ["Test","the","differentiability","of","the","metric",",","according","to","its","`","is_differentiable","`","attribute","."]
code: def test_kendall_rank_corrcoef_differentiability(
      self, preds, target, alternative, variant
  ):
      """Test the differentiability of the metric, according to its `is_differentiable` attribute."""
      num_outputs = EXTRA_DIM if preds.ndim == 3 else 1
      self.run_differentiability_test(
          preds=preds,
          target=target,
          metric_module=partial(
              KendallRankCorrCoef, num_outputs=num_outputs
          ),
          metric_functional=kendall_rank_corrcoef,
      )
  
file_path: torchmetrics/tests/unittests/regression/test_kendall.py
imports: import operator
  import sys
  from functools import partial
  import pytest
  import torch
  from lightning_utilities.core.imports import compare_version
  from scipy.stats import kendalltau
  from torchmetrics.functional.regression.kendall import kendall_rank_corrcoef
  from torchmetrics.regression.kendall import KendallRankCorrCoef
  from torchmetrics.utilities.imports import _SCIPY_GREATER_EQUAL_1_8, _TORCH_LOWER_2_0
  from unittests import BATCH_SIZE, EXTRA_DIM, NUM_BATCHES, _Input
  from unittests.helpers import seed_all
  from unittests.helpers.testers import MetricTester
label_desc: Use image node_id 3 for calling the TestKendallRankCorrCoef obj's underlying member method code with example usage: obj.test_kendall_rank_corrcoef_differentiability(preds, target, alternative, variant) without return types