p-doom/crowd-code-dataset-0.2 huggingface dataset:
[tab] slurm/jobs/mihir/horeka/lam/coinrun/coinrun_lam_as_64 copy.sbatch (shellscript)
#!/usr/bin/env bash

#SBATCH --nodes=1
#SBATCH --ntasks-per-node=1
#SBATCH --time=2-00:00:00
#SBATCH --partition=accelerated
#SBATCH --cpus-per-task=5
#SBATCH --gres=gpu:1
#SBATCH --output=/hkfs/work/workspace/scratch/tum_ind3695-jafa_ws_shared/logs/logs_mihir/coinrun/lam/%x_%j.log
#SBATCH --error=/hkfs/work/workspace/scratch/tum_ind3695-jafa_ws_shared/logs/logs_mihir/coinrun/lam/%x_%j.log
#SBATCH --job-name=train_lam_coinrun_37M_actionspace_64
#SBATCH --requeue
#SBATCH --signal=b:usr1@300 # 5 min before timeout

# --- signal trap to requeue job before timeout ---
requeue_job() {
    echo "[$(date)] caught sigusr1 (timeout warning), requeueing slurm job $SLURM_JOB_ID..."
    # optional: trigger checkpoint saving here
    # e.g., touch $checkpoint_dir/requeue_trigger
    scontrol requeue $SLURM_JOB_ID
    exit 0
}

trap requeue_job sigusr1

# set checkpoint flag based on restart count
restart_count=$(scontrol show job $SLURM_JOB_ID | grep -o 'Restarts=[0-9]*' | cut -d'=' -f2)

if [ $restart_count -eq 0 ]; then
    restore_ckpt_flag="--no-restore-ckpt"
else
    restore_ckpt_flag="--restore-ckpt"
fi

# Log the sbatch script
cat $0

module unload mpi/openmpi/5.0
module unload devel/cuda/12.4
source .venv/bin/activate

job_name=$SLURM_JOB_NAME
slurm_job_id=$SLURM_JOB_ID

CHECKPOINT_DIR=/hkfs/work/workspace/scratch/tum_ind3695-jafa_ws_shared/checkpoints/mihir/coinrun/lam/$job_name/$slurm_job_id
mkdir -p $CHECKPOINT_DIR

array_records_dir=/hkfs/work/workspace/scratch/tum_ind3695-jafa_ws_shared/data_coinrun/coinrun_episodes_10m_gt_actions_split/train
array_records_dir_val=/hkfs/work/workspace/scratch/tum_ind3695-jafa_ws_shared/data_coinrun/coinrun_episodes_10m_gt_actions_split/val

env | grep SLURM

srun python train_lam.py \
    --save_ckpt \
    $restore_ckpt_flag \
    --wandb_id $SLURM_JOB_ID \
    --ckpt_dir $CHECKPOINT_DIR \
    --batch_size=24 \
    --image_height=64 \
    --image_width=64 \
    --max_lr=3e-6 \
    --log_image_interval=1000 \
    --log_checkpoint_interval=1000 \
    --log \
    --num_latents=64 \
    --name="${job_name}_${slurm_job_id}" \
    --tags "coinrun lam_ablation modelsize actionspace" \
    --entity instant-uv \
    --project jafar \
    --lr_schedule wsd \
    --val_data_dir $array_records_dir_val \
    --data_dir $array_records_dir &

child_pid=$!

wait $child_pid
[tab] slurm/jobs/mihir/horeka/lam/coinrun/coinrun_lam_as_128.sbatch (shellscript)
#!/usr/bin/env bash

#SBATCH --nodes=1
#SBATCH --ntasks-per-node=1
#SBATCH --time=2-00:00:00
#SBATCH --partition=accelerated
#SBATCH --cpus-per-task=5
#SBATCH --gres=gpu:1
#SBATCH --output=/hkfs/work/workspace/scratch/tum_ind3695-jafa_ws_shared/logs/logs_mihir/coinrun/lam/%x_%j.log
#SBATCH --error=/hkfs/work/workspace/scratch/tum_ind3695-jafa_ws_shared/logs/logs_mihir/coinrun/lam/%x_%j.log
#SBATCH --job-name=train_lam_coinrun_37M_actionspace_64
#SBATCH --requeue
#SBATCH --signal=b:usr1@300 # 5 min before timeout

