- 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,
- n_epoch=n_epoch,
- result_dir=args.result_dir,
- )
+ file_name = os.path.join(args.result_dir, f"culture_c_quiz_{n_epoch:04d}_logp.dat")
+ with open(file_name, "w") as logp_file:
+ while (
+ valid_c_quizzes(quizzes_and_nb_correct_records, standard_validity).size(0)
+ < nb_to_create
+ ):
+ # Select a model at random to generate the new quizzes