AsianPlayer/TriDrive / code /eval /run_state_sup_evals.sh
AsianPlayer's picture
download
raw
2.22 kB
#!/usr/bin/env bash
# cwm3/eval/run_state_sup_evals.sh — evaluation of the state-supervised E arms (innovation 3 b2) vs E0_pooled_P_s<k>_v2 (idempotent):
# probes/dump_f_hat.py per run (F_hat on the probe rows) -> probes/future_vs_predicted.py --space v2 --fhat-runs <baseline + arms> --tag fs_v2 (ridge, state events, subset all)
# eval/paired_compare.py (D cells + f_cos) and eval/pressure_eval.py (P cells): tags fs_s<k>_<arm>_vs_pooledP
# probes/report_state_sup.py -> results/tables/state_supervised_E.md. bash eval/run_state_sup_evals.sh "0 1 2" "fs fsonly" [render=1]
set -u
cd "$(dirname "$0")/.."
PY=python
export OMP_NUM_THREADS=4 MKL_NUM_THREADS=4
have_pc() { grep -q ",$1,$2,test," results/paired_compare.csv 2>/dev/null; }
RUNS=""
for s in ${1:-0 1 2}; do
B=results/runs/E0_pooled_P_s${s}_v2
RUNS="$RUNS E0_pooled_P_s${s}_v2"
for arm in ${2:-fs fsonly}; do
A=results/runs/E0_pooled_P_${arm}_s${s}_v2
[[ -f $A/PRED_DONE && -f $B/PRED_DONE ]] || { echo "skip s$s $arm (runs not finished)"; continue; }
RUNS="$RUNS E0_pooled_P_${arm}_s${s}_v2"
$PY probes/dump_f_hat.py --run E0_pooled_P_${arm}_s${s}_v2 2>&1 | grep -vi warning | tail -2
for reg in manual engaged; do
have_pc "fs_s${s}_${arm}_vs_pooledP" $reg || { echo "== fs_s${s}_${arm}_vs_pooledP $reg"
$PY eval/paired_compare.py --regime $reg --a $A --b $B --tag fs_s${s}_${arm}_vs_pooledP 2>&1 | grep -E "appended|Error|Traceback|File \"" | cut -c1-200
$PY eval/pressure_eval.py --regime $reg --a $A --b $B --tag fs_s${s}_${arm}_vs_pooledP 2>&1 | grep -E "appended|Error|Traceback|File \"" | cut -c1-200; }
done
done
done
for r in $RUNS; do [[ -f results/probes/fhat/${r}_manual_test.npz ]] || $PY probes/dump_f_hat.py --run $r 2>&1 | grep -vi warning | tail -2; done
echo "== read-out protocol (v2 space) on: $RUNS"
PROBES_CPU=1 $PY probes/future_vs_predicted.py --space v2 --fhat-runs $RUNS --tag fs_v2 --probes ridge --events '^(P_.*_active|D_.*_active|veh_.*_pressed)$' --subsets all --n-boot 300 2>&1 | grep -E "done in|report|Error|Traceback|File \"" | cut -c1-200
[[ "${3:-1}" == "1" ]] && $PY probes/report_state_sup.py --tag fs_v2 2>&1 | tail -6
echo STATE_SUP_EVALS_DONE

Xet Storage Details

Size:
2.22 kB
·
Xet hash:
f47a3fc1f4c81cc709e45619963611008fbf4fd8ab78a26ddc3a8802c67124f0

Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.