From 10e412f3a3700de8180c9fba670eadebc5d12b2d Mon Sep 17 00:00:00 2001 From: =?utf8?q?Fran=C3=A7ois=20Fleuret?= Date: Wed, 14 Aug 2024 13:09:32 +0200 Subject: [PATCH] Update. --- main.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/main.py b/main.py index 0bbcc6b..4326491 100755 --- a/main.py +++ b/main.py @@ -196,7 +196,7 @@ else: if args.resume: if not os.path.isdir(args.result_dir): - print("Trying to resume with a non-existing result dir {args.result_dir}.") + print(f"Trying to resume with a non-existing result dir {args.result_dir}.") exit(1) else: try: @@ -452,7 +452,7 @@ c_quizzes_procedure = [ ###################################################################### -def save_additional_results(model, models): +def save_additional_results(model, models, c_quizzes_procedure): # Save generated quizzes with the successive generation steps recorder = [] @@ -945,6 +945,10 @@ if args.dirty_debug: args.nb_new_c_quizzes_for_train = 100 args.nb_new_c_quizzes_for_test = 10 +if args.test == "gen": + save_additional_results(model, models, c_quizzes_procedure) + exit(0) + ###################################################################### for n_epoch in range(current_epoch, args.nb_epochs): @@ -1014,7 +1018,7 @@ for n_epoch in range(current_epoch, args.nb_epochs): log_string(f"wrote {filename}") for model in weakest_models: - save_additional_results(model, models) + save_additional_results(model, models, c_quizzes_procedure) ###################################################################### -- 2.39.5