projects
/
culture.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Update.
[culture.git]
/
main.py
diff --git
a/main.py
b/main.py
index
a954af6
..
43241dd
100755
(executable)
--- a/
main.py
+++ b/
main.py
@@
-249,8
+249,10
@@
if args.problem == "sky":
nb_iterations=args.sky_nb_iterations,
speed=args.sky_speed,
)
nb_iterations=args.sky_nb_iterations,
speed=args.sky_speed,
)
+ back_accuracy = False
elif args.problem == "reasoning":
problem = reasoning.Reasoning(device=device)
elif args.problem == "reasoning":
problem = reasoning.Reasoning(device=device)
+ back_accuracy = True
else:
raise ValueError
else:
raise ValueError
@@
-258,6
+260,7
@@
quizz_machine = quizz_machine.QuizzMachine(
problem=problem,
nb_train_samples=args.nb_train_samples,
nb_test_samples=args.nb_test_samples,
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,
batch_size=args.physical_batch_size,
result_dir=args.result_dir,
logger=log_string,
@@
-508,6
+511,9
@@
log_string(f"nb_parameters {nb_parameters} ({int(nb_parameters/1e6)}M)")
for n_epoch in range(args.nb_epochs):
log_string(f"--- epoch {n_epoch} ----------------------------------------")
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))
# Select, improve, and eval the worst model
weakest_model = min(models, key=lambda m: float(m.main_test_accuracy))
@@
-528,9
+534,6
@@
for n_epoch in range(args.nb_epochs):
f"test_set_composition w_quizzes {quizz_machine.nb_batch_w_quizzes} c_quizzes {quizz_machine.nb_batch_c_quizzes}"
)
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)
# Replace a fraction of the w_quizzes with fresh ones
quizz_machine.renew_w_quizzes(args.nb_train_samples // args.nb_gpts)