Browse Source

CheckPointCallback中recover_fitlog自动识别

tags/v0.5.5
yh_cc 5 years ago
parent
commit
25948294c7
1 changed files with 4 additions and 0 deletions
  1. +4
    -0
      fastNLP/core/callback.py

+ 4
- 0
fastNLP/core/callback.py View File

@@ -898,6 +898,10 @@ class CheckPointCallback(Callback):
self.save_path = os.path.abspath(os.path.expanduser(save_path))
self.delete_when_train_finish = delete_when_train_finish
self.recover_fitlog = recovery_fitlog
try:
import fitlog
except:
self.recover_fitlog = False
if os.path.exists(os.path.expanduser(self.save_path)):
logger.info("The train will start from the checkpoint saved in {}.".format(self.save_path))
if self.recover_fitlog:


Loading…
Cancel
Save