From: François Fleuret <francois@fleuret.org>
Date: Wed, 18 Sep 2024 07:29:38 +0000 (+0200)
Subject: Update.
X-Git-Url: https://fleuret.org/cgi-bin/gitweb/gitweb.cgi?a=commitdiff_plain;h=dcddf8e4bbedbb53600f662c637420f1ba0abbd3;p=culture.git

Update.
---

diff --git a/main.py b/main.py
index 772ef9f..44035f9 100755
--- 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