p-doom/crowd-code-dataset-0.2 huggingface dataset:
[tab] slurm/jobs/mihir/berlin/diffusion/doom/dyn_dit_doom.sh (shellscript)
#!/usr/bin/env bash

#SBATCH --nodes=1
#SBATCH --ntasks-per-node=1
#SBATCH --time=24:00:00
#SBATCH --cpus-per-task=5
#SBATCH --gres=gpu:1
#SBATCH --mem=100GB
#SBATCH --output=/fast/project/HFMI_ProFOUND/mihir/logs/train/dyn/diffusion/%x_%j.log
#SBATCH --error=/fast/project/HFMI_ProFOUND/mihir/logs/train/dyn/diffusion/%x_%j.log
#SBATCH --job-name=train_dyn_dit

cat $0

source .venv/bin/activate

array_records_dir_train=/fast/project/HFMI_ProFOUND/mihir/data/data_doom/doom_episodes_50m_60x80/train
array_records_dir_val=/fast/project/HFMI_ProFOUND/mihir/data/data_doom/doom_episodes_50m_60x80/val

job_name=$SLURM_JOB_NAME
slurm_job_id=$SLURM_JOB_ID

CHECKPOINT_DIR=/fast/project/HFMI_ProFOUND/mihir/checkpoints/dyn/$job_name/$slurm_job_id
mkdir -p $CHECKPOINT_DIR

tokenizer_checkpoint=/fast/project/HFMI_ProFOUND/mihir/checkpoints/tokenizer/mae/doom_train_tokenizer_mae_36/32750


srun python jasmine/train_dynamics.py \
    --save_ckpt \
    --image_height=60 \
    --image_width=80 \
    --ckpt_dir $CHECKPOINT_DIR \
    --batch_size=36 \
    --dyna_type=diffusion \
    --diffusion_denoise_steps=128 \
    --name=train_dyn_dit_doom_$slurm_job_id \
    --tags dyn diffusion doom \
    --entity instant-uv \
    --project jafar \
    --data_dir $array_records_dir_train \
    --val_data_dir $array_records_dir_val \
    --tokenizer_type=mae \
    --tokenizer_checkpoint=$tokenizer_checkpoint \
[tab] slurm/jobs/mihir/horeka/doom/diffusion/train_tokenizer_mae_bs_512.sh (shellscript)
#!/usr/bin/env bash

#SBATCH --nodes=1
#SBATCH --ntasks-per-node=1
#SBATCH --time=24:00:00
#SBATCH --cpus-per-task=5
#SBATCH --gres=gpu:1
#SBATCH --mem=100GB
#SBATCH --output=/fast/project/HFMI_ProFOUND/mihir/logs/train/tokenizer/mae/%x_%j.log
#SBATCH --error=/fast/project/HFMI_ProFOUND/mihir/logs/train/tokenizer/mae/%x_%j.log
#SBATCH --job-name=doom_train_tokenizer_mae_512

cat $0

source .venv/bin/activate

array_records_dir_train=/fast/project/HFMI_ProFOUND/mihir/data/data_doom/doom_episodes_50m_60x80/train
array_records_dir_val=/fast/project/HFMI_ProFOUND/mihir/data/data_doom/doom_episodes_50m_60x80/val

job_name=$SLURM_JOB_NAME
slurm_job_id=$SLURM_JOB_ID

CHECKPOINT_DIR=/fast/project/HFMI_ProFOUND/mihir/checkpoints/tokenizer/mae/$job_name/$slurm_job_id
mkdir -p $CHECKPOINT_DIR

srun python jasmine/train_tokenizer.py \
    --save_ckpt \
    --tokenizer_type=mae \
    --image_height=60 \
    --image_width=80 \
    --batch_size=512 \
    --ckpt_dir $CHECKPOINT_DIR \
    --name=train_tokenizer_mae_doom_512_$slurm_job_id \
    --tags tokenizer mae doom \
    --entity instant-uv \
    --project jafar \
    --data_dir $array_records_dir_train \
    --val_data_dir $array_records_dir_val \
[tab] slurm/jobs/mihir/horeka/doom/diffusion/train_tokenizer_mae_bs_1024.sh (shellscript)
#!/usr/bin/env bash

#SBATCH --nodes=1
#SBATCH --ntasks-per-node=1
#SBATCH --time=24:00:00
#SBATCH --cpus-per-task=5
#SBATCH --gres=gpu:1
#SBATCH --mem=100GB
#SBATCH --output=/fast/project/HFMI_ProFOUND/mihir/logs/train/tokenizer/mae/%x_%j.log
#SBATCH --error=/fast/project/HFMI_ProFOUND/mihir/logs/train/tokenizer/mae/%x_%j.log
#SBATCH --job-name=doom_train_tokenizer_mae_1024

