Change pass rate label to lowercase and update colors in SWE Bench Lite plot.

This commit is contained in:
Paul Gauthier 2024-05-22 15:14:37 -07:00
parent 5761218b9a
commit d1bbcb9bf8

View file

@ -27,7 +27,7 @@ def plot_swe_bench_lite(data_file):
spine.set_linewidth(0.5) spine.set_linewidth(0.5)
colors = [ colors = [
"red" if "Aider" in model else "blue" 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.5, zorder=3)
@ -36,14 +36,13 @@ def plot_swe_bench_lite(data_file):
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)
plt.xticks(rotation=45, ha='right') plt.xticks(rotation=45, ha='right')
plt.tight_layout() plt.tight_layout()
plt.savefig("swe_bench_lite.png") plt.savefig("swe_bench_lite.png")
plt.savefig("swe_bench_lite.svg") plt.savefig("swe_bench_lite.svg")
imgcat(fig) imgcat(fig)
plt.show()
# Example usage # Example usage
plot_swe_bench_lite("benchmark/tmp.txt") plot_swe_bench_lite("benchmark/tmp.txt")