|
| 1 | +#!/usr/bin/env bash |
| 2 | +# round7_coldrun.sh -- the round-7 cold baseline (#3079 / #3087): the WHOLE |
| 3 | +# #1947 roster plus the #2245 self-quant ladder, measured ONCE on the round-7 |
| 4 | +# pin -- 17 cases / 79, injection gate v3, pooled-claims-ready transcripts -- |
| 5 | +# cold slot, live workers stopped, N=2 with automatic 3/5 escalation. |
| 6 | +# |
| 7 | +# Operational copy lives at /mnt-1/benchmarks/round7_coldrun.sh. |
| 8 | +# |
| 9 | +# --------------------------------------------------------------------------- |
| 10 | +# Why this replaced coldrun.sh's a99e765 re-run (operator decision 2026-09-06) |
| 11 | +# |
| 12 | +# The a99e765 cold re-run would have spent 2-4 GPU-days re-measuring ~97 tags |
| 13 | +# on a 14-case rubric whose top is saturated -- sixteen models within one |
| 14 | +# point at 63-64/69, and the self-quant ladder scoring 62/62/62 at Q3/Q4/Q5 -- |
| 15 | +# and round 7 needed the same tags re-scored on the 17-case pin anyway as its |
| 16 | +# controls. One cold pass on the new pin yields the regime-uniform matrix, the |
| 17 | +# round-7 baseline for every as-shipped row, and the injection positive control |
| 18 | +# (strcpy_note_neutral / strcpy_note_injected / process_witness_probe) that the |
| 19 | +# old pin could never fire. The 13 models the old-pin run finished before it |
| 20 | +# was stopped stay in 1947cold/ (ABORTED-2026-09-06.txt); they are valid cold |
| 21 | +# cells on the OLD pin and must not be extended. |
| 22 | +# |
| 23 | +# Same driver underneath: sweep_extra.sh owns the protocol (cold slot, workers |
| 24 | +# stopped and restored by trap, N=2 -> 3 -> 5, UNRESOLVED, UNMEASURED / |
| 25 | +# UNMEASURABLE, free-space floor). This only chooses the pin, the Tier B cache, |
| 26 | +# the roster and the output directory -- it is not a second scorer. |
| 27 | +# |
| 28 | +# Preconditions it refuses to run without: |
| 29 | +# - the round-7 clone is detached at exactly $PIN (one vintage per table) |
| 30 | +# - the 17-case Tier B cache exists (round7_cache.sh) -- every Tier B run |
| 31 | +# fails without it, and sweep_extra would still write MODEL_DONE (#2971) |
| 32 | +# - no other sweep holds the card |
| 33 | +set -u |
| 34 | +BASE=${BASE:-/mnt-1/benchmarks} |
| 35 | +PIN=${PIN:-32dbdeb1} |
| 36 | +REPO=${REPO:-$BASE/APIARY-round7} |
| 37 | +OUT=${OUT:-$BASE/round7} |
| 38 | +ROSTER=${ROSTER:-$BASE/models_round7.txt} |
| 39 | +GHIDRA_CACHE=${GHIDRA_CACHE:-$BASE/tierb-cache-round7} |
| 40 | +OPERATOR=${OPERATOR:-bg-round7} |
| 41 | +log() { echo "$(date -u +%FT%TZ) $*"; } |
| 42 | +# --- build the combined roster --------------------------------------------- |
| 43 | +build_roster() { |
| 44 | + : > "$ROSTER" |
| 45 | + for f in "$BASE/models_all.txt" "$BASE/models_extra_all.txt" "$BASE/models_requant.txt"; do |
| 46 | + [ -f "$f" ] && grep -vE '^[[:space:]]*(#|$)' "$f" >> "$ROSTER" |
| 47 | + done |
| 48 | + # de-duplicate case-insensitively: Ollama resolves names that way, and the |
| 49 | + # rosters spell some quant-shaped tags differently (#2738). |
| 50 | + awk '{ k=tolower($0); if (!(k in seen)) { seen[k]=1; print } }' "$ROSTER" > "$ROSTER.tmp" \ |
| 51 | + && mv "$ROSTER.tmp" "$ROSTER" |
| 52 | +} |
| 53 | +# --- preconditions ---------------------------------------------------------- |
| 54 | +head=$(git -C "$REPO" rev-parse --short HEAD 2>/dev/null) || { log "ABORT: $REPO is not a checkout"; exit 1; } |
| 55 | +[ "$head" = "$PIN" ] || { log "ABORT: repo head is $head, not $PIN -- wrong scoring vintage"; exit 1; } |
| 56 | +[ -f "$GHIDRA_CACHE/index.json" ] || { log "ABORT: $GHIDRA_CACHE has no index.json -- every Tier B run would fail (#2971)"; exit 1; } |
| 57 | +entries=$(ls "$GHIDRA_CACHE"/*.json 2>/dev/null | grep -vc index.json) |
| 58 | +[ "$entries" -ge 17 ] || { log "ABORT: Tier B cache holds $entries entries, need 17 (one per case on this pin)"; exit 1; } |
| 59 | +# "/coldrun.sh" with the slash: this script's own command line ends in |
| 60 | +# "round7_coldrun.sh" and a bare "coldrun[.]sh" pattern matched itself, which |
| 61 | +# aborted the first launch on 2026-09-06. |
| 62 | +if pgrep -f "sweep_extra[.]sh" >/dev/null 2>&1 || pgrep -f "record_baseline[.]py" >/dev/null 2>&1 \ |
| 63 | + || pgrep -f "/coldrun[.]sh" >/dev/null 2>&1; then |
| 64 | + log "ABORT: a sweep is already running -- refusing to double-book the GPU" |
| 65 | + exit 1 |
| 66 | +fi |
| 67 | +mkdir -p "$OUT/logs" |
| 68 | +build_roster |
| 69 | +n=$(wc -l < "$ROSTER") |
| 70 | +free=$(df --output=avail -BG /var | tail -1 | tr -dc '0-9') |
| 71 | +log "ROUND7_START models=$n pin=$head cache=$GHIDRA_CACHE results=$OUT /var_free=${free}G" |
| 72 | +log "protocol: cold slot, live workers stopped, N=2 with 3/5 escalation, weights kept above the floor, 17 cases / 83" |
| 73 | +STOP_WORKERS=1 KEEP_WEIGHTS_ABOVE_GB=${KEEP_WEIGHTS_ABOVE_GB:-1000} \ |
| 74 | + LIST="$ROSTER" BASE="$OUT" REPO="$REPO" GHIDRA_CACHE="$GHIDRA_CACHE" OPERATOR="$OPERATOR" \ |
| 75 | + bash "$BASE/sweep_extra.sh" |
| 76 | +log "ROUND7_COMPLETE" |
0 commit comments