cat $0

source .venv/bin/activate

array_records_dir_train=/fast/project/HFMI_ProFOUND/mihir/data/data_doom/doom_episodes_50m_60x80/train
array_records_dir_val=/fast/project/HFMI_ProFOUND/mihir/data/data_doom/doom_episodes_50m_60x80/val

job_name=$SLURM_JOB_NAME
slurm_job_id=$SLURM_JOB_ID

CHECKPOINT_DIR=/fast/project/HFMI_ProFOUND/mihir/checkpoints/tokenizer/mae/$job_name/$slurm_job_id
mkdir -p $CHECKPOINT_DIR

srun python jasmine/train_tokenizer.py \
    --save_ckpt \
    --tokenizer_type=mae \
    --image_height=60 \
    --image_width=80 \
    --batch_size=1024 \
    --ckpt_dir $CHECKPOINT_DIR \
    --name=train_tokenizer_mae_doom_1024_$slurm_job_id \
    --tags tokenizer mae doom \
    --entity instant-uv \
    --project jafar \
    --data_dir $array_records_dir_train \
    --val_data_dir $array_records_dir_val \
[tab] slurm/jobs/mihir/horeka/doom/diffusion/train_tokenizer_mae.sh (shellscript)
#!/usr/bin/env bash

#SBATCH --nodes=1
#SBATCH --ntasks-per-node=1
#SBATCH --time=24:00:00
#SBATCH --cpus-per-task=5
#SBATCH --gres=gpu:1
#SBATCH --mem=100GB
#SBATCH --output=/fast/project/HFMI_ProFOUND/mihir/logs/train/tokenizer/mae/%x_%j.log
#SBATCH --error=/fast/project/HFMI_ProFOUND/mihir/logs/train/tokenizer/mae/%x_%j.log
#SBATCH --job-name=doom_train_tokenizer_mae_36

cat $0

source .venv/bin/activate

array_records_dir_train=/fast/project/HFMI_ProFOUND/mihir/data/data_doom/doom_episodes_50m_60x80/train
array_records_dir_val=/fast/project/HFMI_ProFOUND/mihir/data/data_doom/doom_episodes_50m_60x80/val

job_name=$SLURM_JOB_NAME
slurm_job_id=$SLURM_JOB_ID

CHECKPOINT_DIR=/fast/project/HFMI_ProFOUND/mihir/checkpoints/tokenizer/mae/$job_name/$slurm_job_id
mkdir -p $CHECKPOINT_DIR

srun python jasmine/train_tokenizer.py \
    --save_ckpt \
    --tokenizer_type=mae \
    --image_height=60 \
    --image_width=80 \
    --batch_size=36 \
    --ckpt_dir $CHECKPOINT_DIR \
    --name=train_tokenizer_mae_doom_36_$slurm_job_id \
    --tags tokenizer mae doom \
    --entity instant-uv \
    --project jafar \
    --data_dir $array_records_dir_train \
    --val_data_dir $array_records_dir_val \
[tab] slurm/jobs/mihir/horeka/doom/diffusion/dyn_dit_doom.sh (shellscript)
#!/usr/bin/env bash

#SBATCH --nodes=1
#SBATCH --ntasks-per-node=1
#SBATCH --time=24:00:00
#SBATCH --cpus-per-task=5
#SBATCH --gres=gpu:1
#SBATCH --mem=100GB
#SBATCH --output=/fast/project/HFMI_ProFOUND/mihir/logs/train/dyn/diffusion/%x_%j.log
#SBATCH --error=/fast/project/HFMI_ProFOUND/mihir/logs/train/dyn/diffusion/%x_%j.log
#SBATCH --job-name=train_dyn_dit

cat $0

source .venv/bin/activate

array_records_dir_train=/fast/project/HFMI_ProFOUND/mihir/data/data_doom/doom_episodes_50m_60x80/train
array_records_dir_val=/fast/project/HFMI_ProFOUND/mihir/data/data_doom/doom_episodes_50m_60x80/val

job_name=$SLURM_JOB_NAME
slurm_job_id=$SLURM_JOB_ID

CHECKPOINT_DIR=/fast/project/HFMI_ProFOUND/mihir/checkpoints/dyn/$job_name/$slurm_job_id
mkdir -p $CHECKPOINT_DIR

tokenizer_checkpoint=/fast/project/HFMI_ProFOUND/mihir/checkpoints/tokenizer/mae/doom_train_tokenizer_mae_36/32750


