From a08389e966321cf2787737475f2140623e6f0878 Mon Sep 17 00:00:00 2001 From: Steffy-zxf <48793257+Steffy-zxf@users.noreply.github.com> Date: Wed, 25 Sep 2019 10:49:53 +0800 Subject: [PATCH] Update autofinetune-nlp.md --- tutorial/autofinetune-nlp.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tutorial/autofinetune-nlp.md b/tutorial/autofinetune-nlp.md index 5366798f..c3ccc7b2 100644 --- a/tutorial/autofinetune-nlp.md +++ b/tutorial/autofinetune-nlp.md @@ -133,8 +133,9 @@ if __name__ == '__main__': eval_avg_score, eval_avg_loss, eval_run_speed = cls_task._calculate_metrics(run_states) # Move ckpt/best_model to the defined saved parameters directory - if is_path_valid(args.saved_params_dir) and os.path.exists(config.checkpoint_dir+"/best_model/"): - shutil.copytree(config.checkpoint_dir+"/best_model/", args.saved_params_dir) + best_model_dir = os.path.join(config.checkpoint_dir, "best_model") + if is_path_valid(args.saved_params_dir) and os.path.exists(best_model_dir): + shutil.copytree(best_model_dir, args.saved_params_dir) shutil.rmtree(config.checkpoint_dir) print("AutoFinetuneEval"+"\t"+str(float(eval_avg_score["acc"]))) -- GitLab