class_docstr: Test class for `SourceAggregatedSignalDistortionRatio` metric.
class_docstr_tok: ["Test","class","for","`","SourceAggregatedSignalDistortionRatio","`","metric","."]
docstr: Test functional implementation of metric.
docstr_tok: ["Test","functional","implementation","of","metric","."]
code: def test_sa_sdr_functional(
      self, preds, target, scale_invariant, zero_mean
  ):
      """Test functional implementation of metric."""
      self.run_functional_metric_test(
          preds,
          target,
          source_aggregated_signal_distortion_ratio,
          reference_metric=partial(
              _ref_metric,
              scale_invariant=scale_invariant,
              zero_mean=zero_mean,
          ),
          metric_args={
              "scale_invariant": scale_invariant,
              "zero_mean": zero_mean,
          },
      )
  
file_path: torchmetrics/tests/unittests/audio/test_sa_sdr.py
imports: from functools import partial
  import pytest
  import torch
  from torch import Tensor
  from torchmetrics.audio import SourceAggregatedSignalDistortionRatio
  from torchmetrics.functional.audio import scale_invariant_signal_distortion_ratio, signal_noise_ratio, source_aggregated_signal_distortion_ratio
  from unittests import BATCH_SIZE, NUM_BATCHES, _Input
  from unittests.helpers import seed_all
  from unittests.helpers.testers import MetricTester
label_desc: Use image node_id 2 for calling the TestSASDR obj's underlying member method code with example usage: obj.test_sa_sdr_functional(preds, target, scale_invariant, zero_mean) without return types