class_docstr: Test class for `MeanError` metric.
class_docstr_tok: ["Test","class","for","`","MeanError","`","metric","."]
docstr: Test class implementation of metric.
docstr_tok: ["Test","class","implementation","of","metric","."]
code: def test_mean_error_class(
      self,
      preds,
      target,
      ref_metric,
      metric_class,
      metric_functional,
      sk_fn,
      metric_args,
      ddp,
  ):
      """Test class implementation of metric."""
      self.run_class_metric_test(
          ddp=ddp,
          preds=preds,
          target=target,
          metric_class=metric_class,
          reference_metric=partial(
              ref_metric, sk_fn=sk_fn, metric_args=metric_args
          ),
          metric_args=metric_args,
      )
  
imports: import math
  from functools import partial
  from typing import Optional
  import numpy
  import pytest
  import torch
  from sklearn.metrics import mean_absolute_error
  from sklearn.metrics import mean_absolute_percentage_error
  from sklearn.metrics import mean_squared_error
  from sklearn.metrics import mean_squared_log_error
  from sklearn.metrics._regression import _check_reg_targets
  from sklearn.utils import check_consistent_length
  from torchmetrics.functional import mean_absolute_error, mean_absolute_percentage_error, mean_squared_error, mean_squared_log_error, weighted_mean_absolute_percentage_error
  from torchmetrics.functional.regression.symmetric_mape import symmetric_mean_absolute_percentage_error
  from torchmetrics.regression import MeanAbsoluteError, MeanAbsolutePercentageError, MeanSquaredError, MeanSquaredLogError, WeightedMeanAbsolutePercentageError
  from torchmetrics.regression.symmetric_mape import SymmetricMeanAbsolutePercentageError
  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 1 for calling the TestMeanError obj's underlying member method code with example usage: obj.test_mean_error_class(preds, target, ref_metric, metric_class, metric_functional, sk_fn, metric_args, ddp) without return types