From 94e416944531def8c9e8d824f43f9439ece82b91 Mon Sep 17 00:00:00 2001 From: "Paul Gauthier (aider)" Date: Tue, 17 Dec 2024 20:01:40 -0800 Subject: [PATCH] fix: Update stats to handle nested exercise directories --- benchmark/benchmark.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/benchmark/benchmark.py b/benchmark/benchmark.py index ab19761e2..0c95cbb23 100755 --- a/benchmark/benchmark.py +++ b/benchmark/benchmark.py @@ -410,7 +410,7 @@ def show_diffs(dirnames): def load_results(dirname): dirname = Path(dirname) - all_results = [json.loads(fname.read_text()) for fname in dirname.glob("*/.aider.results.json")] + all_results = [json.loads(fname.read_text()) for fname in dirname.glob("*/exercises/practice/*/.aider.results.json")] return all_results @@ -418,7 +418,7 @@ def summarize_results(dirname): all_results = load_results(dirname) res = SimpleNamespace() - res.total_tests = len(list(Path(dirname).glob("*"))) + res.total_tests = len(list(Path(dirname).glob("*/exercises/practice/*"))) try: tries = max(len(results.get("tests_outcomes", [])) for results in all_results if results)