f"keep c_quizzes {to_keep.size(0)}/{new_c_quizzes.size(0)} ({to_keep.size(0)*100/new_c_quizzes.size(0):.02f}%) total {sum([ x.size(0) for x in kept])}/{nb_to_generate}"
)
- new_c_quizzes = torch.cat(kept, dim=0)[: nb_for_train + nb_for_test]
+ new_c_quizzes = torch.cat(kept, dim=0)
+ new_c_quizzes = new_c_quizzes[
+ torch.randperm(new_c_quizzes.size(0))[: nb_for_train + nb_for_test]
+ ]
quizz_machine.store_c_quizzes(new_c_quizzes[:nb_for_train], for_train=True)
quizz_machine.store_c_quizzes(new_c_quizzes[nb_for_train:], for_train=False)