From 59308c20c651daa64d9f4ed700ed76598eca74a8 Mon Sep 17 00:00:00 2001 From: "Paul Gauthier (aider)" Date: Tue, 17 Dec 2024 14:15:40 -0800 Subject: [PATCH] feat: Number exercises in the table --- benchmark/problem_stats.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/benchmark/problem_stats.py b/benchmark/problem_stats.py index d0e09edc0..910bfc3b7 100755 --- a/benchmark/problem_stats.py +++ b/benchmark/problem_stats.py @@ -94,10 +94,10 @@ def analyze_exercise_solutions(topn=None): max_name_len = max(len(testcase) for testcase in all_exercises) total_models = len(leaderboard) - for testcase, models in sorted_exercises: + for i, (testcase, models) in enumerate(sorted_exercises, 1): num_solved = len(models) percent = (num_solved / total_models) * 100 - print(f"{testcase:<{max_name_len}} : {num_solved:>3} solved ({percent:>5.1f}%)") + print(f"{i:>3}. {testcase:<{max_name_len}} : {num_solved:>3} solved ({percent:>5.1f}%)") print("\nSummary:") print(f"Total exercises solved at least once: {len(exercise_solutions)}")