mirror of
https://github.com/collinear-ai/yc-bench.git
synced 2026-04-27 17:23:15 +00:00
update readme; clean up unused files; black formatting
This commit is contained in:
parent
97b1bdb2e0
commit
38eaea7d0c
82 changed files with 4174 additions and 3334 deletions
|
|
@ -3,12 +3,14 @@
|
|||
Usage:
|
||||
uv run python scripts/plot_single_run.py db/fast_test_1_openai_gpt-5.2-2025-12-11.db
|
||||
"""
|
||||
|
||||
import argparse
|
||||
import sqlite3
|
||||
from datetime import datetime
|
||||
from pathlib import Path
|
||||
|
||||
import matplotlib
|
||||
|
||||
matplotlib.use("Agg")
|
||||
import matplotlib.pyplot as plt
|
||||
import matplotlib.dates as mdates
|
||||
|
|
@ -19,7 +21,9 @@ INITIAL_FUNDS_CENTS = 25_000_000
|
|||
def parse_args():
|
||||
p = argparse.ArgumentParser()
|
||||
p.add_argument("db", help="Path to the SQLite DB file")
|
||||
p.add_argument("--out", default=None, help="Output PNG path (default: plots/<db_stem>.png)")
|
||||
p.add_argument(
|
||||
"--out", default=None, help="Output PNG path (default: plots/<db_stem>.png)"
|
||||
)
|
||||
return p.parse_args()
|
||||
|
||||
|
||||
|
|
@ -59,11 +63,22 @@ def make_plot(times, balances, db_name, out_path):
|
|||
ax.axhline(250_000, color="#555577", linewidth=0.7, linestyle=":", alpha=0.6)
|
||||
|
||||
ax.plot(times, balances, color="#4fc3f7", linewidth=2, alpha=0.95)
|
||||
ax.scatter([times[-1]], [balances[-1]], color="#4fc3f7", s=80,
|
||||
marker="*" if balances[-1] > 0 else "x", linewidths=2, zorder=5)
|
||||
ax.scatter(
|
||||
[times[-1]],
|
||||
[balances[-1]],
|
||||
color="#4fc3f7",
|
||||
s=80,
|
||||
marker="*" if balances[-1] > 0 else "x",
|
||||
linewidths=2,
|
||||
zorder=5,
|
||||
)
|
||||
|
||||
ax.yaxis.set_major_formatter(
|
||||
plt.FuncFormatter(lambda x, _: f"${x/1000:.0f}K" if abs(x) < 1_000_000 else f"${x/1_000_000:.1f}M")
|
||||
plt.FuncFormatter(
|
||||
lambda x, _: (
|
||||
f"${x/1000:.0f}K" if abs(x) < 1_000_000 else f"${x/1_000_000:.1f}M"
|
||||
)
|
||||
)
|
||||
)
|
||||
ax.xaxis.set_major_formatter(mdates.DateFormatter("%b '%y"))
|
||||
ax.xaxis.set_major_locator(mdates.MonthLocator(interval=1))
|
||||
|
|
@ -73,8 +88,15 @@ def make_plot(times, balances, db_name, out_path):
|
|||
ax.set_title(f"{db_name} — final: {final}", color="white", fontsize=12, pad=10)
|
||||
ax.set_ylabel("Balance (USD)", color="#aaaaaa", fontsize=9)
|
||||
ax.grid(axis="y", color="#333344", linewidth=0.5, linestyle="--")
|
||||
ax.text(0.005, 0.03, "← bankruptcy", transform=ax.transAxes,
|
||||
color="#e74c3c", fontsize=7.5, alpha=0.6)
|
||||
ax.text(
|
||||
0.005,
|
||||
0.03,
|
||||
"← bankruptcy",
|
||||
transform=ax.transAxes,
|
||||
color="#e74c3c",
|
||||
fontsize=7.5,
|
||||
alpha=0.6,
|
||||
)
|
||||
|
||||
plt.tight_layout()
|
||||
out_path.parent.mkdir(parents=True, exist_ok=True)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue