def record_new_c_quizzes(models, quiz_machine, nb_for_train, nb_for_test):
nb_validated, nb_to_validate = 0, (nb_for_train + nb_for_test) * len(models)
- nb_generated, nb_to_generate_per_iteration = 0, nb_to_validate // 10
+ nb_generated, nb_to_generate_per_iteration = 0, nb_to_validate
start_time = time.perf_counter()
######################################################################
current_epoch = 0
+
+# We balance the computing time between training the models and
+# generating c_quizzes
+
total_time_generating_c_quizzes = 0
total_time_training_models = 0
state = torch.load(os.path.join(args.result_dir, filename))
log_string(f"successfully loaded {filename}")
current_epoch = state["current_epoch"]
- # total_time_generating_c_quizzes = state["total_time_generating_c_quizzes"]
- # total_time_training_models = state["total_time_training_models"]
+ total_time_generating_c_quizzes = state["total_time_generating_c_quizzes"]
+ total_time_training_models = state["total_time_training_models"]
except FileNotFoundError:
log_string(f"cannot find {filename}")
pass