evalstate HF Staff commited on
Commit
2c8304f
·
verified ·
1 Parent(s): 1d7c8ce

Shared page code: labels from data (for DeepSWE annotated)

Browse files
Files changed (5) hide show
  1. common.js +1 -1
  2. home.js +14 -3
  3. hub-link.js +1 -1
  4. row.js +6 -5
  5. style.css +1 -0
common.js CHANGED
@@ -76,7 +76,7 @@
76
  }
77
  const problemChip = p => { const c = el("span", "fl fl--" + (p.level === "bad" ? "bad" : "warn"), p.text); c.title = p.help; return c; };
78
 
79
- /* The attempt strip: one column per task, five squares each. */
80
  function strip(r, opts = {}) {
81
  const s = el("div", "strip" + (opts.large ? " strip--lg" : ""));
82
  D.tasks.forEach(task => {
 
76
  }
77
  const problemChip = p => { const c = el("span", "fl fl--" + (p.level === "bad" ? "bad" : "warn"), p.text); c.title = p.help; return c; };
78
 
79
+ /* The attempt strip: one column per task, a square per attempt. */
80
  function strip(r, opts = {}) {
81
  const s = el("div", "strip" + (opts.large ? " strip--lg" : ""));
82
  D.tasks.forEach(task => {
home.js CHANGED
@@ -55,6 +55,7 @@
55
  return out;
56
  }
57
  const hasLb = D.rows.some(r => r.lb.source !== "recount");
 
58
  const ESTIMATE_HELP = "our estimate: rewarded trials, less review leads (an unexcused high or critical finding) and trials partly run by a fallback model";
59
 
60
  const compactN = n => (n >= 1e6 ? (n / 1e6).toFixed(1) + "M" : n >= 1e3 ? Math.round(n / 1e3) + "k" : String(n));
@@ -67,8 +68,8 @@
67
  };
68
  function board() {
69
  const cols = [
70
- { name: "89 tasks × 5 attempts, easiest first", cls: "l" },
71
- { name: hasLb ? "Leader­board" : "Score", sort: "score", help: hasLb ? "published accuracy ± 95% half-width" : "rewarded trials ± 95% half-width over the five attempt rounds" },
72
  { name: "Our estimate", sort: "adj", help: ESTIMATE_HELP },
73
  { name: "Leads", sort: "leads", help: "rewarded trials with an unexcused high or critical finding" },
74
  { name: "Notes", cls: "l" },
@@ -81,7 +82,7 @@
81
  tr.append(rowHead(r));
82
  const s = el("td", "l"); s.append(strip(r, { leadsOnly: leadsOnly.checked })); tr.append(s);
83
  const sc = el("td"); sc.append(num(fmt1(r.lb.accuracy), "n big"), el("span", "pm", "±" + fmt1(r.lb.ci95)));
84
- sc.title = r.scan.rewarded + " of " + r.scan.trials + " trials rewarded"; tr.append(sc);
85
  const ad = el("td");
86
  const delta = adj.accuracy - r.lb.accuracy;
87
  ad.append(num(fmt1(adj.accuracy), "n big" + (delta <= -1 ? " hot" : "")));
@@ -292,5 +293,15 @@
292
  notes.append(el("dt", null, r.agent), el("dd", null, note));
293
  });
294
 
 
 
 
 
 
 
 
 
 
 
295
  board(); accounting(); detail(); families(); checks();
296
  })();
 
55
  return out;
56
  }
57
  const hasLb = D.rows.some(r => r.lb.source !== "recount");
58
+ const SITE = { attempts: 5, ...(D.site || {}) };
59
  const ESTIMATE_HELP = "our estimate: rewarded trials, less review leads (an unexcused high or critical finding) and trials partly run by a fallback model";
60
 
61
  const compactN = n => (n >= 1e6 ? (n / 1e6).toFixed(1) + "M" : n >= 1e3 ? Math.round(n / 1e3) + "k" : String(n));
 
68
  };
