From 6badf5ea1d3500777545c5cc03f7ff29e7a94b61 Mon Sep 17 00:00:00 2001 From: "Paul Gauthier (aider)" Date: Wed, 18 Dec 2024 12:47:14 -0800 Subject: [PATCH] feat: Add cumulative sum column to distribution table --- benchmark/problem_stats.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/benchmark/problem_stats.py b/benchmark/problem_stats.py index 317c52f77..ccfd5ad02 100755 --- a/benchmark/problem_stats.py +++ b/benchmark/problem_stats.py @@ -164,14 +164,16 @@ def analyze_exercise_solutions(dirs=None, topn=None): # Distribution table of how many models solved each exercise print("\nDistribution of solutions:") - print("Models Exercises") - print("-" * 20) + print("Models Exercises Cumulative") + print("-" * 35) counts = [0] * (total_models + 1) for ex, models in exercise_solutions.items(): counts[len(models)] += 1 + cumsum = 0 for i, count in enumerate(counts): - print(f"{i:>6d} {count:>9d}") + cumsum += count + print(f"{i:>6d} {count:>9d} {cumsum:>10d}") if __name__ == "__main__":