class_docstr: 自动记录 ``evaluation`` 结果到 ``fitlog`` 中。会自动记录每一次 ``evaluate`` 后的结果；同时会根据
  ``monitor`` 记录最好的结果。另外，会自动将非 ``rank 0`` 上的 ``fitlog`` 设置为 ``debug`` 状态。同时还会在 ``fitlog`` 的
  ``other`` 列中记录一个 ``launch_time`` ，可以通过这个数值找到当前这个脚本的在 save_folder （如果有使用其它需要保存模型的
  ``Callback`` ，例如 :class:`~fastNLP.core.callbacks.CheckpointCallback` ）下的文件夹名称。
  
  :param monitor: 监控的 metric 值。
  
      * 为 ``None``
        将尝试使用 :class:`~fastNLP.core.controllers.Trainer` 中设置 `monitor` 值（如果有设置）。
      * 为 ``str``
        尝试直接使用该名称从 ``evaluation`` 结果中寻找，如果在 ``evaluation`` 结果中没有找到完全一致的名称，将
        使用 最长公共字符串算法 从 ``evaluation`` 结果中找到最匹配的那个作为 ``monitor`` 。
      * 为 :class:`Callable`
        接受参数为 ``evaluation`` 的结果(字典类型)，返回一个 ``float`` 值作为 ``monitor`` 的结果，如果当前结果中没有相关
        的 ``monitor`` 值请返回 ``None`` 。
  
  :param larger_better: 是否是越大越好。
  :param log_exception: 是否记录 ``exception`` 。
  :param log_loss_every: 多少个 ``batch`` 记录一次 loss 到 ``fitlog`` 中。
class_docstr_tok: ["\u81ea\u52a8\u8bb0\u5f55","``","evaluation","``","\u7ed3\u679c\u5230","``","fitlog","``","\u4e2d\u3002\u4f1a\u81ea\u52a8\u8bb0\u5f55\u6bcf\u4e00\u6b21","``","evaluate","``","\u540e\u7684\u7ed3\u679c\uff1b\u540c\u65f6\u4f1a\u6839\u636e","``","monitor","``","\u8bb0\u5f55\u6700\u597d\u7684\u7ed3\u679c\u3002\u53e6\u5916\uff0c\u4f1a\u81ea\u52a8\u5c06\u975e","``","rank","0","``","\u4e0a\u7684","``","fitlog","``","\u8bbe\u7f6e\u4e3a","``","debug","``","\u72b6\u6001\u3002\u540c\u65f6\u8fd8\u4f1a\u5728","``","fitlog","``","\u7684","``","other","``","\u5217\u4e2d\u8bb0\u5f55\u4e00\u4e2a","``","launch_time","``","\uff0c\u53ef\u4ee5\u901a\u8fc7\u8fd9\u4e2a\u6570\u503c\u627e\u5230\u5f53\u524d\u8fd9\u4e2a\u811a\u672c\u7684\u5728","save_folder","\uff08\u5982\u679c\u6709\u4f7f\u7528\u5176\u5b83\u9700\u8981\u4fdd\u5b58\u6a21\u578b\u7684","``","Callback","``","\uff0c\u4f8b\u5982",":","class",":","`","~fastNLP.core.callbacks.CheckpointCallback","`","\uff09\u4e0b\u7684\u6587\u4ef6\u5939\u540d\u79f0\u3002",":","param","monitor",":","\u76d1\u63a7\u7684","metric","\u503c\u3002","*","\u4e3a","``","None","``","\u5c06\u5c1d\u8bd5\u4f7f\u7528",":","class",":","`","~fastNLP.core.controllers.Trainer","`","\u4e2d\u8bbe\u7f6e","`","monitor","`","\u503c\uff08\u5982\u679c\u6709\u8bbe\u7f6e\uff09\u3002","*","\u4e3a","``","str","``","\u5c1d\u8bd5\u76f4\u63a5\u4f7f\u7528\u8be5\u540d\u79f0\u4ece","``","evaluation","``","\u7ed3\u679c\u4e2d\u5bfb\u627e\uff0c\u5982\u679c\u5728","``","evaluation","``","\u7ed3\u679c\u4e2d\u6ca1\u6709\u627e\u5230\u5b8c\u5168\u4e00\u81f4\u7684\u540d\u79f0\uff0c\u5c06","\u4f7f\u7528","\u6700\u957f\u516c\u5171\u5b57\u7b26\u4e32\u7b97\u6cd5","\u4ece","``","evaluation","``","\u7ed3\u679c\u4e2d\u627e\u5230\u6700\u5339\u914d\u7684\u90a3\u4e2a\u4f5c\u4e3a","``","monitor","``","\u3002","*","\u4e3a",":","class",":","`","Callable","`","\u63a5\u53d7\u53c2\u6570\u4e3a","``","evaluation","``","\u7684\u7ed3\u679c","(","\u5b57\u5178\u7c7b\u578b",")","\uff0c\u8fd4\u56de\u4e00\u4e2a","``","float","``","\u503c\u4f5c\u4e3a","``","monitor","``","\u7684\u7ed3\u679c\uff0c\u5982\u679c\u5f53\u524d\u7ed3\u679c\u4e2d\u6ca1\u6709\u76f8\u5173","\u7684","``","monitor","``","\u503c\u8bf7\u8fd4\u56de","``","None","``","\u3002",":","param","larger_better",":","\u662f\u5426\u662f\u8d8a\u5927\u8d8a\u597d\u3002",":","param","log_exception",":","\u662f\u5426\u8bb0\u5f55","``","exception","``","\u3002",":","param","log_loss_every",":","\u591a\u5c11\u4e2a","``","batch","``","\u8bb0\u5f55\u4e00\u6b21","loss","\u5230","``","fitlog","``","\u4e2d\u3002"]
code: def on_train_end(self, trainer):
      if not self.catch_exception:
          fitlog.finish()
  
file_path: fastNLP/fastNLP/core/callbacks/fitlog_callback.py
imports: import os
  from .has_monitor_callback import HasMonitorCallback
  from ...envs import _module_available
  from ...envs import get_global_rank
  from ..log import logger
label_desc: Use image node_id 6 for calling the FitlogCallback obj's underlying member method code with example usage: obj.on_train_end(trainer) without return types