From: François Fleuret Date: Thu, 11 Jul 2024 06:40:39 +0000 (+0200) Subject: Update. X-Git-Url: https://fleuret.org/cgi-bin/gitweb/gitweb.cgi?a=commitdiff_plain;h=07c065e77f1d2a775814ec402752a4a8eb6c7574;p=culture.git Update. --- diff --git a/grids.py b/grids.py index d1653ee..20a964b 100755 --- a/grids.py +++ b/grids.py @@ -942,6 +942,15 @@ class Grids(problem.Problem): nrow, ) + def save_some_examples(self, result_dir): + nb, nrow = 72, 4 + for t in self.all_tasks(): + print(t.__name__) + prompts, answers = self.generate_prompts_and_answers_(nb, tasks=[t]) + self.save_quizzes( + result_dir, t.__name__, prompts[:nb], answers[:nb], nrow=nrow + ) + ###################################################################### diff --git a/main.py b/main.py index e6806d4..5956be5 100755 --- a/main.py +++ b/main.py @@ -253,6 +253,8 @@ elif args.problem == "grids": else: raise ValueError +problem.save_some_examples(args.result_dir) + quiz_machine = quiz_machine.QuizMachine( problem=problem, nb_train_samples=args.nb_train_samples, diff --git a/problem.py b/problem.py index 617b2a8..7eeb6b4 100755 --- a/problem.py +++ b/problem.py @@ -88,3 +88,6 @@ class Problem: prompts, answers = prompts[:-k], answers[:-k] return prompts, answers + + def save_some_examples(self, result_dir): + pass