#!/bin/bash # Parallel pipeline (Young's order 23:47, 2026-11-21): eval each arm # as soon as its final checkpoint exists, one eval at a time, while # the next arm keeps training in df_chain_b.sh. Matched protocol is # unchanged; only the schedule changes. After each arm eval, the # aggregator refreshes the partial summary for the dashboard; the # final aggregator run (after correspondence) writes the verdict. cd ~/sera_v4_experiments/trace_validation/scripts || exit 1 PY=~/lerobot/.venv/bin/python DF=~/sera_v4_experiments/data_factory LOG=~/sera_v4_experiments/data_factory_eval_queue.log stamp() { echo "[$(date '+%F %T')] $*" >> "$LOG"; } wait_ckpt() { while [ ! -f "$1" ]; do sleep 30; done } run_eval() { arm=$1 stamp "EVAL $arm START" $PY df_eval_arms.py "$arm" >> "$LOG" 2>&1 stamp "EVAL $arm END rc=$?" $PY df_eval_agg.py >> "$LOG" 2>&1 stamp "AGG AFTER $arm DONE" } stamp "QUEUE START" wait_ckpt "$DF/runs/r1/ckpt_05000.pt" run_eval r1 run_eval r0 wait_ckpt "$DF/runs/r2/ckpt_05000.pt" run_eval r2 wait_ckpt "$DF/runs/r3/ckpt_05000.pt" run_eval r3 wait_ckpt "$DF/runs/r4/ckpt_05000.pt" run_eval r4 stamp "CORR EVAL START" $PY df_corr_eval.py >> "$LOG" 2>&1 stamp "CORR EVAL END rc=$?" $PY df_eval_agg.py >> "$LOG" 2>&1 stamp "QUEUE DONE"