mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-30 09:14:59 +00:00
Update plot_swe_bench_lite function to handle model names with '|' by replacing it with newline character and adjusting bar colors and transparency.
This commit is contained in:
parent
5ef96a32e2
commit
6765b12a7d
1 changed files with 4 additions and 2 deletions
|
@ -12,6 +12,8 @@ def plot_swe_bench_lite(data_file):
|
||||||
for line in lines:
|
for line in lines:
|
||||||
if line.strip():
|
if line.strip():
|
||||||
pass_rate, model = line.split("%")
|
pass_rate, model = line.split("%")
|
||||||
|
model = model.strip()
|
||||||
|
model = model.replace("|", "\n")
|
||||||
models.append(model.strip())
|
models.append(model.strip())
|
||||||
pass_rates.append(float(pass_rate.strip()))
|
pass_rates.append(float(pass_rate.strip()))
|
||||||
|
|
||||||
|
@ -29,13 +31,13 @@ def plot_swe_bench_lite(data_file):
|
||||||
colors = [
|
colors = [
|
||||||
"#b3e6a8" if "Aider" in model else "#b3d1e6" for model in models
|
"#b3e6a8" if "Aider" in model else "#b3d1e6" for model in models
|
||||||
]
|
]
|
||||||
bars = ax.bar(models, pass_rates, color=colors, alpha=0.5, zorder=3)
|
bars = ax.bar(models, pass_rates, color=colors, alpha=0.75, zorder=3)
|
||||||
|
|
||||||
for bar in bars:
|
for bar in bars:
|
||||||
yval = bar.get_height()
|
yval = bar.get_height()
|
||||||
ax.text(bar.get_x() + bar.get_width()/2, yval + 0.5, f'{yval}%', ha='center', va='bottom', fontsize=12, alpha=0.75)
|
ax.text(bar.get_x() + bar.get_width()/2, yval + 0.5, f'{yval}%', ha='center', va='bottom', fontsize=12, alpha=0.75)
|
||||||
|
|
||||||
ax.set_xlabel("Models", fontsize=18)
|
#ax.set_xlabel("Models", fontsize=18)
|
||||||
ax.set_ylabel("Pass rate (%)", fontsize=18)
|
ax.set_ylabel("Pass rate (%)", fontsize=18)
|
||||||
ax.set_title("SWE Bench Lite pass rates", fontsize=20)
|
ax.set_title("SWE Bench Lite pass rates", fontsize=20)
|
||||||
ax.set_ylim(0, 30)
|
ax.set_ylim(0, 30)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue