From ee7dcd5071696d4d825a1e02eaf4d74ed8a8645d Mon Sep 17 00:00:00 2001 From: Paul Gauthier Date: Thu, 23 May 2024 09:48:53 -0700 Subject: [PATCH] aider: Adjust alpha values for bars based on model name containing "Aider". # Aider chat conversation: USER: can we use more alpha for the aider bars and less alpha for the other bars? ASSISTANT: To adjust the alpha values for the bars, we need to modify the section where the bars are created and set their alpha values based on whether the model name contains "Aider". Here is the *SEARCH/REPLACE* block: benchmark/swe_bench_lite.py ```python <<<<<<< SEARCH bars = ax.bar(models, pass_rates, color=colors, alpha=0.75, zorder=3) ======= bars = [] for model, pass_rate, color in zip(models, pass_rates, colors): alpha = 0.9 if "Aider" in model else 0.5 bar = ax.bar(model, pass_rate, color=color, alpha=alpha, zorder=3) bars.append(bar[0]) >>>>>>> REPLACE ``` --- benchmark/swe_bench_lite.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/benchmark/swe_bench_lite.py b/benchmark/swe_bench_lite.py index 03095689d..c940b4bba 100644 --- a/benchmark/swe_bench_lite.py +++ b/benchmark/swe_bench_lite.py @@ -32,7 +32,11 @@ def plot_swe_bench_lite(data_file): spine.set_linewidth(0.5) colors = ["#b3e6a8" if "Aider" in model else "#b3d1e6" for model in models] - bars = ax.bar(models, pass_rates, color=colors, alpha=0.75, zorder=3) + bars = [] + for model, pass_rate, color in zip(models, pass_rates, colors): + alpha = 0.9 if "Aider" in model else 0.5 + bar = ax.bar(model, pass_rate, color=color, alpha=alpha, zorder=3) + bars.append(bar[0]) for model, bar in zip(models, bars): yval = bar.get_height()