From dcddf8e4bbedbb53600f662c637420f1ba0abbd3 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Fran=C3=A7ois=20Fleuret?= Date: Wed, 18 Sep 2024 09:29:38 +0200 Subject: [PATCH] Update. --- main.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) 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 -- 2.39.5