69
  function board() {
70
  const cols = [
71
+ { name: D.tasks.length + " tasks × " + SITE.attempts + " attempts, easiest first", cls: "l" },
72
+ { name: hasLb ? "Leader­board" : "Score", sort: "score", help: hasLb ? "published score ± 95% half-width" : "rewarded trials ± 95% half-width over the attempt rounds" },
73
  { name: "Our estimate", sort: "adj", help: ESTIMATE_HELP },
74
  { name: "Leads", sort: "leads", help: "rewarded trials with an unexcused high or critical finding" },
75
  { name: "Notes", cls: "l" },
 
82
  tr.append(rowHead(r));
83
  const s = el("td", "l"); s.append(strip(r, { leadsOnly: leadsOnly.checked })); tr.append(s);
84
  const sc = el("td"); sc.append(num(fmt1(r.lb.accuracy), "n big"), el("span", "pm", "±" + fmt1(r.lb.ci95)));
85
+ sc.title = r.scan.rewarded + " of " + r.scan.trials + " trials rewarded" + (r.lb.passAt4 ? " · pass@4 " + r.lb.passAt4 + "%" : ""); tr.append(sc);
86
  const ad = el("td");
87
  const delta = adj.accuracy - r.lb.accuracy;
88
  ad.append(num(fmt1(adj.accuracy), "n big" + (delta <= -1 ? " hot" : "")));
 
293
  notes.append(el("dt", null, r.agent), el("dd", null, note));
294
  });
295
 
296
+ if (!notes.children.length) { notes.previousElementSibling.hidden = true; notes.hidden = true; }
297
+
298
+ /* Counts in the lede, and leaderboard rows without published trajectories. */
299
+ const fill = (sel, text) => document.querySelectorAll(sel).forEach(n => { n.textContent = text; });
300
+ fill("[data-rows]", String(D.rows.length));
301
+ fill("[data-trials]", D.rows.reduce((n, r) => n + r.scan.trials, 0).toLocaleString("en"));
302
+ const missing = SITE.unpublished || [];
303
+ fill("[data-unpublished]", missing.length ? "Not here, as Datacurve publishes no trajectories for them: " +
304
+ missing.map(u => "#" + u.rank + " " + u.model + " · " + u.effort + " (" + u.accuracy + "%)").join(", ") + "." : "");
305
+
306
  board(); accounting(); detail(); families(); checks();
307
  })();
hub-link.js CHANGED
@@ -10,7 +10,7 @@
10
  a.className = "annot-hub";
11
  a.target = "_blank";
12
  a.rel = "noopener noreferrer";
13
- a.textContent = "Trial on Harbor Hub ↗";
14
  a.hidden = true;
15
  nav.append(a);
16
  let last = null;
 
10
  a.className = "annot-hub";
11
  a.target = "_blank";
12
  a.rel = "noopener noreferrer";
13
+ a.textContent = window.TB21_HUB_LABEL || "Trial on Harbor Hub ↗";
14
  a.hidden = true;
15
  nav.append(a);
16
  let last = null;
row.js CHANGED
@@ -12,7 +12,7 @@
12
  const hubScript = document.createElement("script");
13
  hubScript.src = rowPath(r) + "hub.js";
14
  document.head.append(hubScript);
15
- document.title = "#" + r.rank + " " + title(r) + " · " + r.agent + " · " + (r.pr ? "TB2.1 submissions" : "TB2.1 annotated");
16
  const h = r.scan.holes, n = r.scan.trials;
17
  const full = Object.values(trialInfo[r.id]).filter(t => t.h).length;
18
 
@@ -37,7 +37,7 @@
37
  el("small", null, OUTCOME[t.c] || ""));
38
  if (t.h) li.append(link(fullHref(r, vid), "full ↗", "full"));
39
  const hub = (window.TB21_HUB || {})[vid];
40
- if (hub) { const a = link(hub, "Hub ↗", "full"); a.target = "_blank"; a.rel = "noopener noreferrer"; li.append(a); }
41
  ol.append(li);
42
  });
43
  d.append(ol);
@@ -62,12 +62,13 @@
62
  /* Header. */
63
  const head = el("header", "row-head");
