class_docstr: 注意 metrics 的输入只支持：Dict[str, Metric]；
  并且通过对 update() , reset() , get_metric() 函数的封装，实现支持 fastNLP 的 metric 以及 torchmetrics 或者更多。
code: def __init__(self, metrics, evaluator):
      self.evaluator = evaluator
      self._metrics = []
      self._metric_names = []
      if metrics is not None:
          if not isinstance(metrics, Dict):
              raise TypeError(
                  "Parameter `metrics` can only be `Dict` type."
              )
          for metric_name, metric in metrics.items():
              # 因为 torchmetrics 是一个 nn.Module，因此我们需要先将其移到对应的机器上；
              if _is_torchmetrics_metric(metric) and isinstance(
                  evaluator.driver, TorchDriver
              ):
                  # torchmetrics 是默认自动开启了多卡的
                  evaluator.driver.move_model_to_device(
                      metric, evaluator.driver.data_device
                  )
              elif isinstance(metric, Metric):
                  # 如果数据是分布式的，但是不aggregate的话可能有问题
                  if (
                      evaluator._dist_sampler is not None
                      and metric.aggregate_when_get_metric is False
                  ):
                      logger.rank_zero_warning(
                          "You have replaced the sampler as distributed sampler when evaluation, but your metric "
                          f"{metric_name}:{metric.__class__.__name__}'s `aggregate_when_get_metric` is False.",
                          once=True,
                      )
                  if metric.aggregate_when_get_metric is None:
                      metric.aggregate_when_get_metric = (
                          evaluator._dist_sampler is not None
                      )
  
                  metric.to(evaluator.driver.data_device)
              self._metric_names.append(metric_name)
              self._metrics.append(metric)
  
imports: from typing import Union, List, Optional, Dict, Callable, BinaryIO
  import os
  from pathlib import Path
  import io
  from dataclasses import is_dataclass
  from fastNLP.core.drivers import Driver, TorchDriver
  from ..drivers.choose_driver import choose_driver
  from .loops import Loop, EvaluateBatchLoop
  from fastNLP.core.utils import auto_param_call, dataclass_to_dict, match_and_substitute_params, f_rich_progress, flat_nest_dict, f_tqdm_progress
  from fastNLP.core.metrics import Metric
  from fastNLP.core.metrics.utils import _is_torchmetrics_metric, _is_paddle_metric, _is_allennlp_metric
  from fastNLP.core.controllers.utils.utils import _TruncatedDataLoader
  from fastNLP.core.utils.utils import _check_valid_parameters_number
  from fastNLP.core.log import logger
  from fastNLP.envs import FASTNLP_MODEL_FILENAME
label_desc: Use image node_id 1 to create a new _MetricsWrapper object  with example: obj = _MetricsWrapper(metrics, evaluator)