trace-vla-code / code /sera_v4 /tools /chain_h1.sh
phammminhhieu's picture
TRACE-VLA code snapshot 2026-11-22 11:47 +07: 456 canonical files + SHA256 manifest + sync report
b4396f0 verified
Raw History Blame Contribute Delete
1.53 kB
#!/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" </dev/null >> "$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"