Browse Source

添加了 saver 中对于保存文件夹的打印

tags/v1.0.0beta
YWMditto 2 years ago
parent
commit
4724a7206a
1 changed files with 2 additions and 0 deletions
  1. +2
    -0
      fastNLP/core/callbacks/topk_saver.py

+ 2
- 0
fastNLP/core/callbacks/topk_saver.py View File

@@ -50,6 +50,8 @@ class Saver:
self.save_fn_name = 'save_checkpoint' if save_object == 'trainer' else 'save_model' self.save_fn_name = 'save_checkpoint' if save_object == 'trainer' else 'save_model'


self.timestamp_path = self.folder.joinpath(os.environ[FASTNLP_LAUNCH_TIME]) 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): def save(self, trainer, folder_name):
""" """


Loading…
Cancel
Save