srun python jasmine/train_dynamics.py \
    --save_ckpt \
    --image_height=60 \
    --image_width=80 \
    --ckpt_dir $CHECKPOINT_DIR \
    --batch_size=36 \
    --dyna_type=diffusion \
    --diffusion_denoise_steps=128 \
    --name=train_dyn_dit_doom_$slurm_job_id \
    --tags dyn diffusion doom \
    --entity instant-uv \
    --project jafar \
    --data_dir $array_records_dir_train \
    --val_data_dir $array_records_dir_val \
    --tokenizer_type=mae \
    --tokenizer_checkpoint=$tokenizer_checkpoint \
[content] slurm/jobs/mihir/horeka/doom/diffusion/train_tokenizer_mae_bs_512.sh (shellscript)

#SBATCH --output=/hkfs/work/workspace/scratch/tum_ind3695-jafa_ws_shared/logs/logs_mihir/doom/tokenizer/%x_%j.log
#SBATCH --error=/hkfs/work/workspace/scratch/tum_ind3695-jafa_ws_shared/logs/logs_mihir/doom/tokenizer/%x_%j.log
[content] slurm/jobs/mihir/horeka/doom/diffusion/train_tokenizer_mae_bs_1024.sh (shellscript)

#SBATCH --output=/hkfs/work/workspace/scratch/tum_ind3695-jafa_ws_shared/logs/logs_mihir/doom/tokenizer/%x_%j.log
#SBATCH --error=/hkfs/work/workspace/scratch/tum_ind3695-jafa_ws_shared/logs/logs_mihir/doom/tokenizer/%x_%j.log
[content] slurm/jobs/mihir/horeka/doom/diffusion/train_tokenizer_mae.sh (shellscript)

#SBATCH --output=/hkfs/work/workspace/scratch/tum_ind3695-jafa_ws_shared/logs/logs_mihir/doom/tokenizer/%x_%j.log
#SBATCH --error=/hkfs/work/workspace/scratch/tum_ind3695-jafa_ws_shared/logs/logs_mihir/doom/tokenizer/%x_%j.log
[tab] slurm/jobs/mihir/horeka/doom/resolution60x80/train_dyn_default_bigger.sh (shellscript)
#!/usr/bin/env bash

#SBATCH --nodes=1
#SBATCH --ntasks-per-node=1
#SBATCH --time=48: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/doom/dynamics/maskgit/%x_%j.log
#SBATCH --error=/hkfs/work/workspace/scratch/tum_ind3695-jafa_ws_shared/logs/logs_mihir/doom/dynamics/maskgit/%x_%j.log
#SBATCH --job-name=dynamics_doom_60x80_bigger_500k
#SBATCH --exclude=hkn0735
#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

array_records_dir_train=/hkfs/work/workspace/scratch/tum_ind3695-jafa_ws_shared/data_doom/doom_episodes_10m_60x80_fixed/train
array_records_dir_val=/hkfs/work/workspace/scratch/tum_ind3695-jafa_ws_shared/data_doom/doom_episodes_10m_60x80_fixed/val

job_name=$SLURM_JOB_NAME
slurm_job_id=$SLURM_JOB_ID

CHECKPOINT_DIR=/hkfs/work/workspace/scratch/tum_ind3695-jafa_ws_shared/checkpoints/doom/maskgit/$job_name/$slurm_job_id
mkdir -p $CHECKPOINT_DIR

tokenizer_ckpt_dir=/hkfs/work/workspace/scratch/tum_ind3695-jafa_ws_shared/checkpoints/mihir/tokenizer/train_tokenizer_60x80_bigger_500k/3559825

env | grep SLURM

srun python jasmine/train_dynamics.py \
    --save_ckpt \
    $restore_ckpt_flag \
    --wandb_id $SLURM_JOB_ID \
    --num_actions=20 \
    --num_steps=500_000 \
    --wsd_decay_steps=50_000 \
    --tokenizer_num_blocks=8 \
    --tokenizer_num_heads=16 \
    --tokenizer_dim=768 \
    --tokenizer_ffn_dim=3072 \
    --dyna_num_blocks=12 \
    --dyna_num_heads=16 \
    --dyna_dim=768 \
    --dyna_ffn_dim=3072 \
    --lam_num_blocks=8 \
    --lam_num_heads=16 \
    --lam_dim=768 \
    --lam_ffn_dim=3072 \
    --ckpt_dir $CHECKPOINT_DIR \
    --name=doom-dynamics-60x80-bigger-500k-$slurm_job_id \
    --image_height=60 \
    --image_width=80 \
    --tags doom dynamics maskgit default 60x80 bigger 500k \
    --entity instant-uv \
    --project jafar \
    --tokenizer_checkpoint=$tokenizer_ckpt_dir \
    --data_dir $array_records_dir_train \
    --val_data_dir $array_records_dir_val &

