First multi-prompt result: Qwen 6-bit TTS = 49 (vs 82 LFU) + per-prompt schema
TTS grade for qwen3.6-35b-a3b-6bit-mlx: 49/100 Critical (same model that scored 82 on LFU). File doesn't parse + bounded-concurrency is fake (1 worker + inner semaphore = real concurrency 1). Per-task signal: strong on data-structures, weak on async-pipeline work. Schema: prompt_id + PILLARS_BY_PROMPT so each entry uses its own 5 pillars. TODO_submission_tool.md sketches the grade-as-a-tool idea for later. Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
+53
-12
@@ -11,14 +11,40 @@ DATA = os.path.join(HERE, "data", "benchmark_history.json")
|
||||
OUT_DASH = os.path.join(HERE, "dashboard.html")
|
||||
PAGES_DIR = os.path.join(HERE, "pages")
|
||||
|
||||
PILLARS = ["complexity", "concurrency", "isolation", "memory_edge_cases", "test_integrity"]
|
||||
PILLAR_LABELS = {
|
||||
"complexity": "Complexity (O(1))",
|
||||
"concurrency": "Concurrency / Races",
|
||||
"isolation": "Tx Isolation",
|
||||
"memory_edge_cases": "Memory & Edges",
|
||||
"test_integrity": "Test Integrity",
|
||||
# Per-prompt pillar definitions. Each prompt is graded on 5 pillars (0-20 each = 100),
|
||||
# but the pillar NAMES differ by prompt type. The generator reads the entry's own pillars.
|
||||
PILLARS_BY_PROMPT = {
|
||||
"lfu": ["complexity", "concurrency", "isolation", "memory_edge_cases", "test_integrity"],
|
||||
"tts": ["complexity", "concurrency", "error_handling", "resource_safety", "test_integrity"],
|
||||
"mcp": ["schema_io", "transport", "error_handling", "state_safety", "test_integrity"],
|
||||
"rust": ["ownership", "concurrency", "error_handling", "cancellation", "test_integrity"],
|
||||
"data": ["query_safety", "pooling", "transactions", "pagination", "test_integrity"],
|
||||
"automation": ["idempotency", "retry_backoff", "checkpointing", "signal_handling", "test_integrity"],
|
||||
}
|
||||
PILLARS = PILLARS_BY_PROMPT["lfu"] # default for any code that still references the global
|
||||
PILLAR_LABELS = {
|
||||
# lfu
|
||||
"complexity": "Complexity (O(1))", "concurrency": "Concurrency / Races",
|
||||
"isolation": "Tx Isolation", "memory_edge_cases": "Memory & Edges",
|
||||
"test_integrity": "Test Integrity",
|
||||
# tts / shared
|
||||
"error_handling": "Error Handling", "resource_safety": "Resource & State Safety",
|
||||
# mcp
|
||||
"schema_io": "Schema / I/O", "transport": "Transport",
|
||||
"state_safety": "State Safety",
|
||||
# rust
|
||||
"ownership": "Ownership / Types", "cancellation": "Cancellation / Shutdown",
|
||||
# data
|
||||
"query_safety": "Query Safety", "pooling": "Pooling", "transactions": "Transactions", "pagination": "Pagination",
|
||||
# automation
|
||||
"idempotency": "Idempotency", "retry_backoff": "Retry / Backoff",
|
||||
"checkpointing": "Checkpointing", "signal_handling": "Signal Handling",
|
||||
}
|
||||
|
||||
def pillars_for(m):
|
||||
"""Return the 5 pillar keys for a model entry based on its prompt_id."""
|
||||
pid = m.get("prompt_id", "lfu")
|
||||
return PILLARS_BY_PROMPT.get(pid, PILLARS)
|
||||
|
||||
# ---- cyberpunk palette ----
|
||||
NEON_CYAN = "#00ffc8"
|
||||
@@ -144,6 +170,13 @@ tr:hover .score-bar > i{box-shadow:0 0 12px currentColor}
|
||||
.fmt-mlx{color:var(--cyan);background:rgba(0,255,200,0.08)}
|
||||
.fmt-gguf{color:var(--mag);background:rgba(255,43,214,0.08)}
|
||||
.fmt-cloud{color:var(--blue);background:rgba(91,139,255,0.08)}
|
||||
.prompt-chip{display:inline-block;font-size:.62rem;letter-spacing:.06em;padding:2px 6px;border-radius:3px;border:1px solid currentColor;font-family:'Fira Code',monospace;text-transform:uppercase}
|
||||
.p-lfu{color:var(--cyan);background:rgba(0,255,200,0.06)}
|
||||
.p-tts{color:var(--lime);background:rgba(182,255,58,0.06)}
|
||||
.p-mcp{color:var(--blue);background:rgba(91,139,255,0.06)}
|
||||
.p-rust{color:var(--amber);background:rgba(255,176,0,0.06)}
|
||||
.p-data{color:var(--mag);background:rgba(255,43,214,0.06)}
|
||||
.p-automation{color:#c084fc;background:rgba(192,132,252,0.06)}
|
||||
/* format/quant showdown cards */
|
||||
.fcard{background:var(--panel2);border:1px solid rgba(255,255,255,0.06);border-radius:6px;padding:12px 14px;margin-bottom:10px}
|
||||
.fcard-h{display:flex;justify-content:space-between;align-items:baseline;gap:10px;flex-wrap:wrap;margin-bottom:9px}
|
||||
@@ -204,6 +237,7 @@ FOOT = """</div>
|
||||
</body></html>"""
|
||||
|
||||
def render_dashboard(data):
|
||||
# leaderboard ranked by score (prompt badge distinguishes same-model entries across prompts)
|
||||
models = sorted(data["models"], key=lambda m: -m["total_score"])
|
||||
n = len(models)
|
||||
avg = sum(m["total_score"] for m in models) / n if n else 0
|
||||
@@ -232,9 +266,11 @@ def render_dashboard(data):
|
||||
else:
|
||||
fmt_chip = f'<span class="fmt-chip">{esc(m.get("format") or "—")}</span>'
|
||||
bar_color = col
|
||||
pid = m.get("prompt_id", "lfu")
|
||||
pchip = f'<span class="prompt-chip p-{pid}">{pid}</span>' if pid != "lfu" else '<span class="prompt-chip p-lfu">lfu</span>'
|
||||
rows.append(f"""<tr>
|
||||
<td class="rank {'top' if i<=3 else ''}">#{i}</td>
|
||||
<td><div class="model-name">{esc(m['model_name'])}</div>{caveat}</td>
|
||||
<td><div class="model-name">{esc(m['model_name'])} {pchip}</div>{caveat}</td>
|
||||
<td><span class="quant-cell mono">{esc(m['quant'])}</span></td>
|
||||
<td>{fmt_chip}</td>
|
||||
<td class="mono">{speed_str(m)} <span style="color:var(--dim);font-size:.72rem">t/s</span></td>
|
||||
@@ -257,9 +293,11 @@ def render_dashboard(data):
|
||||
bar_speed = json.dumps([m["tok_sec"] for m in local_sorted])
|
||||
bar_score = json.dumps([m["total_score"] for m in local_sorted])
|
||||
|
||||
# radar compares top models on the LFU exam (apples-to-apples, same 5 axes)
|
||||
radar_lfu = [m for m in models if m.get("prompt_id", "lfu") == "lfu"][:3]
|
||||
radar_labels = json.dumps([PILLAR_LABELS[p] for p in PILLARS])
|
||||
radar_sets = []
|
||||
for idx, m in enumerate(radar_models):
|
||||
for idx, m in enumerate(radar_lfu):
|
||||
col = SERIES[idx % len(SERIES)]
|
||||
radar_sets.append({
|
||||
"label": m["model_name"][:24],
|
||||
@@ -374,7 +412,9 @@ def render_dashboard(data):
|
||||
n_crit = sum(1 for m in local if m["verdict"] == "Critical Bugs")
|
||||
n_slots = sum(1 for m in local if scans[m["id"]]["slots"])
|
||||
n_mono = sum(1 for m in local if scans[m["id"]]["monotonic"])
|
||||
pillar_avg = {p: round(sum(m["breakdown"][p] for m in local)/len(local), 1) for p in PILLARS}
|
||||
# findings stats are LFU-exam-scoped (the common comparison set)
|
||||
lfu_models = [m for m in local if m.get("prompt_id", "lfu") == "lfu"]
|
||||
pillar_avg = {p: round(sum(m["breakdown"][p] for m in lfu_models)/len(lfu_models), 1) for p in PILLARS}
|
||||
weakest = min(PILLARS, key=lambda p: pillar_avg[p])
|
||||
|
||||
def _fcard(num, label, sub):
|
||||
@@ -519,14 +559,15 @@ new Chart(document.getElementById('radar'),{{
|
||||
|
||||
def render_detail(m, data):
|
||||
col, chip = verdict_meta(m["verdict"])
|
||||
m_pillars = pillars_for(m) # each entry uses its own prompt's 5 pillars
|
||||
# derive "what went right" from high pillars, "wrong" from low + critical_bugs
|
||||
bd = m["breakdown"]
|
||||
ranked = sorted(PILLARS, key=lambda p: -bd[p])
|
||||
ranked = sorted(m_pillars, key=lambda p: -bd[p])
|
||||
rights = [f"{PILLAR_LABELS[p]} ({bd[p]}/20)" for p in ranked if bd[p] >= 16]
|
||||
wrongs_pillars = [f"{PILLAR_LABELS[p]} ({bd[p]}/20)" for p in ranked if bd[p] <= 13]
|
||||
|
||||
pillar_bars = ""
|
||||
for p in PILLARS:
|
||||
for p in m_pillars:
|
||||
v = bd[p]
|
||||
c = NEON_LIME if v >= 17 else (NEON_AMBER if v >= 13 else NEON_RED)
|
||||
pillar_bars += f"""
|
||||
|
||||
Reference in New Issue
Block a user