Update.
authorFrançois Fleuret <francois@fleuret.org>
Wed, 18 Sep 2024 07:29:38 +0000 (09:29 +0200)
committerFrançois Fleuret <francois@fleuret.org>
Wed, 18 Sep 2024 07:29:38 +0000 (09:29 +0200)
main.py

diff --git a/main.py b/main.py
index 772ef9f..44035f9 100755 (executable)
--- a/main.py
+++ b/main.py
@@ -681,6 +681,8 @@ def generate_c_quizzes(models, nb, local_device=main_device):
     last_log = -1
 
     while nb_validated < nb:
+        # Generate new quizzes
+
         model = models[torch.randint(len(models), (1,)).item()]
         model = copy.deepcopy(model).to(local_device).eval()
         generator_id = model.id
@@ -692,6 +694,9 @@ def generate_c_quizzes(models, nb, local_device=main_device):
             desc=None,
         )
 
+        # Select the ones that are solved properly by some models and
+        # not understood by others
+
         nb_correct, nb_wrong = 0, 0
 
         for i, model in enumerate(models):
@@ -708,8 +713,6 @@ def generate_c_quizzes(models, nb, local_device=main_device):
         nb_validated += to_keep.long().sum().item()
         record.append(c_quizzes[to_keep])
 
-        # log_string(f"generate_c_quizzes {nb_validated}")
-
         #####################
 
         duration = time.perf_counter() - start_time