######################################################################
if args.check:
- args.nb_train_samples = 2500
- args.nb_test_samples = 100
+ args.nb_train_samples = 25000
+ args.nb_test_samples = 1000
if args.physical_batch_size is None:
args.physical_batch_size = args.batch_size
desired_average_logits=None,
):
kept = []
- nb_generated_tokens, sum_logits = 0, 0
+
+ sum_logits = 0
while sum([x.size(0) for x in kept]) < nb_for_train + nb_for_test:
nb_to_generate = 4 * (nb_for_train + nb_for_test)
- new_quizzes, nb_correct, average_logits = task.create_new_quizzes(
+
+ new_quizzes, nb_correct, _sum_logits = task.create_new_quizzes(
n_epoch=n_epoch,
result_dir=args.result_dir,
logger=log_string,
desired_average_logits=desired_average_logits,
)
- nb_generated_tokens += new_quizzes.numel()
- sum_logits += average_logits * new_quizzes.numel()
+ sum_logits += _sum_logits
to_keep = new_quizzes[nb_correct == len(other_models) - 1]
log_string(
log_string,
)
- return sum_logits / nb_generated_tokens
+ return sum_logits / new_quizzes.size(0)
######################################################################
if args.check:
accuracy_to_make_quizzes = 0.0
- nb_new_quizzes_for_train = 10
+ nb_new_quizzes_for_train = 100
nb_new_quizzes_for_test = 10
desired_average_logits = None