#!/bin/bash # Horizon execute-1 FULL rerun (coordinator 5, queued 2026-11-18): # waits for the oracle battery to finish (a real idle slot), then # runs execute-1 to the full 70 episodes on D@10k. Writes an # explicit COMPLETE/PARTIAL marker based on the actual line count # (the old chain's unconditional DONE marker is what misled the # watchdog). Never interrupts training: the oracle battery is the # last queued work, so this starts only after it. set -u EXP="$HOME/sera_v4_experiments" LOG="$EXP/round2_probe/chain_h1.log" RES="$EXP/round2_probe/results" TOOLS="$EXP/tools" CKPT="$EXP/sera-v4-d-skillroute/checkpoints/010000/pretrained_model" cd "$HOME/lerobot" || exit 1 log() { echo "[$(date -Is)] $*" >> "$LOG"; } log "CHAIN_H1 WAITING" while ! grep -q "CHAIN_ORACLE_DONE" "$EXP/round2_probe/chain_oracle.log" 2>/dev/null; do sleep 60; done log "ORACLE DONE -> horizon execute-1 full rerun" env MUJOCO_GL=egl PYTHONUNBUFFERED=1 SERA_EXECUTE_STEPS=1 .venv/bin/python \ "$TOOLS/eval_v4.py" --ckpt "$CKPT" --arm "d-horizon1-full" \ --out "$RES/d-horizon1-full.jsonl" > "$LOG" 2>&1 N=$(wc -l < "$RES/d-horizon1-full.jsonl" 2>/dev/null || echo 0) S=$(grep -c '"success": true' "$RES/d-horizon1-full.jsonl" 2>/dev/null || echo 0) if [ "$N" -eq 70 ]; then echo "HORIZON_1_FULL COMPLETE $S/70 at $(date -Is)" >> "$RES/horizon.log" log "HORIZON_1_FULL COMPLETE $S/70" else echo "HORIZON_1_FULL PARTIAL $S/$N at $(date -Is)" >> "$RES/horizon.log" log "HORIZON_1_FULL PARTIAL $S/$N" fi log "CHAIN_H1_DONE"