Spaces:
Running
Running
Deploy calibration @ d2b2018-space
Browse files
app.js
CHANGED
|
@@ -24,8 +24,8 @@ import { oauthLoginUrl, oauthHandleRedirectIfPresent, uploadFiles, downloadFile,
|
|
| 24 |
// the ?v= stamp — an unversioned nested import could load a stale module.
|
| 25 |
import { keyOf, latestByKey, mergeEvents, orderItems, firstUngraded as
|
| 26 |
firstUngradedPure, countComplete, stampClass, nextEpoch,
|
| 27 |
-
standsDownTo, statusOf, classifyProbe, hasScopes }
|
| 28 |
-
from "./logic.mjs?v=
|
| 29 |
|
| 30 |
// Test seam: Playwright installs window.__testHub (an in-memory hub) before
|
| 31 |
// any page script runs; production never defines it, so this is one inert
|
|
@@ -485,8 +485,11 @@ function renderItem() {
|
|
| 485 |
state.onPushSuccess = null;
|
| 486 |
const item = state.items[state.order[state.idx]];
|
| 487 |
window.scrollTo(0, 0); // a new item always starts at its top
|
|
|
|
|
|
|
|
|
|
| 488 |
main.append(el("div", "item-id",
|
| 489 |
-
`${
|
| 490 |
if (item.warmup) {
|
| 491 |
main.append(el("p", "warmup-note",
|
| 492 |
"Warm-up item — discussable with the others; real items start after these and must be graded independently."));
|
|
|
|
| 24 |
// the ?v= stamp — an unversioned nested import could load a stale module.
|
| 25 |
import { keyOf, latestByKey, mergeEvents, orderItems, firstUngraded as
|
| 26 |
firstUngradedPure, countComplete, stampClass, nextEpoch,
|
| 27 |
+
standsDownTo, statusOf, classifyProbe, hasScopes, displayId }
|
| 28 |
+
from "./logic.mjs?v=d2b2018-space";
|
| 29 |
|
| 30 |
// Test seam: Playwright installs window.__testHub (an in-memory hub) before
|
| 31 |
// any page script runs; production never defines it, so this is one inert
|
|
|
|
| 485 |
state.onPushSuccess = null;
|
| 486 |
const item = state.items[state.order[state.idx]];
|
| 487 |
window.scrollTo(0, 0); // a new item always starts at its top
|
| 488 |
+
const shownId = item.warmup && !CONFIG.opaqueIds
|
| 489 |
+
? "warm-up" // raw corpus qids never reach the screen
|
| 490 |
+
: displayId(keyOf(item), state.idx, CONFIG.opaqueIds);
|
| 491 |
main.append(el("div", "item-id",
|
| 492 |
+
`${shownId} · ${state.idx + 1}/${state.order.length}`));
|
| 493 |
if (item.warmup) {
|
| 494 |
main.append(el("p", "warmup-note",
|
| 495 |
"Warm-up item — discussable with the others; real items start after these and must be graded independently."));
|
config.js
CHANGED
|
@@ -2,7 +2,10 @@ window.CONFIG = {
|
|
| 2 |
task: "calibration",
|
| 3 |
title: "Judge calibration — 100 gradings",
|
| 4 |
itemsPath: "calibration_items.json",
|
| 5 |
-
|
|
|
|
|
|
|
|
|
|
| 6 |
landing: "You will grade whether a model's answer states the same fact as a "
|
| 7 |
+ "reference answer. 100 gradings plus 4 discussable warm-ups; expect 2–3 "
|
| 8 |
+ "hours total, in as many sittings as you like — progress saves continuously. "
|
|
|
|
| 2 |
task: "calibration",
|
| 3 |
title: "Judge calibration — 100 gradings",
|
| 4 |
itemsPath: "calibration_items.json",
|
| 5 |
+
// Display-only: keys are "qid:rep", so repeats of one question would be
|
| 6 |
+
// recognisable on screen. Logs and scoring always use the true key.
|
| 7 |
+
opaqueIds: "C",
|
| 8 |
+
build: "d2b2018-space",
|
| 9 |
landing: "You will grade whether a model's answer states the same fact as a "
|
| 10 |
+ "reference answer. 100 gradings plus 4 discussable warm-ups; expect 2–3 "
|
| 11 |
+ "hours total, in as many sittings as you like — progress saves continuously. "
|
index.html
CHANGED
|
@@ -5,8 +5,8 @@
|
|
| 5 |
<meta name="viewport" content="width=device-width, initial-scale=1">
|
| 6 |
<meta http-equiv="Content-Security-Policy" content="default-src 'none'; script-src 'self'; style-src 'self'; style-src-attr 'unsafe-inline'; font-src 'self'; connect-src https://huggingface.co https://*.hf.co; img-src 'self' data:; base-uri 'none'; form-action 'none'">
|
| 7 |
<title>LocalGate audit</title>
|
| 8 |
-
<link rel="stylesheet" href="style.css?v=
|
| 9 |
-
<link rel="stylesheet" href="katex/katex.min.css?v=
|
| 10 |
</head>
|
| 11 |
<body>
|
| 12 |
<header>
|
|
@@ -22,9 +22,9 @@
|
|
| 22 |
<pre id="rubric-body"></pre></details>
|
| 23 |
</div>
|
| 24 |
<div id="controls" hidden></div>
|
| 25 |
-
<script src="katex/katex.min.js?v=
|
| 26 |
-
<script src="katex/auto-render.min.js?v=
|
| 27 |
-
<script src="config.js?v=
|
| 28 |
-
<script type="module" src="app.js?v=
|
| 29 |
</body>
|
| 30 |
</html>
|
|
|
|
| 5 |
<meta name="viewport" content="width=device-width, initial-scale=1">
|
| 6 |
<meta http-equiv="Content-Security-Policy" content="default-src 'none'; script-src 'self'; style-src 'self'; style-src-attr 'unsafe-inline'; font-src 'self'; connect-src https://huggingface.co https://*.hf.co; img-src 'self' data:; base-uri 'none'; form-action 'none'">
|
| 7 |
<title>LocalGate audit</title>
|
| 8 |
+
<link rel="stylesheet" href="style.css?v=d2b2018-space">
|
| 9 |
+
<link rel="stylesheet" href="katex/katex.min.css?v=d2b2018-space">
|
| 10 |
</head>
|
| 11 |
<body>
|
| 12 |
<header>
|
|
|
|
| 22 |
<pre id="rubric-body"></pre></details>
|
| 23 |
</div>
|
| 24 |
<div id="controls" hidden></div>
|
| 25 |
+
<script src="katex/katex.min.js?v=d2b2018-space"></script>
|
| 26 |
+
<script src="katex/auto-render.min.js?v=d2b2018-space"></script>
|
| 27 |
+
<script src="config.js?v=d2b2018-space"></script>
|
| 28 |
+
<script type="module" src="app.js?v=d2b2018-space"></script>
|
| 29 |
</body>
|
| 30 |
</html>
|
logic.mjs
CHANGED
|
@@ -103,3 +103,12 @@ export const hasScopes = (grantedString, required) => {
|
|
| 103 |
const granted = new Set(String(grantedString ?? "").split(/\s+/));
|
| 104 |
return required.every((scope) => granted.has(scope));
|
| 105 |
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 103 |
const granted = new Set(String(grantedString ?? "").split(/\s+/));
|
| 104 |
return required.every((scope) => granted.has(scope));
|
| 105 |
};
|
| 106 |
+
|
| 107 |
+
// On-screen item label. Some tasks must not reveal their key's structure —
|
| 108 |
+
// calibration keys are "qid:rep", so five repeats of one question would be
|
| 109 |
+
// recognisable and put the annotator under consistency pressure the design
|
| 110 |
+
// otherwise avoids. The STORED key is always the real one; this is display
|
| 111 |
+
// only, derived from the annotator's own seeded position so two repeats never
|
| 112 |
+
// share a visible prefix.
|
| 113 |
+
export const displayId = (key, position, opaque) =>
|
| 114 |
+
opaque ? `${opaque}-${String(position + 1).padStart(3, "0")}` : key;
|