-
Notifications
You must be signed in to change notification settings - Fork 1
docs: Prism v3 scoring (source-tree submissions, G1–G8 battery, Zone B) #3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,6 +1,6 @@ | ||
| # Getting started | ||
|
|
||
| ## The contract (recipe v1.2.0) | ||
| ## The contract (recipe v1.3.0) | ||
|
|
||
| You ship **two scripts only**. The operator harness (`prism_harness.py`) imports them, | ||
| downloads the pinned dataset, verifies its SHA-256, times the run, and reports | ||
|
|
@@ -17,8 +17,10 @@ def train(model, ctx): | |
| budget.max_steps <= 20000 and budget.max_seconds <= 21600 (6h train).""" | ||
| ``` | ||
|
|
||
| No third source file, no offline weights, no network at pod runtime beyond the pinned | ||
| dataset pull. | ||
| No offline weights, no network at pod runtime beyond the pinned dataset pull. | ||
| Since recipe **1.3.0** you may alternatively ship a full **source tree** (the two seam | ||
| files plus `prism.toml`, `count_params.py`, `kernels/`, `vendor.lock`) — see | ||
| [Submit](submit.md#source-tree-zip-recipe--130). | ||
|
Comment on lines
+20
to
+23
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win Qualify the two-script contract. The document says “two scripts only” and then permits a full source tree. Replace the absolute wording with “the default submission contains two seam files” or state the exception in the same contract section. 🤖 Prompt for AI Agents |
||
|
|
||
| ## Telemetry hooks (required since recipe 1.1.0) | ||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change | ||||||
|---|---|---|---|---|---|---|---|---|
|
|
@@ -6,6 +6,79 @@ | |||||||
| lower bpb, higher score. The LLM reviews are **gates, not graders**: they verify the | ||||||||
| submission is coherent and not cheating; their quality notes never move the score. | ||||||||
|
|
||||||||
| ## v3 composite (shadow-by-default) | ||||||||
|
|
||||||||
| Since recipe 1.3.0 every run is *also* measured on the organizer-run **G1–G8 battery** | ||||||||
| (Zone A — computed by the harness, never by your code): | ||||||||
|
|
||||||||
| | Group | Axis | Weight | | ||||||||
| |-------|------|--------| | ||||||||
| | G1 | intrinsic fit (frozen-val + multi-domain/fresh-crawl bpb) | 0.25 | | ||||||||
| | G2 | commonsense/reading 0-shot core | 0.15 | | ||||||||
| | G3 | retrieval/associative recall (gated ≥ 0.25) | 0.10 | | ||||||||
| | G4 | reasoning at small scale | 0.15 | | ||||||||
| | G5 | long-context | 0.15 | | ||||||||
| | G6 | sample efficiency (train probe curve) | 0.075 | | ||||||||
| | G7 | inference efficiency | 0.075 | | ||||||||
| | G8 | training stability + µP (gated ≥ 0.5) | 0.05 | | ||||||||
|
|
||||||||
| The battery runs in a **two-phase pod flow**: training completes first, then the | ||||||||
| operator stages private eval assets (held-out + fresh-crawl data) and a fresh eval | ||||||||
| process measures the model. While `PRISM_SCORING_MODE=shadow` (default) your leaf score | ||||||||
| stays **pure bpb, bit-identical to v2**. After the reference baselines | ||||||||
| (**Transformer++**, **hybrid delta**) are measured and the anchor set is | ||||||||
| pre-registered, governance may flip to `composite`: anchor-normalized group scores, | ||||||||
| gates, a weighted geometric mean, and bootstrap lower-confidence-bound ranking | ||||||||
| (`lattice = round(SCORE_MAX × max(0, C − 1.645·SE))`, `scoring_version 3`). | ||||||||
|
|
||||||||
| **What the harness reports (METRICS_JSON v2).** Every v1 key (`bpb`, `tokens_seen`, | ||||||||
| `wall_clock_seconds`, `gpu_type`, `n_params`, `telemetry`, …) plus the v3 blocks: | ||||||||
| `flow`, `eval_tier` (`"private"` | `"public_dev"`), `gate`, `probe_curve` (G6), | ||||||||
| `train_metrics` (your Zone B dict, sanitized, never scored), and `battery`. The | ||||||||
| battery's canonical surface is `battery.metrics` — a **flat** map of | ||||||||
| `org.<group>.<name>` keys to a bare float or `{value, clusters}` (`clusters` are | ||||||||
| per-template means, the units of randomization for the clustered bootstrap). A metric | ||||||||
| that was never measured is **absent, never fabricated**. `battery.mirrors` carries the | ||||||||
| contamination-gap pairs for G2/G4: the same metric scored on the public dev-seed asset | ||||||||
| family vs a private mirror family — in the `public_dev` tier no private assets exist, | ||||||||
| so each pair is degenerate (gap 0, honestly labelled). | ||||||||
|
|
||||||||
| Your `train()` return dict lands in **Zone B** (`miner.*` keys): displayed but labelled | ||||||||
| participant-reported, validated at ingest, **never scored**. Never emit `org.*` keys — | ||||||||
| that quarantines the report as anti-cheat evidence. You can also post additional | ||||||||
|
Comment on lines
+34
to
+48
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🗄️ Data Integrity & Integration | 🟠 Major | ⚡ Quick win 🧩 Analysis chain🏁 Script executed: #!/bin/bash
set -euo pipefail
rg -n -C 8 \
'train_metrics|miner\.[A-Za-z0-9_.]+|finish_evaluation|return[[:space:]]*\{' \
. --glob '*.py' --glob '*.md'Repository: BaseIntelligence/prism Length of output: 16621 🏁 Script executed: #!/bin/bash
set -euo pipefail
printf '--- repo files mentioning train_metrics/battery/miner keys ---\n'
rg -n -C 5 'train_metrics|battery\.metrics|battery\.mirrors|miner\.[A-Za-z0-9_.]+|train_metrics|train_loss|metrics' README.md docs examples top-model --glob '!*.lock' --glob '!*.pyc' || true
printf '\n--- docs/scoring.md relevant sections ---\n'
sed -n '1,140p' docs/scoring.md
printf '\n--- baseline/top-model docs around Zone B if present ---\n'
sed -n '38,70p' examples/baseline/README.md 2>/dev/null || true
sed -n '1,40p' top-model/README.md 2>/dev/null || trueRepository: BaseIntelligence/prism Length of output: 251 🏁 Script executed: #!/bin/bash
set -euo pipefail
echo '--- repo files mentioning train_metrics/battery/miner keys ---'
rg -n -C 5 'train_metrics|battery\.metrics|battery\.mirrors|miner\.[A-Za-z0-9_.]+|train_metrics|train_loss|metrics' README.md docs examples top-model --glob '!*.lock' --glob '!*.pyc' || true
echo
echo '--- docs/scoring.md relevant sections ---'
sed -n '1,140p' docs/scoring.md
echo
echo '--- baseline/top-model docs around Zone B if present ---'
sed -n '38,70p' examples/baseline/README.md 2>/dev/null || true
sed -n '1,40p' top-model/README.md 2>/dev/null || trueRepository: BaseIntelligence/prism Length of output: 14418 Align the Zone B return contract with the harness.
🤖 Prompt for AI Agents |
||||||||
| self-reports out-of-band: | ||||||||
|
|
||||||||
| ``` | ||||||||
| POST /v1/submissions/{id}/zone-b | ||||||||
| ``` | ||||||||
|
Comment on lines
+51
to
+53
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win Add a language to the fenced code block. Use Proposed fix-```
+```text
POST /v1/submissions/{id}/zone-b
-```
+```📝 Committable suggestion
Suggested change
🧰 Tools🪛 markdownlint-cli2 (0.23.2)[warning] 51-51: Fenced code blocks should have a language specified (MD040, fenced-code-language) 🤖 Prompt for AI AgentsSource: Linters/SAST tools |
||||||||
|
|
||||||||
| ```json | ||||||||
| { | ||||||||
| "schema_version": "<recipe version>", | ||||||||
| "prev_hash": "<previous report_hash — optional>", | ||||||||
| "metrics": { | ||||||||
| "miner.<group>.<name>": {"kind": "scalar | series | histogram"} | ||||||||
| } | ||||||||
| } | ||||||||
| ``` | ||||||||
|
|
||||||||
| Reports chain per submission (`prev_hash` → the previous `report_hash`; omit it for | ||||||||
| master-chained ingest) and are capped at 64 scalars / 16 series / 10 000 points / 1 MB. | ||||||||
| Each report is validated against organizer ground truth (token/step/wall-clock | ||||||||
| counters, MFU ceiling, terminal-loss band) and the cross-miner cohort, and lands a | ||||||||
| stored verdict — `ok` / `flagged` / `quarantined`. Verdicts are evidence, never an | ||||||||
| auto-zero. Malformed or over-cap envelopes reject `422` and store nothing. | ||||||||
|
|
||||||||
| Per-run rows: `GET /v1/submissions/{id}/metrics?zone=a|b`; anchor registry: | ||||||||
| `GET /v1/anchors` and `GET /v1/preregistration`. | ||||||||
|
|
||||||||
| Kernel-carrying source trees can be decomposed with the 2×2 **attribution** planner | ||||||||
| (`POST /v1/submissions/{id}/attribution`): your architecture on reference kernels vs | ||||||||
| the reference architecture on your kernels, isolating arch vs kernel contributions. | ||||||||
|
|
||||||||
| Note: a model over the **350M parameter cap** is now a terminal `Score(0)` | ||||||||
| (`CAP_EXCEEDED`), not a retryable failure. | ||||||||
|
|
||||||||
| ## Anti-copy (architecture-only) | ||||||||
|
|
||||||||
| - A **pre-LLM copy gate** compares your `architecture.py` against earlier submissions | ||||||||
|
|
||||||||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -25,6 +25,23 @@ curl -sS -X POST "$GATEWAY/challenge/prism/v1/submissions" \ | |
| --data-binary @submission.zip | ||
| ``` | ||
|
|
||
| ## Source-tree ZIP (recipe ≥ 1.3.0) | ||
|
|
||
| Instead of only two scripts you may submit a full **source tree**: the two seam files | ||
| plus optional `prism.toml` (entry point), `count_params.py`, a `kernels/` directory of | ||
| custom ops (pure Python + torch, per `KERNEL_INTERFACE.md` — no prebuilt binaries, no | ||
| `ctypes`, no I/O or threads), and a `vendor.lock`. Trees are validated at intake | ||
| (size budgets, banned-pattern scan, canonical hash) and re-audited in-pod by the | ||
| harness cheatguard. Send tree ZIPs via the JSON `zip_base64` field (the raw-zip path | ||
| rejects them with a pointer to `zip_base64` so the full tree is validated and | ||
|
Comment on lines
+34
to
+36
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win Use the established Replace “Send tree ZIPs” with “Send source-tree ZIPs.” This removes the ambiguous wording and addresses the grammar warning at Line 35. 🧰 Tools🪛 LanguageTool[grammar] ~35-~35: Ensure spelling is correct (QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1) 🤖 Prompt for AI AgentsSource: Linters/SAST tools |
||
| retained): | ||
|
|
||
| ```bash | ||
| curl -sS -X POST "$GATEWAY/challenge/prism/v1/submissions" \ | ||
| -H 'content-type: application/json' \ | ||
| -d '{"miner_hotkey":"<hex>","zip_base64":"<base64 of tree.zip>"}' | ||
| ``` | ||
|
|
||
| ## JSON (local / scripting) | ||
|
|
||
| ```bash | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🗄️ Data Integrity & Integration | 🟠 Major | ⚡ Quick win
Apply the gateway prefix consistently to all new route references.
The new documentation omits
/challenge/prismfrom several miner routes. This conflicts withdocs/api.mdand can cause 404 responses.README.md#L44-L47: change the Zone B route to/challenge/prism/v1/submissions/{id}/zone-b.docs/scoring.md#L51-L53: change the Zone B route to/challenge/prism/v1/submissions/{id}/zone-b.docs/scoring.md#L72-L73: prefix the metrics, anchors, and preregistration routes with/challenge/prism.📍 Affects 2 files
README.md#L44-L47(this comment)docs/scoring.md#L51-L53docs/scoring.md#L72-L73🤖 Prompt for AI Agents