Update.
authorFrançois Fleuret <francois@fleuret.org>
Tue, 3 Sep 2024 13:22:14 +0000 (15:22 +0200)
committerFrançois Fleuret <francois@fleuret.org>
Tue, 3 Sep 2024 13:22:14 +0000 (15:22 +0200)
main.py

diff --git a/main.py b/main.py
index 2376868..6113813 100755 (executable)
--- a/main.py
+++ b/main.py
@@ -1606,7 +1606,10 @@ for n_epoch in range(current_epoch, args.nb_epochs):
             save_badness_statistics(last_n_epoch_c_quizzes, models, c_quizzes, "after")
 
         last_n_epoch_c_quizzes = n_epoch
-        nb_c_quizzes_to_generate = args.nb_train_samples // args.c_quiz_multiplier
+        nb_gpus = len(gpus)
+        nb_c_quizzes_to_generate = (
+            args.nb_train_samples // args.c_quiz_multiplier + nb_gpus - 1
+        ) // nb_gpus
 
         # --------------------------------------------------------------------