From: François Fleuret Date: Wed, 14 Aug 2024 11:09:32 +0000 (+0200) Subject: Update. X-Git-Url: https://fleuret.org/cgi-bin/gitweb/gitweb.cgi?a=commitdiff_plain;h=10e412f3a3700de8180c9fba670eadebc5d12b2d;p=culture.git Update. --- 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) ######################################################################