# --- signal trap to requeue job before timeout ---
requeue_job() {
    echo "[$(date)] caught sigusr1 (timeout warning), requeueing slurm job $SLURM_JOB_ID..."
    # optional: trigger checkpoint saving here
    # e.g., touch $checkpoint_dir/requeue_trigger
    scontrol requeue $SLURM_JOB_ID
    exit 0
}

trap requeue_job sigusr1

# set checkpoint flag based on restart count
restart_count=$(scontrol show job $SLURM_JOB_ID | grep -o 'Restarts=[0-9]*' | cut -d'=' -f2)

if [ $restart_count -eq 0 ]; then
    restore_ckpt_flag="--no-restore-ckpt"
else
    restore_ckpt_flag="--restore-ckpt"
fi

# Log the sbatch script
cat $0

module unload mpi/openmpi/5.0
module unload devel/cuda/12.4
source .venv/bin/activate

job_name=$SLURM_JOB_NAME
slurm_job_id=$SLURM_JOB_ID

CHECKPOINT_DIR=/hkfs/work/workspace/scratch/tum_ind3695-jafa_ws_shared/checkpoints/mihir/coinrun/lam/$job_name/$slurm_job_id
mkdir -p $CHECKPOINT_DIR

array_records_dir=/hkfs/work/workspace/scratch/tum_ind3695-jafa_ws_shared/data_coinrun/coinrun_episodes_10m_gt_actions_split/train
array_records_dir_val=/hkfs/work/workspace/scratch/tum_ind3695-jafa_ws_shared/data_coinrun/coinrun_episodes_10m_gt_actions_split/val

env | grep SLURM

srun python train_lam.py \
    --save_ckpt \
    $restore_ckpt_flag \
    --wandb_id $SLURM_JOB_ID \
    --ckpt_dir $CHECKPOINT_DIR \
    --batch_size=24 \
    --image_height=64 \
    --image_width=64 \
    --max_lr=3e-6 \
    --log_image_interval=1000 \
    --log_checkpoint_interval=1000 \
    --log \
    --num_latents=64 \
    --name="${job_name}_${slurm_job_id}" \
    --tags "coinrun lam_ablation modelsize actionspace" \
    --entity instant-uv \
    --project jafar \
    --lr_schedule wsd \
    --val_data_dir $array_records_dir_val \
    --data_dir $array_records_dir &

child_pid=$!

wait $child_pid
[content] slurm/jobs/mihir/horeka/lam/coinrun/tmp (plaintext)
-rw-r--r-- 1 tum_cte0515 hk-project-p0023960 2391 Sep  5 17:30 coinrun_lam_133M.sbatch
-rw-r--r-- 1 tum_cte0515 hk-project-p0023960 2391 Sep  5 17:30 coinrun_lam_311.sbatch
-rw-r--r-- 1 tum_cte0515 hk-project-p0023960 2392 Sep  5 17:30 coinrun_lam_400M.sbatch
-rw-r--r-- 1 tum_cte0515 hk-project-p0023960 2334 Sep  5 17:33 coinrun_lam_as_128.sbatch
-rw-r--r-- 1 tum_cte0515 hk-project-p0023960 2332 Sep  5 17:32 coinrun_lam_as_16.sbatch
-rw-r--r-- 1 tum_cte0515 hk-project-p0023960 2332 Sep  5 17:32 coinrun_lam_as_32.sbatch
-rw-r--r-- 1 tum_cte0515 hk-project-p0023960 2332 Sep  5 17:32 coinrun_lam_as_64.sbatch
-rw-r--r-- 1 tum_cte0515 hk-project-p0023960 2308 Sep  5 17:31 coinrun_lam_base.sbatch
[terminal_command] TERMINAL ()
sbatch coinrun_lam_133M.sbatchsbatch coinrun_lam_311.sbatchsbatch coinrun_lam_400M.sbatchsbatch coinrun_lam_as_128.sbatchsbatch coinrun_lam_as_16.sbatchsbatch coinrun_lam_as_32.sbatchsbatch coinrun_lam_as_64.sbatchsbatch coinrun_lam_base.sbatch
[terminal_command] TERMINAL ()
sbatch slurm/jobs/mihir/horeka/lam/coinrun/coinrun_lam_133M.sbatchsbatch slurm/jobs/mihir/horeka/lam/coinrun/coinrun_lam_311.sbatchsbatch slurm/jobs/mihir/horeka/lam/coinrun/coinrun_lam_400M.sbatchsbatch slurm/jobs/mihir/horeka/lam/coinrun/coinrun_lam_as_128.sbatchsbatch slurm/jobs/mihir/horeka/lam/coinrun/coinrun_lam_as_16.sbatchsbatch slurm/jobs/mihir/horeka/lam/coinrun/coinrun_lam_as_32.sbatchsbatch slurm/jobs/mihir/horeka/lam/coinrun/coinrun_lam_as_64.sbatchsbatch slurm/jobs/mihir/horeka/lam/coinrun/coinrun_lam_base.sbatch
[tab] slurm/jobs/mihir/horeka/coinrun/train_dyn_single_gpu.sh (shellscript)
#!/usr/bin/env bash

