class_docstr: 通过该 callback 来测试带有 metrics 的 Trainer 是否训练测试正确；
class_docstr_tok: ["\u901a\u8fc7\u8be5","callback","\u6765\u6d4b\u8bd5\u5e26\u6709","metrics","\u7684","Trainer","\u662f\u5426\u8bad\u7ec3\u6d4b\u8bd5\u6b63\u786e\uff1b"]
code: def __init__(
      self, monitor: str, metric_threshold: float, larger_better: bool
  ):
      self.monitor = monitor
      self.larger_better = larger_better
      self.metric = None
      self.metric_threshold = metric_threshold
      self.metric_begin_value = (
          float("-inf") if larger_better else float("inf")
      )
  
imports: from fastNLP.core.callbacks.callback import Callback
label_desc: Use image node_id 1 to create a new RecordMetricCallback object from inherited base classes: Callback with example: obj = RecordMetricCallback(monitor, metric_threshold, larger_better)