class_docstr: 注意 metrics 的输入只支持：Dict[str, Metric]；
  并且通过对 update() , reset() , get_metric() 函数的封装，实现支持 fastNLP 的 metric 以及 torchmetrics 或者更多。
code: def update(self, batch, outputs):
      if is_dataclass(outputs):
          outputs = dataclass_to_dict(outputs)
      for metric in self._metrics:
          args = []
          if not isinstance(batch, dict):
              logger.rank_zero_warning(
                  f"The output of the DataLoader is of type:`{type(batch)}`, fastNLP will only depend on "
                  f"the output of model to update metric.",
                  once=True,
              )
          else:
              args.append(batch)
          if not isinstance(outputs, dict):
              raise RuntimeError(
                  f"The output of your model is of type:`{type(outputs)}`, please either directly"
                  f" return a dict from your model or use `output_mapping` to convert it into dict "
                  f"type."
              )
          if isinstance(metric, Metric):
              # 这样在 auto_param_call 报错的时候才清晰。
              auto_param_call(
                  metric.update,
                  outputs,
                  *args,
                  signature_fn=metric.update.__wrapped__,
              )
          elif _is_torchmetrics_metric(metric):
              auto_param_call(
                  metric.update,
                  outputs,
                  *args,
                  signature_fn=metric.update.__wrapped__,
              )
          elif _is_allennlp_metric(metric):
              auto_param_call(metric.__call__, outputs, *args)
          elif _is_paddle_metric(metric):
              res = auto_param_call(metric.compute, outputs, *args)
              metric.update(res)
  
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 2 for calling the _MetricsWrapper obj's underlying member method code with example usage: obj.update(batch, outputs) without return types