diff --git a/tutorial/autofinetune-nlp.md b/tutorial/autofinetune-nlp.md index 5366798f02e8c7e029916ed058b8748d1094e75e..c3ccc7b22e8fcfe0e8628008dca4e16509e9dd9a 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"])))