From d2479f30f76f178bed794db9cc96b064206878a2 Mon Sep 17 00:00:00 2001 From: "Paul Gauthier (aider)" Date: Wed, 14 Aug 2024 06:20:32 -0700 Subject: [PATCH] fix: Add debug prints and check for empty data in over_time.py --- benchmark/over_time.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/benchmark/over_time.py b/benchmark/over_time.py index 1c20dc336..6143c0ece 100644 --- a/benchmark/over_time.py +++ b/benchmark/over_time.py @@ -12,11 +12,23 @@ def plot_over_time(yaml_file): pass_rates = [] models = [] + print("Debug: Raw data from YAML file:") + print(data) + for entry in data: if "released" in entry and "pass_rate_2" in entry: dates.append(entry["released"]) pass_rates.append(entry["pass_rate_2"]) models.append(entry["model"].split("(")[0].strip()) + + print("Debug: Processed data:") + print("Dates:", dates) + print("Pass rates:", pass_rates) + print("Models:", models) + + if not dates or not pass_rates: + print("Error: No data to plot. Check if the YAML file is empty or if the data is in the expected format.") + return plt.rcParams["hatch.linewidth"] = 0.5 plt.rcParams["hatch.color"] = "#444444"