import ffutils
import mygpt
-import sky, lang, quizz_machine
+import sky, reasoning, quizz_machine
# world quizzes vs. culture quizzes
nb_iterations=args.sky_nb_iterations,
speed=args.sky_speed,
)
-elif args.problem == "lang":
- problem = lang.Lang()
+ back_accuracy = False
+elif args.problem == "reasoning":
+ problem = reasoning.Reasoning(device=device)
+ back_accuracy = True
else:
raise ValueError
problem=problem,
nb_train_samples=args.nb_train_samples,
nb_test_samples=args.nb_test_samples,
+ back_accuracy=back_accuracy,
batch_size=args.physical_batch_size,
result_dir=args.result_dir,
logger=log_string,
for n_epoch in range(args.nb_epochs):
log_string(f"--- epoch {n_epoch} ----------------------------------------")
+ cta = " ".join([f"{float(m.main_test_accuracy):.04f}" for m in models])
+ log_string(f"current_test_accuracies {cta}")
+
# Select, improve, and eval the worst model
weakest_model = min(models, key=lambda m: float(m.main_test_accuracy))
f"test_set_composition w_quizzes {quizz_machine.nb_batch_w_quizzes} c_quizzes {quizz_machine.nb_batch_c_quizzes}"
)
- cta = " ".join([f"{float(m.main_test_accuracy):.04f}" for m in models])
- log_string(f"current_test_accuracies {cta}")
-
# Replace a fraction of the w_quizzes with fresh ones
quizz_machine.renew_w_quizzes(args.nb_train_samples // args.nb_gpts)