From 2c83287c463b15f69fefa4f174433cf95fd4cc7f Mon Sep 17 00:00:00 2001 From: Paul Gauthier Date: Wed, 8 Nov 2023 06:21:16 -0800 Subject: [PATCH] refac --- benchmark/benchmark.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/benchmark/benchmark.py b/benchmark/benchmark.py index 0b04eb014..8979180f8 100755 --- a/benchmark/benchmark.py +++ b/benchmark/benchmark.py @@ -114,12 +114,17 @@ def show_stats(dirnames): # use the average in the main bar rows[repeat_row]["pass_rate_2"] = repeat_avg + else: + repeat_hi = repeat_lo = repeat_avg = None df = pd.DataFrame.from_records(rows) df.sort_values(by=["model", "edit_format"], inplace=True) dump(df) + plot_outcomes(df, repeats, repeat_hi, repeat_lo, repeat_avg) + +def plot_outcomes(df, repeats, repeat_hi, repeat_lo, repeat_avg): tries = [df.groupby(["model", "edit_format"])["pass_rate_2"].mean()] if True: tries += [df.groupby(["model", "edit_format"])["pass_rate_1"].mean()]