64
  head.append(el("p", "kicker", (r.pr ? "Terminal-Bench 2.1 submission · PR #" + r.pr + " (" + r.prState.toLowerCase() + ")"
65
- : "#" + r.rank + " on the Terminal-Bench 2.1 leaderboard") + " · " + (r.date || "")));
66
  head.append(el("h1", null, title(r)));
67
  const meta = el("p", "row-meta");
68
  meta.append(el("span", "harn", r.agent), el("span", null, [r.modelOrg].filter(Boolean).join(" · ")));
69
- meta.append(link(r.source, r.pr ? "PR #" + r.pr + " ↗" : "Submission ↗", "ext"));
70
- if (r.jobs.length <= 3) r.jobs.forEach(j => meta.append(link("https://hub.harborframework.com/jobs/" + j, "Hub job ↗", "ext")));
 
71
  else meta.append(el("span", null, r.jobs.length + " Hub jobs: each trial links its own"));
72
  head.append(meta);
73
  if (r.why) head.append(el("p", "why-line", r.why));
 
12
  const hubScript = document.createElement("script");
13
  hubScript.src = rowPath(r) + "hub.js";
14
  document.head.append(hubScript);
15
+ document.title = "#" + r.rank + " " + title(r) + " · " + r.agent + " · " + (r.pr ? "TB2.1 submissions" : (D.site || {}).short || "TB2.1 annotated");
16
  const h = r.scan.holes, n = r.scan.trials;
17
  const full = Object.values(trialInfo[r.id]).filter(t => t.h).length;
18
 
 
37
  el("small", null, OUTCOME[t.c] || ""));
38
  if (t.h) li.append(link(fullHref(r, vid), "full ↗", "full"));
39
  const hub = (window.TB21_HUB || {})[vid];
40
+ if (hub) { const a = link(hub, (D.site || {}).trialLabel || "Hub ↗", "full"); a.target = "_blank"; a.rel = "noopener noreferrer"; li.append(a); }
41
  ol.append(li);
42
  });
43
  d.append(ol);
 
62
  /* Header. */
63
  const head = el("header", "row-head");
64
  head.append(el("p", "kicker", (r.pr ? "Terminal-Bench 2.1 submission · PR #" + r.pr + " (" + r.prState.toLowerCase() + ")"
65
+ : "#" + r.rank + " on the " + ((D.site || {}).board || "Terminal-Bench 2.1 leaderboard")) + (r.date ? " · " + r.date : "")));
66
  head.append(el("h1", null, title(r)));
67
  const meta = el("p", "row-meta");
68
  meta.append(el("span", "harn", r.agent), el("span", null, [r.modelOrg].filter(Boolean).join(" · ")));
69
+ meta.append(link(r.source, r.pr ? "PR #" + r.pr + " ↗" : (D.site || {}).sourceLabel || "Submission ↗", "ext"));
70
+ if (!r.jobs.length) { /* trials link their own pages */ }
71
+ else if (r.jobs.length <= 3) r.jobs.forEach(j => meta.append(link("https://hub.harborframework.com/jobs/" + j, "Hub job ↗", "ext")));
72
  else meta.append(el("span", null, r.jobs.length + " Hub jobs: each trial links its own"));
73
  head.append(meta);
74
  if (r.why) head.append(el("p", "why-line", r.why));
style.css CHANGED
@@ -242,3 +242,4 @@ details.trials summary .label { font-weight: 650; }
242
  .notes .why { display: block; color: var(--muted); font-weight: 500; }
243
  .why-line { margin: 6px 0 0; color: var(--muted); font-size: 14px; }
244
  .key .mx, .explain-line .mx { display: inline-block; width: 14px; height: 8px; border-radius: 2px; vertical-align: 0; margin-right: 3px; }
 
 
242
  .notes .why { display: block; color: var(--muted); font-weight: 500; }
243
  .why-line { margin: 6px 0 0; color: var(--muted); font-size: 14px; }
244
  .key .mx, .explain-line .mx { display: inline-block; width: 14px; height: 8px; border-radius: 2px; vertical-align: 0; margin-right: 3px; }
245
+ .canary { font: 500 10px var(--code-f); color: var(--muted); letter-spacing: .02em; }