+ def nb_validated():
+ return sum(
+ [
+ sum([x.size(0) for x in recorded[n]])
+ for n in range(args.min_to_validate, args.max_to_validate + 1)
+ ]
+ )
+
+ nb_to_create = nb_for_train + nb_for_test
+
+ warnings.warn(
+ f"{args.nb_gpts=} {args.nb_models_for_generation=} {args.min_to_validate=} {args.max_to_validate=}"
+ )
+
+ while nb_validated() < nb_to_create:
+ (
+ new_c_quizzes,
+ nb_correct,
+ ave_seq_logproba,
+ ) = quizz_machine.gang_create_c_quizzes(
+ nb=nb_to_create,
+ nb_models_for_generation=args.nb_models_for_generation,
+ models=models,
+ mode=args.generation_mode,
+ reverse_cleanup=args.reverse_cleanup,
+ min_ave_seq_logproba=min_ave_seq_logproba,