child_pid=$!

wait $child_pid
[tab] slurm/jobs/mihir/horeka/doom/resolution60x80/train_tokenizer_default_1gpu_500k.sh (shellscript)
#!/usr/bin/env bash

#SBATCH --nodes=1
#SBATCH --ntasks-per-node=1
#SBATCH --time=08: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/doom/tokenizer/%x_%j.log
#SBATCH --error=/hkfs/work/workspace/scratch/tum_ind3695-jafa_ws_shared/logs/logs_mihir/doom/tokenizer/%x_%j.log
#SBATCH --job-name=train_tokenizer_default_single_gpu_60x80_500k

# 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_doom/doom_episodes_10m_60x80_fixed/train
array_records_dir_val=/hkfs/work/workspace/scratch/tum_ind3695-jafa_ws_shared/data_doom/doom_episodes_10m_60x80_fixed/val


job_name=$SLURM_JOB_NAME
slurm_job_id=$SLURM_JOB_ID

CHECKPOINT_DIR=/hkfs/work/workspace/scratch/tum_ind3695-jafa_ws_shared/checkpoints/mihir/tokenizer/train_tokenizer_default_single_gpu_60x80_500k/first-try
mkdir -p $CHECKPOINT_DIR

env | grep SLURM

srun python jasmine/train_tokenizer.py \
    --save_ckpt \
    --restore_ckpt \
    --image_height=60 \
    --image_width=80 \
    --num_steps=500_000 \
    --wsd_decay_steps=50_000 \
    --ckpt_dir $CHECKPOINT_DIR \
    --batch_size=48 \
    --name=doom-tokenizer-default-60x80-500k-$slurm_job_id \
    --tags tokenizer doom default 60x80 \
    --entity instant-uv \
    --project jafar \
    --data_dir $array_records_dir_train \
    --val_data_dir $array_records_dir_val
[content] slurm/jobs/mihir/berlin/diffusion/doom/train_tokenizer_mae.sh (shellscript)

array_records_dir_train=/hkfs/work/workspace/scratch/tum_ind3695-jafa_ws_shared/data_doom/doom_episodes_10m_60x80_fixed/train
array_records_dir_val=/hkfs/work/workspace/scratch/tum_ind3695-jafa_ws_shared/data_doom/doom_episodes_10m_60x80_fixed/val
[tab] slurm/jobs/mihir/berlin/diffusion/doom/train_tokenizer_mae_bs_1024.sh (shellscript)
#!/usr/bin/env bash

#SBATCH --nodes=1
#SBATCH --ntasks-per-node=1
#SBATCH --time=24:00:00
#SBATCH --cpus-per-task=5
#SBATCH --gres=gpu:1
#SBATCH --mem=100GB
#SBATCH --output=/fast/project/HFMI_ProFOUND/mihir/logs/train/tokenizer/mae/%x_%j.log
#SBATCH --error=/fast/project/HFMI_ProFOUND/mihir/logs/train/tokenizer/mae/%x_%j.log
#SBATCH --job-name=doom_train_tokenizer_mae_1024

cat $0

source .venv/bin/activate

array_records_dir_train=/fast/project/HFMI_ProFOUND/mihir/data/data_doom/doom_episodes_50m_60x80/train
array_records_dir_val=/fast/project/HFMI_ProFOUND/mihir/data/data_doom/doom_episodes_50m_60x80/val

job_name=$SLURM_JOB_NAME
slurm_job_id=$SLURM_JOB_ID

CHECKPOINT_DIR=/fast/project/HFMI_ProFOUND/mihir/checkpoints/tokenizer/mae/$job_name/$slurm_job_id
mkdir -p $CHECKPOINT_DIR

srun python jasmine/train_tokenizer.py \
    --save_ckpt \
    --tokenizer_type=mae \
    --image_height=60 \
    --image_width=80 \
    --batch_size=1024 \
    --ckpt_dir $CHECKPOINT_DIR \
    --name=train_tokenizer_mae_doom_1024_$slurm_job_id \
    --tags tokenizer mae doom \
    --entity instant-uv \
    --project jafar \
    --data_dir $array_records_dir_train \
    --val_data_dir $array_records_dir_val \
[content] slurm/jobs/mihir/berlin/diffusion/doom/train_tokenizer_mae_bs_1024.sh (shellscript)

array_records_dir_train=/hkfs/work/workspace/scratch/tum_ind3695-jafa_ws_shared/data_doom/doom_episodes_10m_60x80_fixed/train
array_records_dir_val=/hkfs/work/workspace/scratch/tum_ind3695-jafa_ws_shared/data_doom/doom_episodes_10m_60x80_fixed/val