#SBATCH --nodes=1
#SBATCH --ntasks-per-node=4
#SBATCH --time=00:20:00
#SBATCH --partition=accelerated
#SBATCH --cpus-per-task=5
#SBATCH --gres=gpu:1
#SBATCH --output=/hkfs/work/workspace/scratch/tum_ind3695-jafa_ws_shared/logs/logs_mihir/coinrun/dyn/%x_%j.log
#SBATCH --error=/hkfs/work/workspace/scratch/tum_ind3695-jafa_ws_shared/logs/logs_mihir/coinrun/dyn/%x_%j.log
#SBATCH --job-name=train_dyn_1e-4
#SBATCH --requeue
#SBATCH --signal=b:usr1@300 # 5 min before timeout

# Log the sbatch script
cat $0

module unload mpi/openmpi/5.0
module unload devel/cuda/12.4
source .venv/bin/activate

array_records_dir_train=/hkfs/work/workspace/scratch/tum_ind3695-jafa_ws_shared/data_coinrun/coinrun_episodes_10m_gt_actions_split/train
array_records_dir_val=/hkfs/work/workspace/scratch/tum_ind3695-jafa_ws_shared/data_coinrun/coinrun_episodes_10m_gt_actions_split/val

job_name=$SLURM_JOB_NAME
slurm_job_id=$SLURM_JOB_ID

CHECKPOINT_DIR=/hkfs/work/workspace/scratch/tum_ind3695-jafa_ws_shared/checkpoints/big-runs/dyn/$job_name/$slurm_job_id
mkdir -p $CHECKPOINT_DIR

lam_checkpoint=/hkfs/work/workspace/scratch/tum_ind3695-jafa_ws_shared/checkpoints/big-runs/lam/interactive/3468835
tokenizer_checkpoint=/hkfs/work/workspace/scratch/tum_ind3695-jafa_ws_shared/checkpoints/big-runs/tokenizer/interactive/3468835

env | grep SLURM

srun python train_dynamics.py \
    --save_ckpt \
    --image_height=64 \
    --image_width=64 \
    --ckpt_dir $CHECKPOINT_DIR \
    --batch_size=12 \
    --init_lr=0 \
    --max_lr=1e-4 \
    --log_image_interval=10 \
    --log_checkpoint_interval=100 \
    --log \
    --name=coinrun-dyn-dev-$slurm_job_id \
    --tags dyn coinrun dev \
    --entity instant-uv \
    --project jafar \
    --warmup_steps 0 \
    --wsd_decay_steps 0 \
    --num_steps 200 \
    --val_data_dir $array_records_dir_val \
    --val_interval 10 \
    --val_steps 50 \
    --data_dir $array_records_dir_train \
    --lam_checkpoint $lam_checkpoint \
    --tokenizer_checkpoint $tokenizer_checkpoint