From 4724a7206af60c91145b056d09c67edd01556ae3 Mon Sep 17 00:00:00 2001 From: YWMditto Date: Sun, 10 Jul 2022 17:51:17 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E4=BA=86=20saver=20=E4=B8=AD?= =?UTF-8?q?=E5=AF=B9=E4=BA=8E=E4=BF=9D=E5=AD=98=E6=96=87=E4=BB=B6=E5=A4=B9?= =?UTF-8?q?=E7=9A=84=E6=89=93=E5=8D=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- fastNLP/core/callbacks/topk_saver.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/fastNLP/core/callbacks/topk_saver.py b/fastNLP/core/callbacks/topk_saver.py index 1a4de8d5..21a8961f 100644 --- a/fastNLP/core/callbacks/topk_saver.py +++ b/fastNLP/core/callbacks/topk_saver.py @@ -50,6 +50,8 @@ class Saver: self.save_fn_name = 'save_checkpoint' if save_object == 'trainer' else 'save_model' self.timestamp_path = self.folder.joinpath(os.environ[FASTNLP_LAUNCH_TIME]) + # 打印这次运行时 checkpoint 所保存在的文件夹,因为这个文件夹是根据时间实时生成的,因此需要打印出来防止用户混淆; + logger.info(f"The checkpoint will be saved in this folder for this time: {self.timestamp_path}.") def save(self, trainer, folder_name): """