rsm_rise code snapshot (HF_PUSH_ALL) (part 12)
Browse filesFiles changed (50)
- rsm_rise/scripts/nb/df_idm_cells/c038_mug_p1_e1_nosel.shAdded+4
- rsm_rise/scripts/nb/df_idm_cells/c039_mug_p1_e1_dfact.shAdded+4
- rsm_rise/scripts/nb/df_idm_cells/c040_thr_p1_e2_idm.shAdded+4
- rsm_rise/scripts/nb/df_idm_cells/c041_thr_p1_e2_rnd.shAdded+4
- rsm_rise/scripts/nb/df_idm_cells/c042_thr_p1_e2_nosel.shAdded+4
- rsm_rise/scripts/nb/df_idm_cells/c043_thr_p1_e2_dfact.shAdded+4
- rsm_rise/scripts/nb/df_idm_cells/c044_mug_p1_e2_idm.shAdded+4
- rsm_rise/scripts/nb/df_idm_cells/c045_mug_p1_e2_rnd.shAdded+4
- rsm_rise/scripts/nb/df_idm_cells/c046_mug_p1_e2_nosel.shAdded+4
- rsm_rise/scripts/nb/df_idm_cells/c047_mug_p1_e2_dfact.shAdded+4
- rsm_rise/scripts/nb/df_idm_cells/c048_thr_p2_e0_idm.shAdded+4
- rsm_rise/scripts/nb/df_idm_cells/c049_thr_p2_e0_rnd.shAdded+4
- rsm_rise/scripts/nb/df_idm_cells/c050_thr_p2_e0_nosel.shAdded+4
- rsm_rise/scripts/nb/df_idm_cells/c051_thr_p2_e0_dfact.shAdded+4
- rsm_rise/scripts/nb/df_idm_cells/c052_mug_p2_e0_idm.shAdded+4
- rsm_rise/scripts/nb/df_idm_cells/c053_mug_p2_e0_rnd.shAdded+4
- rsm_rise/scripts/nb/df_idm_cells/c054_mug_p2_e0_nosel.shAdded+4
- rsm_rise/scripts/nb/df_idm_cells/c055_mug_p2_e0_dfact.shAdded+4
- rsm_rise/scripts/nb/df_idm_cells/c056_thr_p2_e1_idm.shAdded+4
- rsm_rise/scripts/nb/df_idm_cells/c057_thr_p2_e1_rnd.shAdded+4
- rsm_rise/scripts/nb/df_idm_cells/c058_thr_p2_e1_nosel.shAdded+4
- rsm_rise/scripts/nb/df_idm_cells/c059_thr_p2_e1_dfact.shAdded+4
- rsm_rise/scripts/nb/df_idm_cells/c060_mug_p2_e1_idm.shAdded+4
- rsm_rise/scripts/nb/df_idm_cells/c061_mug_p2_e1_rnd.shAdded+4
- rsm_rise/scripts/nb/df_idm_cells/c062_mug_p2_e1_nosel.shAdded+4
- rsm_rise/scripts/nb/df_idm_cells/c063_mug_p2_e1_dfact.shAdded+4
- rsm_rise/scripts/nb/df_idm_cells/c064_thr_p2_e2_idm.shAdded+4
- rsm_rise/scripts/nb/df_idm_cells/c065_thr_p2_e2_rnd.shAdded+4
- rsm_rise/scripts/nb/df_idm_cells/c066_thr_p2_e2_nosel.shAdded+4
- rsm_rise/scripts/nb/df_idm_cells/c067_thr_p2_e2_dfact.shAdded+4
- rsm_rise/scripts/nb/df_idm_cells/c068_mug_p2_e2_idm.shAdded+4
- rsm_rise/scripts/nb/df_idm_cells/c069_mug_p2_e2_rnd.shAdded+4
- rsm_rise/scripts/nb/df_idm_cells/c070_mug_p2_e2_nosel.shAdded+4
- rsm_rise/scripts/nb/df_idm_cells/c071_mug_p2_e2_dfact.shAdded+4
- rsm_rise/scripts/nb/df_idm_cells/c072_thr_p0_e0_idm_g5.shAdded+4
- rsm_rise/scripts/nb/df_idm_cells/c073_mug_p0_e0_idm_g5.shAdded+4
- rsm_rise/scripts/nb/df_idm_cells/ensure_mug_expert_suboptimal.shAdded+3
- rsm_rise/scripts/nb/df_idm_cells/ensure_threading_expert_play.shAdded+3
- rsm_rise/scripts/nb/df_idm_ensure.shAdded+42
- rsm_rise/scripts/nb/df_idm_eval_payload.shAdded+116
- rsm_rise/scripts/nb/df_idm_gen_queue.shAdded+84
- rsm_rise/scripts/nb/df_idm_tab.pyAdded+156
- rsm_rise/scripts/nb/df_idm_train_payload.shAdded+96
- rsm_rise/scripts/nb/df_idmcap_cells/c000_mug_N512_ex8_idm.shAdded+6
- rsm_rise/scripts/nb/df_idmcap_cells/c001_mug_N512_ex8_rnd.shAdded+6
- rsm_rise/scripts/nb/df_idmcap_cells/c002_thr_N512_ex8_idm.shAdded+6
- rsm_rise/scripts/nb/df_idmcap_cells/c003_thr_N512_ex8_rnd.shAdded+6
- rsm_rise/scripts/nb/df_idmcap_cells/c004_mug_N1024_ex8_idm.shAdded+6
- rsm_rise/scripts/nb/df_idmcap_cells/c005_mug_N1024_ex8_rnd.shAdded+6
- rsm_rise/scripts/nb/df_idmcap_cells/c006_thr_N1024_ex8_idm.shAdded+6
1234#!/usr/bin/env bash# generated by scripts/nb/df_idm_gen_queue.sh -- gen_q#274 run 36 (DF -> IDM decoder wave)set -uo pipefailexec bash /proj/dmfexp/zwhong/rsm_rise/scripts/nb/df_idm_eval_payload.sh mug_expert_suboptimal 0.95 0.0 1 1 1 idm argmax 501234#!/usr/bin/env bash# generated by scripts/nb/df_idm_gen_queue.sh -- gen_q#274 run 36 (DF -> IDM decoder wave)set -uo pipefailexec bash /proj/dmfexp/zwhong/rsm_rise/scripts/nb/df_idm_eval_payload.sh mug_expert_suboptimal 0.95 0.0 128 1 1 dfact argmax 501234#!/usr/bin/env bash# generated by scripts/nb/df_idm_gen_queue.sh -- gen_q#274 run 36 (DF -> IDM decoder wave)set -uo pipefailexec bash /proj/dmfexp/zwhong/rsm_rise/scripts/nb/df_idm_eval_payload.sh threading_expert_play 0.95 0.0 128 1 2 idm argmax 501234#!/usr/bin/env bash# generated by scripts/nb/df_idm_gen_queue.sh -- gen_q#274 run 36 (DF -> IDM decoder wave)set -uo pipefailexec bash /proj/dmfexp/zwhong/rsm_rise/scripts/nb/df_idm_eval_payload.sh threading_expert_play 0.95 0.0 128 1 2 idm random 501234#!/usr/bin/env bash# generated by scripts/nb/df_idm_gen_queue.sh -- gen_q#274 run 36 (DF -> IDM decoder wave)set -uo pipefailexec bash /proj/dmfexp/zwhong/rsm_rise/scripts/nb/df_idm_eval_payload.sh threading_expert_play 0.95 0.0 1 1 2 idm argmax 501234#!/usr/bin/env bash# generated by scripts/nb/df_idm_gen_queue.sh -- gen_q#274 run 36 (DF -> IDM decoder wave)set -uo pipefailexec bash /proj/dmfexp/zwhong/rsm_rise/scripts/nb/df_idm_eval_payload.sh threading_expert_play 0.95 0.0 128 1 2 dfact argmax 501234#!/usr/bin/env bash# generated by scripts/nb/df_idm_gen_queue.sh -- gen_q#274 run 36 (DF -> IDM decoder wave)set -uo pipefailexec bash /proj/dmfexp/zwhong/rsm_rise/scripts/nb/df_idm_eval_payload.sh mug_expert_suboptimal 0.95 0.0 128 1 2 idm argmax 501234#!/usr/bin/env bash# generated by scripts/nb/df_idm_gen_queue.sh -- gen_q#274 run 36 (DF -> IDM decoder wave)set -uo pipefailexec bash /proj/dmfexp/zwhong/rsm_rise/scripts/nb/df_idm_eval_payload.sh mug_expert_suboptimal 0.95 0.0 128 1 2 idm random 501234#!/usr/bin/env bash# generated by scripts/nb/df_idm_gen_queue.sh -- gen_q#274 run 36 (DF -> IDM decoder wave)set -uo pipefailexec bash /proj/dmfexp/zwhong/rsm_rise/scripts/nb/df_idm_eval_payload.sh mug_expert_suboptimal 0.95 0.0 1 1 2 idm argmax 501234#!/usr/bin/env bash# generated by scripts/nb/df_idm_gen_queue.sh -- gen_q#274 run 36 (DF -> IDM decoder wave)set -uo pipefailexec bash /proj/dmfexp/zwhong/rsm_rise/scripts/nb/df_idm_eval_payload.sh mug_expert_suboptimal 0.95 0.0 128 1 2 dfact argmax 501234#!/usr/bin/env bash# generated by scripts/nb/df_idm_gen_queue.sh -- gen_q#274 run 36 (DF -> IDM decoder wave)set -uo pipefailexec bash /proj/dmfexp/zwhong/rsm_rise/scripts/nb/df_idm_eval_payload.sh threading_expert_play 0.95 0.0 128 2 0 idm argmax 501234#!/usr/bin/env bash# generated by scripts/nb/df_idm_gen_queue.sh -- gen_q#274 run 36 (DF -> IDM decoder wave)set -uo pipefailexec bash /proj/dmfexp/zwhong/rsm_rise/scripts/nb/df_idm_eval_payload.sh threading_expert_play 0.95 0.0 128 2 0 idm random 501234#!/usr/bin/env bash# generated by scripts/nb/df_idm_gen_queue.sh -- gen_q#274 run 36 (DF -> IDM decoder wave)set -uo pipefailexec bash /proj/dmfexp/zwhong/rsm_rise/scripts/nb/df_idm_eval_payload.sh threading_expert_play 0.95 0.0 1 2 0 idm argmax 501234#!/usr/bin/env bash# generated by scripts/nb/df_idm_gen_queue.sh -- gen_q#274 run 36 (DF -> IDM decoder wave)set -uo pipefailexec bash /proj/dmfexp/zwhong/rsm_rise/scripts/nb/df_idm_eval_payload.sh threading_expert_play 0.95 0.0 128 2 0 dfact argmax 501234#!/usr/bin/env bash# generated by scripts/nb/df_idm_gen_queue.sh -- gen_q#274 run 36 (DF -> IDM decoder wave)set -uo pipefailexec bash /proj/dmfexp/zwhong/rsm_rise/scripts/nb/df_idm_eval_payload.sh mug_expert_suboptimal 0.95 0.0 128 2 0 idm argmax 501234#!/usr/bin/env bash# generated by scripts/nb/df_idm_gen_queue.sh -- gen_q#274 run 36 (DF -> IDM decoder wave)set -uo pipefailexec bash /proj/dmfexp/zwhong/rsm_rise/scripts/nb/df_idm_eval_payload.sh mug_expert_suboptimal 0.95 0.0 128 2 0 idm random 501234#!/usr/bin/env bash# generated by scripts/nb/df_idm_gen_queue.sh -- gen_q#274 run 36 (DF -> IDM decoder wave)set -uo pipefailexec bash /proj/dmfexp/zwhong/rsm_rise/scripts/nb/df_idm_eval_payload.sh mug_expert_suboptimal 0.95 0.0 1 2 0 idm argmax 501234#!/usr/bin/env bash# generated by scripts/nb/df_idm_gen_queue.sh -- gen_q#274 run 36 (DF -> IDM decoder wave)set -uo pipefailexec bash /proj/dmfexp/zwhong/rsm_rise/scripts/nb/df_idm_eval_payload.sh mug_expert_suboptimal 0.95 0.0 128 2 0 dfact argmax 501234#!/usr/bin/env bash# generated by scripts/nb/df_idm_gen_queue.sh -- gen_q#274 run 36 (DF -> IDM decoder wave)set -uo pipefailexec bash /proj/dmfexp/zwhong/rsm_rise/scripts/nb/df_idm_eval_payload.sh threading_expert_play 0.95 0.0 128 2 1 idm argmax 501234#!/usr/bin/env bash# generated by scripts/nb/df_idm_gen_queue.sh -- gen_q#274 run 36 (DF -> IDM decoder wave)set -uo pipefailexec bash /proj/dmfexp/zwhong/rsm_rise/scripts/nb/df_idm_eval_payload.sh threading_expert_play 0.95 0.0 128 2 1 idm random 501234#!/usr/bin/env bash# generated by scripts/nb/df_idm_gen_queue.sh -- gen_q#274 run 36 (DF -> IDM decoder wave)set -uo pipefailexec bash /proj/dmfexp/zwhong/rsm_rise/scripts/nb/df_idm_eval_payload.sh threading_expert_play 0.95 0.0 1 2 1 idm argmax 501234#!/usr/bin/env bash# generated by scripts/nb/df_idm_gen_queue.sh -- gen_q#274 run 36 (DF -> IDM decoder wave)set -uo pipefailexec bash /proj/dmfexp/zwhong/rsm_rise/scripts/nb/df_idm_eval_payload.sh threading_expert_play 0.95 0.0 128 2 1 dfact argmax 501234#!/usr/bin/env bash# generated by scripts/nb/df_idm_gen_queue.sh -- gen_q#274 run 36 (DF -> IDM decoder wave)set -uo pipefailexec bash /proj/dmfexp/zwhong/rsm_rise/scripts/nb/df_idm_eval_payload.sh mug_expert_suboptimal 0.95 0.0 128 2 1 idm argmax 501234#!/usr/bin/env bash# generated by scripts/nb/df_idm_gen_queue.sh -- gen_q#274 run 36 (DF -> IDM decoder wave)set -uo pipefailexec bash /proj/dmfexp/zwhong/rsm_rise/scripts/nb/df_idm_eval_payload.sh mug_expert_suboptimal 0.95 0.0 128 2 1 idm random 501234#!/usr/bin/env bash# generated by scripts/nb/df_idm_gen_queue.sh -- gen_q#274 run 36 (DF -> IDM decoder wave)set -uo pipefailexec bash /proj/dmfexp/zwhong/rsm_rise/scripts/nb/df_idm_eval_payload.sh mug_expert_suboptimal 0.95 0.0 1 2 1 idm argmax 501234#!/usr/bin/env bash# generated by scripts/nb/df_idm_gen_queue.sh -- gen_q#274 run 36 (DF -> IDM decoder wave)set -uo pipefailexec bash /proj/dmfexp/zwhong/rsm_rise/scripts/nb/df_idm_eval_payload.sh mug_expert_suboptimal 0.95 0.0 128 2 1 dfact argmax 501234#!/usr/bin/env bash# generated by scripts/nb/df_idm_gen_queue.sh -- gen_q#274 run 36 (DF -> IDM decoder wave)set -uo pipefailexec bash /proj/dmfexp/zwhong/rsm_rise/scripts/nb/df_idm_eval_payload.sh threading_expert_play 0.95 0.0 128 2 2 idm argmax 501234#!/usr/bin/env bash# generated by scripts/nb/df_idm_gen_queue.sh -- gen_q#274 run 36 (DF -> IDM decoder wave)set -uo pipefailexec bash /proj/dmfexp/zwhong/rsm_rise/scripts/nb/df_idm_eval_payload.sh threading_expert_play 0.95 0.0 128 2 2 idm random 501234#!/usr/bin/env bash# generated by scripts/nb/df_idm_gen_queue.sh -- gen_q#274 run 36 (DF -> IDM decoder wave)set -uo pipefailexec bash /proj/dmfexp/zwhong/rsm_rise/scripts/nb/df_idm_eval_payload.sh threading_expert_play 0.95 0.0 1 2 2 idm argmax 501234#!/usr/bin/env bash# generated by scripts/nb/df_idm_gen_queue.sh -- gen_q#274 run 36 (DF -> IDM decoder wave)set -uo pipefailexec bash /proj/dmfexp/zwhong/rsm_rise/scripts/nb/df_idm_eval_payload.sh threading_expert_play 0.95 0.0 128 2 2 dfact argmax 501234#!/usr/bin/env bash# generated by scripts/nb/df_idm_gen_queue.sh -- gen_q#274 run 36 (DF -> IDM decoder wave)set -uo pipefailexec bash /proj/dmfexp/zwhong/rsm_rise/scripts/nb/df_idm_eval_payload.sh mug_expert_suboptimal 0.95 0.0 128 2 2 idm argmax 501234#!/usr/bin/env bash# generated by scripts/nb/df_idm_gen_queue.sh -- gen_q#274 run 36 (DF -> IDM decoder wave)set -uo pipefailexec bash /proj/dmfexp/zwhong/rsm_rise/scripts/nb/df_idm_eval_payload.sh mug_expert_suboptimal 0.95 0.0 128 2 2 idm random 501234#!/usr/bin/env bash# generated by scripts/nb/df_idm_gen_queue.sh -- gen_q#274 run 36 (DF -> IDM decoder wave)set -uo pipefailexec bash /proj/dmfexp/zwhong/rsm_rise/scripts/nb/df_idm_eval_payload.sh mug_expert_suboptimal 0.95 0.0 1 2 2 idm argmax 501234#!/usr/bin/env bash# generated by scripts/nb/df_idm_gen_queue.sh -- gen_q#274 run 36 (DF -> IDM decoder wave)set -uo pipefailexec bash /proj/dmfexp/zwhong/rsm_rise/scripts/nb/df_idm_eval_payload.sh mug_expert_suboptimal 0.95 0.0 128 2 2 dfact argmax 501234#!/usr/bin/env bash# generated by scripts/nb/df_idm_gen_queue.sh -- gen_q#274 run 36 (DF -> IDM decoder wave)set -uo pipefailexec bash /proj/dmfexp/zwhong/rsm_rise/scripts/nb/df_idm_eval_payload.sh threading_expert_play 0.95 5.0 128 0 0 idm argmax 501234#!/usr/bin/env bash# generated by scripts/nb/df_idm_gen_queue.sh -- gen_q#274 run 36 (DF -> IDM decoder wave)set -uo pipefailexec bash /proj/dmfexp/zwhong/rsm_rise/scripts/nb/df_idm_eval_payload.sh mug_expert_suboptimal 0.95 5.0 128 0 0 idm argmax 50123#!/usr/bin/env bash# generated -- train/locate this task's IDM decoders before any eval cell needs themexec bash /proj/dmfexp/zwhong/rsm_rise/scripts/nb/df_idm_ensure.sh mug_expert_suboptimal123#!/usr/bin/env bash# generated -- train/locate this task's IDM decoders before any eval cell needs themexec bash /proj/dmfexp/zwhong/rsm_rise/scripts/nb/df_idm_ensure.sh threading_expert_play123456789101112131415161718192021222324252627282930313233343536373839404142#!/usr/bin/env bash# gen_q#274 run 36 -- make sure this task's IDM decoders exist before an eval cell runs.## WHY THIS EXISTS RATHER THAN AN LSF DEPENDENCY. The whole wave is ONE resumable pack whose slots# drain a shared queue (scripts/pack_drain.sh), so an eval payload can start before the training# payload on another slot has finished. A `-w done(...)` dependency would instead need a second# submission and would not fire if stage 1 were preempted -- and preemption is the normal case on# this queue. So each eval payload calls this first: whoever gets the lock trains, everyone else# waits for the probe's output file. Training is idempotent and skips completed variants, so a# preempted trainer simply resumes on the next slot that takes the lock.## usage: df_idm_ensure.sh <task> -> 0 when status/nb/df_idm/<task>_best.txt existsset -uo pipefailROOT=/proj/dmfexp/zwhong/rsm_riseTASK=${1:?usage: df_idm_ensure.sh <task>}STAT=$ROOT/status/nb/df_idmBEST=$STAT/${TASK}_best.txtLOCK=$ROOT/runs/$TASK/idm/.train.lockdmkdir -p "$STAT" "$ROOT/runs/$TASK/idm"[ -s "$BEST" ] && exit 0for attempt in $(seq 1 240); do # 240 x 60 s = 4 h of patience, then give up loudly [ -s "$BEST" ] && { echo "[df_idm_ensure] $TASK ready ($(cat $BEST))"; exit 0; } if mkdir "$LOCK" 2>/dev/null; then echo "host=$(hostname) pid=$$ job=${LSB_JOBID:-none} $(date -u)" > "$LOCK/owner" trap 'rm -rf "$LOCK"' EXIT echo "[df_idm_ensure] $TASK: took the lock, training the IDMs $(date -u)" bash $ROOT/scripts/nb/df_idm_train_payload.sh "$TASK"; rc=$? rm -rf "$LOCK"; trap - EXIT [ -s "$BEST" ] && exit 0 echo "[df_idm_ensure] $TASK: training returned rc=$rc but $BEST is absent" exit 2 fi # break a lock whose owner is gone (a preempted trainer leaves the directory behind) if [ -n "$(find "$LOCK" -maxdepth 0 -mmin +90 2>/dev/null)" ]; then echo "[df_idm_ensure] $TASK: stale lock older than 90 min, breaking it" rm -rf "$LOCK" 2>/dev/null fi [ "$attempt" = 1 ] && echo "[df_idm_ensure] $TASK: another slot is training; waiting $(date -u)" sleep 60doneecho "[df_idm_ensure] $TASK: TIMED OUT waiting for $BEST"exit 2123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116#!/usr/bin/env bash# gen_q#274, stream DF_MAKEITWORK run 36 -- ONE eval cell of the IDM-decoded DF column, or of the# diffused-action arm it is published beside.## ============================================================================================# THE DESIGN CHOICE, DECLARED IN THE CELL NAME ITSELF SO IT CANNOT GO MISSING.# decode=idm -> "DF plans OBSERVATION LATENTS, a LEARNED DECODER emits actions".# decode=dfact -> "DF emits actions" (its own diffused action channel) -- the arm every# landed RISE DF cell ran, kept measurable side by side at the identical# world model, horizon, guidance, candidate count, policy seed and eval seed.# The IDM arm's tag carries the decoder shape (idmk8 / idmkfull / idmk1), and the diag JSON# records decode / idm_dir / idm_mode / idm_offsets / idm_noise_rel / idm_step.# Upstream's own headline maze2d numbers use a hand-written PD controller on diffused POSITIONS# rather than the model's actions (df_planning.py:272-320; README 71/126), and our main-branch# gate measured 46.3 +- 1.5 for that arm vs 15.1 +- 1.1 for diffused actions (LSF 1895313). The# IDM is the general, LEARNED form of that controller. The reader is told, every time.## EVALUATION CONTRACT -- no exceptions, and every one of these is fixed here, not chosen per cell:# * the task's canonical region and the project's own env config (no narrowed initial-state box);# * horizon 400 (scripts/eval_cell.sh's project default, what every DINO-WM MPC row uses);# * 50 episodes per cell;# * 3 policy seeds (S0A_seed0/1/2) x 3 eval seeds (0/1/2) -- no hand-picked seed;# * the stock success criterion (threading stock, mug in_drawer -- eval_cell.sh's defaults, i.e.# the SAME criterion every other column in tab:flagship is scored with). Not relaxed here.## CONTROLS THE WAVE PUBLISHES BESIDE EVERY SCORE (generated by df_idm_gen_queue.sh, same grid):# * random-of-N over the IDENTICAL candidate pool (select=random: same model, same guidance, same# generator, same n_plans bundle; only the pick changes);# * the NO-SELECTION floor (n_plans=1 -- there is nothing to select among);# * per-cell J spread / ties-at-max / selection gap, from the diag JSON;# * the BC-actor no-selection baseline already on record: threading 0.000, mug 0.027# (status/nb/df_table.txt:9,90).## FAIRNESS. training.plan_n=1 keeps the RISE planner OFF and selects the plain rollout policy, so# no RSM/IQL critic ever ranks a DF candidate (rule 7; eval.py refuses the cell without it). No# goal guidance. The guidance objective is DF's own predicted binary-provenance reward channel,# unchanged. The IDM adds no information: same cache, same encoder, same split, dataset actions# as supervision -- exactly what a BC column gets.# ============================================================================================## usage: df_idm_eval_payload.sh <task> <gamma> <guidance> <n_plans> <polseed> <evalseed> \# <decode: idm|dfact> <select: argmax|random|mean> [rollouts]set -uo pipefailROOT=/proj/dmfexp/zwhong/rsm_riseTASK=$1; GAMMA=$2; GUID=$3; NP=$4; PSEED=$5; SEED=$6; DEC=$7; SEL=$8; ROLL=${9:-50}case "$TASK" in threading_expert_play) ENVCFG=robomimic_threading_coverage ;; mug_expert_suboptimal) ENVCFG=robomimic_mug ;; *) echo "[df_idm_eval] unknown task $TASK"; exit 2 ;;esaccase "$DEC" in idm|dfact) ;; *) echo "[df_idm_eval] decode must be idm|dfact"; exit 2;; esaccase "$SEL" in argmax|random|mean) ;; *) echo "[df_idm_eval] select must be argmax|random|mean"; exit 2;; esac
PY=$ROOT/venv_df/bin/pythonH=$($PY -c "print(int(round(1/(1-$GAMMA))))")CKPT=$(ls $ROOT/runs/$TASK/policy/S0A_seed${PSEED}/*/*/models/model_epoch_5000.pth 2>/dev/null | head -1)WM=${RR_DF_IDM_WM:-$ROOT/runs/$TASK/wm/df_G0/ckpt_s40000.pt}FS=$ROOT/cache/$TASK/feat_stats.npzfor f in "$CKPT" "$WM" "$FS"; do [ -f "$f" ] || { echo "[df_idm_eval] MISSING $f"; exit 2; }; donecase "$WM" in *df_G1*) echo "[df_idm_eval] REFUSING df_G1 -- measured worse (run 35)"; exit 2;; esac
DECTAG=dfactif [ "$DEC" = idm ]; then bash $ROOT/scripts/nb/df_idm_ensure.sh "$TASK" || exit 1 IDMTAG=${RR_DF_IDM_TAG:-$(cat $ROOT/status/nb/df_idm/${TASK}_best.txt 2>/dev/null)} [ -n "$IDMTAG" ] || { echo "[df_idm_eval] no IDM tag for $TASK"; exit 1; } IDMDIR=$ROOT/runs/$TASK/idm/$IDMTAG [ -f "$IDMDIR/idm_last.pt" ] || { echo "[df_idm_eval] MISSING $IDMDIR/idm_last.pt"; exit 1; } DECTAG="idm${IDMTAG}" export RR_DF_DECODE=idm RR_DF_IDM=$IDMDIRelse export RR_DF_DECODE=diffusedfi
SELTAG=""; [ "$SEL" != argmax ] && SELTAG="-$SEL"NOSEL=""; [ "$NP" = 1 ] && NOSEL="-nosel" # the no-selection floor: nothing to select among# WM tag derived from the checkpoint path so an RR_DF_IDM_WM override cannot collide with, or# silently overwrite, a cell measured on a different world model. For the DEFAULT WM# (wm/df_G0/ckpt_s40000.pt) this yields exactly "DFG0s40000", i.e. every already-landed cell name# is unchanged byte for byte.WMTAG="DF$(basename "$(dirname "$WM")" | sed 's/^df_//')$(basename "$WM" .pt | sed 's/^ckpt_//')"# The planner commits RR_DF_EXECUTE frames of each plan before replanning. The project default is# 8 and EVERY landed cell ran at 8; an override is tagged into the cell name so an ex!=8 cell can# neither collide with nor overwrite a landed ex=8 cell. At ex=8 EXTAG is empty, i.e. every# already-landed cell name is unchanged byte for byte.EX=${RR_DF_EXECUTE:-8}EXTAG=""; [ "$EX" != 8 ] && EXTAG="-ex$EX"CELL="E1-$WMTAG-R$GAMMA-$H-plan-Ndf$NP-g$GUID$EXTAG$SELTAG$NOSEL-$DECTAG-DF274IDM-es1-sS0As${PSEED}"OUTD=$ROOT/runs/$TASK/eval_onactor/df274idm; mkdir -p "$OUTD"O=$OUTD/${CELL}-s${SEED}.jsonif [ -s "$O" ]; then echo "[df_idm_eval] $O exists -- skip"; exit 0; fi
export RR_DF_CKPT=$WM RR_DF_FEAT_STATS=$FS RR_DF_HORIZON=$H RR_DF_GUIDANCE=$GUID \ RR_DF_GAMMA=$GAMMA RR_DF_NPLANS=$NP RR_DF_EXECUTE=$EX RR_DF_SEED=$SEED RR_DF_SELECT=$SEL \ RR_DF_DIAG=$OUTD/${CELL}-s${SEED}.diag.jsonecho "[df_idm_eval] $(date -u) host=$(hostname) gpu=${CUDA_VISIBLE_DEVICES:-?} cell=$CELL seed=$SEED"echo "[df_idm_eval] decode=$RR_DF_DECODE idm=${RR_DF_IDM:-none} wm=$WM H=$H g=$GUID n_plans=$NP execute=$EX"echo "[df_idm_eval] THIS CELL IS: $( [ "$DEC" = idm ] \ && echo 'DF PLANS STATES, A LEARNED DECODER EMITS ACTIONS' \ || echo 'DF EMITS ACTIONS (its own diffused action channel)')"
$ROOT/scripts/eval_cell.sh "$TASK" "$CKPT" "$ENVCFG" "$O" \ exp.num_rollouts=$ROLL exp.rollout_horizon=${RR_EVAL_HORIZON:-400} exp.eval_seed=$SEED \ training.plan_n=1 \ exp.eval_cell=$CELL exp.eval_task=$TASKrc=$?if [ -s "$O" ]; then echo "[df_idm_eval] JSON LANDED rc=$rc $O"else # rc=99 is eval_cell.sh's HOST-level claim ("this host cannot create an EGL framebuffer"), not a # statement about the cell. Propagate it verbatim so the queue index stays reclaimable. if [ "$rc" = 99 ]; then echo "[df_idm_eval] NO JSON rc=99 -- HOST-LEVEL; propagating 99"; exit 99 fi echo "[df_idm_eval] NO JSON rc=$rc"; exit 1fi123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384#!/usr/bin/env bash# gen_q#274, stream DF_MAKEITWORK run 36 -- generate the IDM wave's per-cell payloads and the# shared drain queue. Idempotent: re-running regenerates the same files and the same order, and# every payload skips a cell whose JSON already exists, so the whole wave is resumable.## THE GRID, fixed here so no cell can be added or dropped after a number is seen:# tasks threading_expert_play, mug_expert_suboptimal (the RISE flagship pair)# world model runs/<task>/wm/df_G0/ckpt_s40000.pt (df_G1's 4:2:1 share measured WORSE, run 35)# gamma 0.95 -> H = 1/(1-gamma) = 20 planned frames, the horizon family #273 sweeps# guidance 0.0 for the whole 3x3 grid, plus a 5.0 spot check on the headline arm.# WHY 0.0 IS THE GRID: FINDING O measured that DF's own objective J ranks its own# candidates BACKWARDS (spearman(J,-err) down to -0.292; argmaxJ_gain negative in 3 of# 4 cells), and that guidance is NOT inert -- it roughly doubles the pool's action# spread. Turning the guidance scale up therefore feeds a knob into a ranker that is# anti-correlated with action quality. The grid is run at g=0 so the IDM decoder is# tested on its own merits; g=5.0 is carried as a disclosed spot check, never as the# headline.# n_plans 128 (the stream's number), and 1 for the NO-SELECTION FLOOR# seeds policy S0A_seed{0,1,2} x eval seed {0,1,2}, 50 episodes, horizon 400# arms per (task, policy seed, eval seed):# 1 idm argmax N=128 the headline: DF plans states, a learned decoder emits actions# 2 idm random N=128 RANDOM-OF-N over the IDENTICAL pool (the required control)# 3 idm argmax N=1 the NO-SELECTION FLOOR (nothing to select among)# 4 dfact argmax N=128 DF EMITS ACTIONS -- the arm the IDM replaces, published beside it# => 2 tasks x 3 x 3 x 4 = 72 cells, + 2 spot checks = 74.## ORDER: policy seed, then eval seed, then task, then arm -- so the four arms of one (task, seed)# cell land together (they are only interpretable together), consecutive entries are the SAME task# (warm hdf5 page cache, CLAUDE.md), and a partially drained queue still yields complete,# control-bearing rows starting with policy seed 0.set -uo pipefailROOT=/proj/dmfexp/zwhong/rsm_riseD=$ROOT/scripts/nb/df_idm_cellsQ=$ROOT/status/packs/df_idm_queue_20260924.txtmkdir -p "$D" "$(dirname "$Q")"GAMMA=0.95: > "$Q.new"
emit() { # emit <name> <body...> local n=$1; shift { echo '#!/usr/bin/env bash' echo "# generated by scripts/nb/df_idm_gen_queue.sh -- gen_q#274 run 36 (DF -> IDM decoder wave)" echo 'set -uo pipefail' echo "$@" } > "$D/$n.sh" chmod +x "$D/$n.sh" echo "$D/$n.sh" >> "$Q.new"}
for T in threading_expert_play mug_expert_suboptimal; do { echo '#!/usr/bin/env bash' echo "# generated -- train/locate this task's IDM decoders before any eval cell needs them" echo "exec bash $ROOT/scripts/nb/df_idm_ensure.sh $T" } > "$D/ensure_$T.sh" chmod +x "$D/ensure_$T.sh"done
n=0for P in 0 1 2; do for E in 0 1 2; do for T in threading_expert_play mug_expert_suboptimal; do case $T in threading_expert_play) TT=thr;; *) TT=mug;; esac # arm, decode, select, n_plans for SPEC in "idm idm argmax 128" "rnd idm random 128" "nosel idm argmax 1" "dfact dfact argmax 128"; do set -- $SPEC; ARM=$1; DEC=$2; SEL=$3; NP=$4 emit "$(printf 'c%03d' $n)_${TT}_p${P}_e${E}_${ARM}" \ "exec bash $ROOT/scripts/nb/df_idm_eval_payload.sh $T $GAMMA 0.0 $NP $P $E $DEC $SEL 50" n=$((n+1)) done done donedone# disclosed spot check: the headline arm with guidance ON, policy seed 0 / eval seed 0 onlyfor T in threading_expert_play mug_expert_suboptimal; do case $T in threading_expert_play) TT=thr;; *) TT=mug;; esac emit "$(printf 'c%03d' $n)_${TT}_p0_e0_idm_g5" \ "exec bash $ROOT/scripts/nb/df_idm_eval_payload.sh $T $GAMMA 5.0 128 0 0 idm argmax 50" n=$((n+1))done
mv "$Q.new" "$Q"echo "[df_idm_gen] wrote $n cell payloads under $D"echo "[df_idm_gen] queue $Q ($(wc -l < "$Q") entries)"echo "[df_idm_gen] ensure payloads: $D/ensure_*.sh"123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156#!/usr/bin/env python3"""Aggregate the DF+IDM on-actor eval cells into the 3x3 (policy seed x eval seed) grid.
Cell name grammar (from scripts/nb/df_idm_eval_payload.sh): E1-<WM>-R<gamma>-<H>-plan-Ndf<N>-g<guid>[-ex<E>][-random][-nosel]-<dec>-DF274IDM-es1-sS0As<P>-s<E>where <P> = policy seed, <E> = eval seed. Arm is one of: argmax : Ndf<N>, no -random, no -nosel (DF's own J ranks N candidates) random : Ndf<N> -random (random-of-N on the IDENTICAL pool) nosel : Ndf1 -nosel (no-selection floor, N=1: nothing to select among)Decoder is `dfact` (DF's own diffused actions) or `idm<tag>` (learned inverse dynamics).
EVERY KNOB THAT CHANGES THE MEANING OF A NUMBER IS A COLUMN, so two cells can never be averagedinto one mean because the table did not print what separated them. run 40 added three that theprevious version silently dropped or never had: * g -- guidance scale. The old table KEYED on it but did not PRINT it, so a g=0.0 row and a g=5.0 row appeared as two identical-looking lines. * N -- candidate count. The old table did not key on it at all; once run 40's N=512/N=1024 cells land, an N=512 argmax cell would have been averaged into the N=128 headline. * ex -- frames committed per plan before replanning (RR_DF_EXECUTE, project default 8).The no-selection floor has N=1 by construction, so it is keyed WITHOUT N and shown against everyN row of the same (task, wm, gamma, H, g, ex, decoder) group -- it is the same measurement foreach of them. It IS keyed on ex, which does change it.
A row is QUOTABLE only when all three arms read 9/9."""import json, glob, os, re, sysfrom collections import defaultdictsys.path.insert(0, os.path.dirname(os.path.abspath(__file__)))from resume_cov import resume_coverage
# run 51-main (gen_q#274). THIS BUILDER AVERAGED NON-QUOTABLE CELLS INTO ITS HEADLINE.# status/nb/resume_audit.json names 16 df274idm cells whose published health covers only the episodes# AFTER an episode-level resume while their score covers all 50 (FINDING AJ, eval.py:1179-1203: the# resume carried the env's numpy state but neither the planner's generator nor its health# accumulators, so the tail also flew the WRONG plan draw and the score is not reproducible either).# td_table.py has refused such cells since run 48 and df_table.py since earlier this run; this file# had no check at all AND it pools up to 9 cells into a mean, so a partial cell was invisible twice# over. The headline mean is now computed over FULL-coverage cells ONLY. Nothing is dropped# silently: the excluded count rides on the row, the mean it replaces is printed beside it, and every# excluded cell is named in the per-cell detail with its coverage.PARTIAL = {} # cell name -> resume_coverage() dict, for the cells this builder refusesNOTCOMP = set() # cells whose coverage could not be computed at all
PAT = re.compile( r'^E1-(?P<wm>[^-]+)-R(?P<gam>[\d.]+)-(?P<H>\d+)-plan-Ndf(?P<n>\d+)-g(?P<g>[\d.]+)' r'(?:-ex(?P<ex>\d+))?(?P<random>-random)?(?P<nosel>-nosel)?' r'-(?P<dec>.+?)-DF274IDM-es1-sS0As(?P<ps>\d+)-s(?P<es>\d+)$')
sel = defaultdict(dict) # (task,wm,gam,H,g,ex,dec,N) -> {(arm,ps,es): (sr,nep,hz)}floor = defaultdict(dict) # (task,wm,gam,H,g,ex,dec) -> {(ps,es): (sr,nep,hz)}for p in sorted(glob.glob('runs/*/eval_onactor/df274idm/*.json')): if p.endswith('.diag.json'): continue name = p.rsplit('/', 1)[1][:-5] m = PAT.match(name) if not m: print('UNPARSED', name, file=sys.stderr); continue d = json.load(open(p)) if d.get('partial'): continue task = p.split('runs/')[1].split('/')[0] ex = m['ex'] or '8' # the cell's own diagnostics sidecar carries `plans` and `execute_frames` _diag = {} _dp = p[:-5] + '.diag.json' if os.path.exists(_dp): try: _diag = json.load(open(_dp)) except Exception: _diag = {} _rc = resume_coverage(d, _diag) if _rc is None: NOTCOMP.add(name) elif _rc['verdict'] != 'FULL': PARTIAL[name] = _rc v = (d['success_rate'], d.get('num_episodes'), d.get('rollout_horizon'), name) base = (task, m['wm'], m['gam'], m['H'], m['g'], ex, m['dec']) if m['nosel']: floor[base][(int(m['ps']), int(m['es']))] = v else: arm = 'random' if m['random'] else 'argmax' sel[base + (int(m['n']),)][(arm, int(m['ps']), int(m['es']))] = v
def mean(vs): """vs is a list of (success_rate, cell_name). The mean is over FULL-coverage cells only; the count of cells refused for partial health is appended as `-<k>p` so the denominator never overstates what was measured cleanly.""" ok = [sr for sr, nm in vs if nm not in PARTIAL and nm not in NOTCOMP] ref = len(vs) - len(ok) tag = '' if not ref else '-%dp' % ref if not ok: return f'{"--":>8s} (0/9{tag})' if not vs else f'{"ALLPARTIAL":>8s} (0/9{tag})' return f'{sum(ok)/len(ok):8.3f} ({len(ok)}/9{tag})'
def mean_allcells(vs): """The mean this builder USED to print, including the refused cells. Printed beside the headline whenever they differ, so the change this run makes is visible and not a silent restatement.""" if not vs: return None return sum(sr for sr, nm in vs) / len(vs)
hdr = (f"{'task':26s} {'wm':12s} {'gam':6s} {'H':3s} {'g':5s} {'ex':3s} {'N':5s} {'dec':14s} " + ' '.join(f'{a+"(n/9)":>18s}' for a in ('argmax', 'random', 'nosel')))print(hdr)keys = sorted(sel) + sorted(k + (None,) for k in floor if not any(k == s[:7] for s in sel))for key in keys: task, wm, gam, H, g, ex, dec, N = key cells = sel.get(key, {}) _sets = [[(v[0], v[3]) for (a, _, _), v in cells.items() if a == arm] for arm in ('argmax', 'random')] _sets.append([(v[0], v[3]) for v in floor.get(key[:7], {}).values()]) cols = [mean(x) for x in _sets] print(f'{task:26s} {wm:12s} {gam:6s} {H:3s} {g:5s} {ex:3s} ' f'{("-" if N is None else str(N)):5s} {dec:14s} ' + ' '.join(f'{c:>18s}' for c in cols)) # If refusing partial cells moved any column, say so on the row itself. _msg = [] for _lab, _x in zip(('argmax', 'random', 'nosel'), _sets): _ref = [nm for _, nm in _x if nm in PARTIAL or nm in NOTCOMP] if _ref: _all = mean_allcells(_x) _msg.append('%s: %d of %d cell(s) REFUSED for partial health; the all-cells mean this ' 'replaces was %.3f' % (_lab, len(_ref), len(_x), _all)) for _m in _msg: print(' !! ' + _m) if _msg: print(' !! a refused cell resumed mid-run, so its health covers fewer episodes than its ' 'score and its tail flew the wrong plan draw (FINDING AJ). Named in the detail below.')
def _mark(nm): rc = PARTIAL.get(nm) if rc: return (' !! REFUSED %s: resumed at episode %d of %d, health covers %d plans where all ' 'episodes imply %d (%.0f%%); NOT QUOTABLE -- re-run fresh' % (rc['verdict'], rc['resumed_from'], rc['n_ep'], rc['plans'], rc['expected_all'], 100.0 * (rc['coverage'] or 0))) if nm in NOTCOMP: return ' !! REFUSED: health coverage NOT COMPUTABLE (no diag plans / lengths / chunk)' return ''
print()print('HEALTH-COVERAGE REFUSALS (run 51-main): %d cell(s) excluded from every mean above for partial ' 'health, %d for a coverage that could not be computed.' % (len(PARTIAL), len(NOTCOMP)))print(' The invariant is scripts/nb/resume_cov.py, the same one td_table.py and df_table.py use.')print(' Full audit of every column: status/nb/resume_audit.txt')print()print('per-cell detail (task/wm/gam/H/g/ex/dec : arm N ps es -> sr, nep, horizon)')for key in sorted(sel): for (arm, ps, es) in sorted(sel[key]): sr, nep, hz, nm = sel[key][(arm, ps, es)] print(f' {"/".join(map(str, key[:7]))} : {arm:6s} N={key[7]:<5d} p{ps} e{es} -> {sr:.3f} nep={nep} hz={hz}{_mark(nm)}')for key in sorted(floor): for (ps, es) in sorted(floor[key]): sr, nep, hz, nm = floor[key][(ps, es)] print(f' {"/".join(map(str, key))} : nosel N=1 p{ps} e{es} -> {sr:.3f} nep={nep} hz={hz}{_mark(nm)}')123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596#!/usr/bin/env bash# gen_q#274, stream DF_MAKEITWORK run 36 -- TRAIN THE INVERSE DYNAMICS DECODER for one task.## ============================================================================================# WHAT THIS CHANGES ABOUT THE DF COLUMN, STATED BEFORE ANY NUMBER EXISTS.# The RISE DF column becomes "DF plans OBSERVATION LATENTS, a learned decoder emits actions"# instead of "DF emits actions". This is the general form of what upstream's own headline# maze2d numbers do: df_planning.py:272-320 executes a HAND-WRITTEN PD controller (gains 12.5# and 1.2) on diffused POSITIONS whenever action_dim != 2, which is upstream's own recommended# recipe (README 71/126, `dataset.action_mean=[] dataset.action_std=[]`). Our main-branch gate# (LSF 1895313, 1024 episodes/cell, maze2d-medium) measured 46.3 +- 1.5 for the PD-controller# arm against 15.1 +- 1.1 for the diffused-action arm -- the latter sitting inside the paper's# own "Diffuser w/ diffused action" floor of 13.5 +- 2.3. Upstream's README line 86 says, in a# commented-out block, that they never got the diffused-action setting working.# BOTH ARMS ARE MEASURED AND PUBLISHED SIDE BY SIDE. Nothing is swapped silently.## FAIRNESS. The IDM reads cache/<task> ONLY -- the same frozen DINOv2 ViT-S/14 cls+GeM features,# the same 9-d proprio, the same feat_stats, the same held-out episode split every other DF# diagnostic uses -- and is supervised by cache/<task>/act.f32.npy, the same dataset actions# every BC column is trained on. NO reward, NO success bit, NO goal, NO simulator state, NO# object poses, NO pixels. `code/df_rise/df_idm.py`'s header enumerates the inputs.## ============================================================================================# REGISTERED READ-OUT (written here BEFORE the numbers land; repeated in the report):# BAR 1 r2_oracle_val (this script's JSONs): IDM R2 on TRUE held-out observation pairs, against# the constant "dataset mean action" predictor -- df_actprobe's definition verbatim.# >= 0.711 the decoder has capacity; < 0.711 it does NOT clear DF's own action head's# best number (FINDING H: threading single 0.569 / K32-mean 0.711, mug 0.283 / 0.474)# and I will report plainly that the decoder is not the fix.# BAR 2 df_idm_probe.py's `bar2.pass_`: the IDM decoding DF's OWN PLANNED latents must beat# DF's own action head at its BEST lag, on the same held-out states, same K-sample mean.# This is the decisive offline test and it is what selects WHICH decoder shape goes into# the env -- never a success rate, never an eval seed.# PESSIMISTIC PRIOR REGISTERED IN ADVANCE: df_G0's health.jsonl at step 40000 gives# fid/obs_ratio_h1 = 1.485 (threading) / 1.606 (mug) -- the ONE-STEP planned latent delta# is 1.5-1.6x WORSE than the stay-put predictor. So I expect mode `k1` to be the worst# of the three shapes and quite possibly at or below DF's own head. The horizons where# DF's observation channel is at or below 1.0 are h >= 8, which is why `k8` (one planned# waypoint -> the whole 8-action chunk) and `kfull` exist and are the arms with a# mechanism behind them.# BAR 3 the success contract, enforced by df_idm_eval_payload.sh: canonical region, horizon# 400, 50 episodes/cell, 3 policy x 3 eval seeds, and NO number is reportable without# random-of-N over the identical pool, the no-selection floor (n_plans=1), per-cell score# spread / ties-at-max / selection gap, and the BC-actor floor already on record# (status/nb/df_table.txt:9,90 -- threading 0.000, mug 0.027).# ============================================================================================## RESUMABLE: every variant is skipped if its idm.json exists; training itself resumes from# idm_last.pt. The probe is skipped if its JSON exists.## usage: df_idm_train_payload.sh <task>set -uo pipefailROOT=/proj/dmfexp/zwhong/rsm_riseTASK=${1:?usage: df_idm_train_payload.sh <task>}PY=$ROOT/venv_df/bin/pythonCACHE=$ROOT/cache/$TASKDFCKPT=${RR_DF_IDM_WM:-$ROOT/runs/$TASK/wm/df_G0/ckpt_s40000.pt}OUTROOT=$ROOT/runs/$TASK/idmSTAT=$ROOT/status/nb/df_idmSTEPS=${RR_IDM_STEPS:-30000}mkdir -p "$OUTROOT" "$STAT"[ -d "$CACHE" ] || { echo "[df_idm_train] MISSING cache $CACHE"; exit 2; }[ -f "$DFCKPT" ] || { echo "[df_idm_train] MISSING DF world model $DFCKPT"; exit 2; }# df_G1's 4:2:1 channel share measured WORSE (run 35) and must not be used; df_G0 is the arm.case "$DFCKPT" in *df_G1*) echo "[df_idm_train] REFUSING df_G1 -- measured worse (run 35)"; exit 2;; esac
echo "[df_idm_train] $(date -u) host=$(hostname) gpu=${CUDA_VISIBLE_DEVICES:-?} task=$TASK wm=$DFCKPT"cd $ROOT/code/df_rise || exit 2export PYTHONPATH=$ROOT/code/df_rise:${PYTHONPATH:-}
rc_all=0ARGS=()for MODE in k8 kfull k1; do # k8/kfull first: the shapes with a mechanism behind them for NR in 1.0 0.0; do TAG="${MODE}_n$(echo $NR | tr -d '.')" OD=$OUTROOT/$TAG ARGS+=("--idm-dir" "$OD") if [ -s "$OD/idm.json" ]; then echo "[df_idm_train] $TAG done -- skip"; continue; fi echo "[df_idm_train] --- training $TAG (mode=$MODE noise_rel=$NR steps=$STEPS) $(date -u)" $PY df_idm.py --cache "$CACHE" --out "$OD" --mode "$MODE" --noise-rel "$NR" \ --steps "$STEPS" --split-seed 0 --resume 1 || { echo "[df_idm_train] FAILED $TAG"; rc_all=1; } donedone
PROBE=$STAT/${TASK}_probe.jsonif [ -s "$PROBE" ]; then echo "[df_idm_train] probe $PROBE exists -- skip"else echo "[df_idm_train] --- probe (BAR 2) $(date -u)" $PY df_idm_probe.py --ckpt "$DFCKPT" --cache "$CACHE" "${ARGS[@]}" \ --out "$PROBE" --best-out $STAT/${TASK}_best.txt \ --n-states ${RR_IDM_PROBE_STATES:-64} --kmax 32 --execute-frames 8 \ --guidance 0.0 --guidance 5.0 --gamma 0.95 || { echo "[df_idm_train] PROBE FAILED"; rc_all=1; }fiecho "[df_idm_train] done rc=$rc_all $(date -u); best=$(cat $STAT/${TASK}_best.txt 2>/dev/null)"exit $rc_all123456#!/usr/bin/env bash# generated by scripts/nb/df_idmcap_gen_queue.sh -- gen_q#274 run 40 (planner capacity)set -uo pipefailexport RR_DF_IDM_TAG=k8_n10export RR_DF_EXECUTE=8exec bash /proj/dmfexp/zwhong/rsm_rise/scripts/nb/df_idm_eval_payload.sh mug_expert_suboptimal 0.95 0.0 512 0 0 idm argmax 50123456#!/usr/bin/env bash# generated by scripts/nb/df_idmcap_gen_queue.sh -- gen_q#274 run 40 (planner capacity)set -uo pipefailexport RR_DF_IDM_TAG=k8_n10export RR_DF_EXECUTE=8exec bash /proj/dmfexp/zwhong/rsm_rise/scripts/nb/df_idm_eval_payload.sh mug_expert_suboptimal 0.95 0.0 512 0 0 idm random 50123456#!/usr/bin/env bash# generated by scripts/nb/df_idmcap_gen_queue.sh -- gen_q#274 run 40 (planner capacity)set -uo pipefailexport RR_DF_IDM_TAG=k8_n10export RR_DF_EXECUTE=8exec bash /proj/dmfexp/zwhong/rsm_rise/scripts/nb/df_idm_eval_payload.sh threading_expert_play 0.95 0.0 512 0 0 idm argmax 50123456#!/usr/bin/env bash# generated by scripts/nb/df_idmcap_gen_queue.sh -- gen_q#274 run 40 (planner capacity)set -uo pipefailexport RR_DF_IDM_TAG=k8_n10export RR_DF_EXECUTE=8exec bash /proj/dmfexp/zwhong/rsm_rise/scripts/nb/df_idm_eval_payload.sh threading_expert_play 0.95 0.0 512 0 0 idm random 50123456#!/usr/bin/env bash# generated by scripts/nb/df_idmcap_gen_queue.sh -- gen_q#274 run 40 (planner capacity)set -uo pipefailexport RR_DF_IDM_TAG=k8_n10export RR_DF_EXECUTE=8exec bash /proj/dmfexp/zwhong/rsm_rise/scripts/nb/df_idm_eval_payload.sh mug_expert_suboptimal 0.95 0.0 1024 0 0 idm argmax 50123456#!/usr/bin/env bash# generated by scripts/nb/df_idmcap_gen_queue.sh -- gen_q#274 run 40 (planner capacity)set -uo pipefailexport RR_DF_IDM_TAG=k8_n10export RR_DF_EXECUTE=8exec bash /proj/dmfexp/zwhong/rsm_rise/scripts/nb/df_idm_eval_payload.sh mug_expert_suboptimal 0.95 0.0 1024 0 0 idm random 50123456#!/usr/bin/env bash# generated by scripts/nb/df_idmcap_gen_queue.sh -- gen_q#274 run 40 (planner capacity)set -uo pipefailexport RR_DF_IDM_TAG=k8_n10export RR_DF_EXECUTE=8exec bash /proj/dmfexp/zwhong/rsm_rise/scripts/nb/df_idm_eval_payload.sh threading_expert_play 0.95 0.0 1024 0 0 idm argmax 50rsm_rise/scripts/nb/df_idm_cells/c038_mug_p1_e1_nosel.shAdded+4
rsm_rise/scripts/nb/df_idm_cells/c039_mug_p1_e1_dfact.shAdded+4
rsm_rise/scripts/nb/df_idm_cells/c040_thr_p1_e2_idm.shAdded+4
rsm_rise/scripts/nb/df_idm_cells/c041_thr_p1_e2_rnd.shAdded+4
rsm_rise/scripts/nb/df_idm_cells/c042_thr_p1_e2_nosel.shAdded+4
rsm_rise/scripts/nb/df_idm_cells/c043_thr_p1_e2_dfact.shAdded+4
rsm_rise/scripts/nb/df_idm_cells/c044_mug_p1_e2_idm.shAdded+4
rsm_rise/scripts/nb/df_idm_cells/c045_mug_p1_e2_rnd.shAdded+4
rsm_rise/scripts/nb/df_idm_cells/c046_mug_p1_e2_nosel.shAdded+4
rsm_rise/scripts/nb/df_idm_cells/c047_mug_p1_e2_dfact.shAdded+4
rsm_rise/scripts/nb/df_idm_cells/c048_thr_p2_e0_idm.shAdded+4
rsm_rise/scripts/nb/df_idm_cells/c049_thr_p2_e0_rnd.shAdded+4
rsm_rise/scripts/nb/df_idm_cells/c050_thr_p2_e0_nosel.shAdded+4
rsm_rise/scripts/nb/df_idm_cells/c051_thr_p2_e0_dfact.shAdded+4
rsm_rise/scripts/nb/df_idm_cells/c052_mug_p2_e0_idm.shAdded+4
rsm_rise/scripts/nb/df_idm_cells/c053_mug_p2_e0_rnd.shAdded+4
rsm_rise/scripts/nb/df_idm_cells/c054_mug_p2_e0_nosel.shAdded+4
rsm_rise/scripts/nb/df_idm_cells/c055_mug_p2_e0_dfact.shAdded+4
rsm_rise/scripts/nb/df_idm_cells/c056_thr_p2_e1_idm.shAdded+4
rsm_rise/scripts/nb/df_idm_cells/c057_thr_p2_e1_rnd.shAdded+4
rsm_rise/scripts/nb/df_idm_cells/c058_thr_p2_e1_nosel.shAdded+4
rsm_rise/scripts/nb/df_idm_cells/c059_thr_p2_e1_dfact.shAdded+4
rsm_rise/scripts/nb/df_idm_cells/c060_mug_p2_e1_idm.shAdded+4
rsm_rise/scripts/nb/df_idm_cells/c061_mug_p2_e1_rnd.shAdded+4
rsm_rise/scripts/nb/df_idm_cells/c062_mug_p2_e1_nosel.shAdded+4
rsm_rise/scripts/nb/df_idm_cells/c063_mug_p2_e1_dfact.shAdded+4
rsm_rise/scripts/nb/df_idm_cells/c064_thr_p2_e2_idm.shAdded+4
rsm_rise/scripts/nb/df_idm_cells/c065_thr_p2_e2_rnd.shAdded+4
rsm_rise/scripts/nb/df_idm_cells/c066_thr_p2_e2_nosel.shAdded+4
rsm_rise/scripts/nb/df_idm_cells/c067_thr_p2_e2_dfact.shAdded+4
rsm_rise/scripts/nb/df_idm_cells/c068_mug_p2_e2_idm.shAdded+4
rsm_rise/scripts/nb/df_idm_cells/c069_mug_p2_e2_rnd.shAdded+4
rsm_rise/scripts/nb/df_idm_cells/c070_mug_p2_e2_nosel.shAdded+4
rsm_rise/scripts/nb/df_idm_cells/c071_mug_p2_e2_dfact.shAdded+4
rsm_rise/scripts/nb/df_idm_cells/c072_thr_p0_e0_idm_g5.shAdded+4
rsm_rise/scripts/nb/df_idm_cells/c073_mug_p0_e0_idm_g5.shAdded+4
rsm_rise/scripts/nb/df_idm_cells/ensure_mug_expert_suboptimal.shAdded+3
rsm_rise/scripts/nb/df_idm_cells/ensure_threading_expert_play.shAdded+3
rsm_rise/scripts/nb/df_idm_ensure.shAdded+42
rsm_rise/scripts/nb/df_idm_eval_payload.shAdded+116
rsm_rise/scripts/nb/df_idm_gen_queue.shAdded+84
rsm_rise/scripts/nb/df_idm_tab.pyAdded+156
rsm_rise/scripts/nb/df_idm_train_payload.shAdded+96
rsm_rise/scripts/nb/df_idmcap_cells/c000_mug_N512_ex8_idm.shAdded+6
rsm_rise/scripts/nb/df_idmcap_cells/c001_mug_N512_ex8_rnd.shAdded+6
rsm_rise/scripts/nb/df_idmcap_cells/c002_thr_N512_ex8_idm.shAdded+6
rsm_rise/scripts/nb/df_idmcap_cells/c003_thr_N512_ex8_rnd.shAdded+6
rsm_rise/scripts/nb/df_idmcap_cells/c004_mug_N1024_ex8_idm.shAdded+6
rsm_rise/scripts/nb/df_idmcap_cells/c005_mug_N1024_ex8_rnd.shAdded+6
rsm_rise/scripts/nb/df_idmcap_cells/c006_thr_N1024_ex8_idm.shAdded+6