mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-29 00:35:00 +00:00
copy
This commit is contained in:
parent
19e7823859
commit
0b01b7caf5
4 changed files with 1660 additions and 14 deletions
|
@ -1,6 +1,7 @@
|
|||
import matplotlib.pyplot as plt
|
||||
from matplotlib import rc
|
||||
from imgcat import imgcat
|
||||
from matplotlib import rc
|
||||
|
||||
|
||||
def plot_swe_bench_lite(data_file):
|
||||
with open(data_file, "r") as file:
|
||||
|
@ -22,30 +23,37 @@ def plot_swe_bench_lite(data_file):
|
|||
|
||||
rc("font", **{"family": "sans-serif", "sans-serif": ["Helvetica"], "size": 10})
|
||||
|
||||
fig, ax = plt.subplots(figsize=(10, 5))
|
||||
fig, ax = plt.subplots(figsize=(10, 6))
|
||||
ax.grid(axis="y", zorder=0, lw=0.2)
|
||||
for spine in ax.spines.values():
|
||||
spine.set_edgecolor("#DDDDDD")
|
||||
spine.set_linewidth(0.5)
|
||||
|
||||
colors = [
|
||||
"#b3e6a8" if "Aider" in model else "#b3d1e6" for model in models
|
||||
]
|
||||
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)
|
||||
|
||||
for bar in bars:
|
||||
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_title("SWE Bench Lite pass rates", fontsize=20)
|
||||
ax.set_title("SWE Bench Lite", fontsize=20)
|
||||
ax.set_ylim(0, 30)
|
||||
plt.xticks(rotation=45, ha='right', fontsize=16)
|
||||
plt.xticks(rotation=45, ha="right", fontsize=16)
|
||||
plt.tight_layout(pad=3.0)
|
||||
plt.savefig("swe_bench_lite.png")
|
||||
plt.savefig("swe_bench_lite.jpg")
|
||||
plt.savefig("swe_bench_lite.svg")
|
||||
imgcat(fig)
|
||||
|
||||
|
||||
# Example usage
|
||||
plot_swe_bench_lite("benchmark/tmp.txt")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue