parser.add_argument("--nb_test_alien_samples", type=int, default=0)
-parser.add_argument("--nb_c_quizzes", type=int, default=10000)
+parser.add_argument("--nb_c_quizzes", type=int, default=2500)
parser.add_argument("--c_quiz_multiplier", type=int, default=1)
nb_wrong >= args.nb_have_to_be_wrong
)
- nb_validated += to_keep.long().sum()
+ nb_validated += to_keep.long().sum().item()
record.append(c_quizzes[to_keep])
- log_string(f"generate_c_quizzes {nb_validated}")
+ # log_string(f"generate_c_quizzes {nb_validated}")
#####################
if last_log < 0 or duration > last_log + 10:
last_log = duration
if nb_validated > 0:
- if nb_validated < wanted_nb:
- d = (wanted_nb - nb_validated) * duration / nb_validated
+ if nb_validated < nb:
+ d = (nb - nb_validated) * duration / nb_validated
e = (
datetime.datetime.now() + datetime.timedelta(seconds=d)
).strftime("%a %H:%M")
duration = time.perf_counter() - start_time
- log_string(f"generate_c_quizz_speed {int(3600 * wanted_nb / duration)}/h")
+ log_string(f"generate_c_quizz_speed {int(3600 * nb / duration)}/h")
return torch.cat(record)