interplane.Get Omega
Read in your language

omega-mv

Omega: a language for verified programs, semantic identity and machine realization. Seed-born work and existing implementations have distinct provenance.

Brought by drakestapleton

branch main Branches Tags History

omega-mv / evidence / OLLM-AB4-ROUNDS-4-11-20261122 / harness / teacher_window.sh

48 lines · 2252 bytes Raw Blame History
1#!/bin/sh
2# teacher_window.sh TAG IN_AUDIT.om MAX_RECORDS DEADLINE_SEC SEED [LEASE_MIN]
3# One cold boot of the q36-35b teacher under a claimed chip window; it only rewords instruction
4# lines of verified records (teacher_paraphrase.py). The teacher is always shut down by the trap.
5set -u
6TAG="$1"; SRC="$2"; MAXN="$3"; DL="$4"; SEED="$5"; LEASE="${6:-18}"
7CAMP=/home/drakestapleton/work/ollm-helix-rlvr-20261121
8R="$CAMP/rounds"
9OUTD="$R/para"; mkdir -p "$OUTD"
10BOARD=/home/drakestapleton/handoffs/BOARD.md
11NAME="ollm-teacher-para-$TAG"
12LANE="claude-agy-finish"
13rm -f "$OUTD/DONE_$TAG"
14APPS=$(nvidia-smi --query-compute-apps=pid,name --format=csv,noheader 2>/dev/null | wc -l)
15[ "$APPS" = "0" ] || { echo "FAIL chip busy"; echo "rc=1" > "$OUTD/DONE_$TAG"; exit 1; }
16
17RUNNER="$OUTD/run-$TAG.sh"
18cat > "$RUNNER" <<EOF
19#!/bin/sh
20set -u
21SPID=""
22cleanup() { if [ -n "\$SPID" ]; then kill "\$SPID" 2>/dev/null || true; wait "\$SPID" 2>/dev/null || true; SPID=""; fi; }
23trap cleanup EXIT INT TERM
24/home/drakestapleton/.local/bin/q36-35b --port 18099 > "$OUTD/q36_$TAG.log" 2>&1 &
25SPID=\$!
26READY=0
27for i in \$(seq 1 120); do
28 if curl -sf http://127.0.0.1:18099/health >/dev/null 2>&1; then READY=1; echo "Q36_READY_SEC=\$i"; break; fi
29 sleep 1
30done
31[ "\$READY" = "1" ] || { echo "FAIL q36-35b not ready in 120s"; exit 1; }
32python3 "$R/teacher_paraphrase.py" 18099 "$SRC" "$OUTD/para_$TAG.om" $MAXN $DL $SEED "$OUTD/asked_all.txt"
33rc=\$?
34cleanup
35sleep 8
36exit \$rc
37EOF
38chmod +x "$RUNNER"
39echo "$(date -u +%FT%H:%MZ) CLAIM $LANE $NAME to all: GB10 chip lock (lease ${LEASE}m, no quiet lock) for one cold boot of the q36-35b teacher on private port 18099 to reword instruction lines of verified OM-2 records; teacher goes down by trap; reach me on this board" >> "$BOARD"
40WID=$(spark-window open "$NAME" --lease "$LEASE" --gb10 exclusive --quiet none --wait | tail -n 1)
41echo "OPENED_WINDOW=$WID"
42closew() { spark-window close "$WID" >/dev/null 2>&1 || true; echo "$(date -u +%FT%H:%MZ) RELEASE $LANE $NAME: done, teacher down, GPU idle" >> "$BOARD"; }
43trap closew EXIT INT TERM
44spark-window run spark-receipt "$NAME" -- sh "$RUNNER"
45RC=$?
46cat "$OUTD/para_$TAG.om.asked" >> "$OUTD/asked_all.txt" 2>/dev/null || true
47echo "rc=$RC" > "$OUTD/DONE_$TAG"
48exit "$RC"