p-doom/crowd-code-dataset-0.2 huggingface dataset:
[tab] slurm/jobs/mihir/horeka/coinrun/ablations/appendix-c.sh (shellscript)

# 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/coinrun/maskgit/$job_name/$slurm_job_id

# main
# CHECKPOINT_DIR=/hkfs/work/workspace/scratch/tum_ind3695-jafa_ws_shared/checkpoints/coinrun/maskgit/train_dynamics_maskgit/3533426

# noise branch
CHECKPOINT_DIR=/hkfs/work/workspace/scratch/tum_ind3695-jafa_ws_shared/checkpoints/coinrun/maskgit/train_dynamics_maskgit/3532466

mkdir -p $CHECKPOINT_DIR

tokenizer_ckpt_dir=/hkfs/work/workspace/scratch/tum_ind3695-jafa_ws_shared/checkpoints/big-runs/tokenizer/train_tokenizer_default/3528955

env | grep SLURM

srun python jasmine/train_dynamics_appendix-c.py \
    --save_ckpt \
    --restore_ckpt \
    --wandb_id $SLURM_JOB_ID \
    --ckpt_dir $CHECKPOINT_DIR \
    --batch_size=110 \
    --image_height=64 \
    --image_width=64 \
    --patch_size=16 \
    --max_lr=3e-5 \
    --no-log \
    --no-eval-full-frame \
    --tokenizer_checkpoint=$tokenizer_ckpt_dir \
    --eval_full_frame \
    --data_dir $array_records_dir_train \
    --val_data_dir $array_records_dir_val
[content] appendix_c_nodes_video_noise.md (markdown)
Step 200000, validation loss: 0.7374703884124756
{'val_codebook_usage_lam': np.float64(1.0), 'val_codebook_usage_tokenizer': np.float64(0.8475988051470589), 'val_cross_entropy_loss': np.float64(0.7374703171206456), 'val_entropy': np.float64(0.8575162127906201), 'val_masked_token_top16_accuracy': np.float64(0.9825415529456794), 'val_masked_token_top1_accuracy': np.float64(0.776269306154812), 'val_masked_token_top2_accuracy': np.float64(0.8820458533717137), 'val_masked_token_top5_accuracy': np.float64(0.949582414299834), 'val_psnr': np.float64(22.455391640756645), 'val_select_logit': np.float64(15.983110203462488), 'val_select_p': np.float64(0.7558641293469597), 'val_ssim': np.float64(0.6962924330842262), 'val_total_loss': np.float64(0.7374703171206456), 'val_z_loss': np.float64(313.3120548023897), 'val_loss': np.float32(0.7374704), 'val_full_frame_codebook_usage_lam': np.float64(1.0), 'val_full_frame_codebook_usage_tokenizer': np.float64(0.2629250919117647), 'val_full_frame_cross_entropy_loss': np.float64(1.7930428303924262), 'val_full_frame_entropy': np.float64(0.252041938550332), 'val_full_frame_masked_token_top16_accuracy': np.float64(0.9929032676360187), 'val_full_frame_masked_token_top1_accuracy': np.float64(0.8329210959228814), 'val_full_frame_masked_token_top2_accuracy': np.float64(0.9222704674683365), 'val_full_frame_masked_token_top5_accuracy': np.float64(0.9736630788036421), 'val_full_frame_psnr': np.float64(28.751719717885933), 'val_full_frame_select_logit': np.float64(100.21908793729894), 'val_full_frame_select_p': np.float64(0.912218968073527), 'val_full_frame_ssim': np.float64(0.8437704747798396), 'val_full_frame_z_loss': np.float64(51192.01493566176), 'val_full_frame_loss': np.float32(1.7930428)}
[content] /hkfs/home/project/hk-project-p0023960/tum_cte0515/Projects/jasmine/jasmine/genie.py (python)
        rng, _rng_noise = jax.random.split(batch["rng"])
        noise = jax.random.normal(_rng_noise, shape=videos_BTHWC.shape, dtype=videos_BTHWC.dtype)
        videos_BTHWC = videos_BTHWC + 0.1 * noise  # Adding a small amount of noise
[content] appendix_c_nodes_video_noise.md (markdown)
Step 200000, validation loss: 3.47092342376709
{'val_codebook_usage_lam': np.float64(1.0), 'val_codebook_usage_tokenizer': np.float64(0.9107689950980392), 'val_cross_entropy_loss': np.float64(3.470923194698259), 'val_entropy': np.float64(2.102112695282581), 'val_masked_token_top16_accuracy': np.float64(0.7756070003790014), 'val_masked_token_top1_accuracy': np.float64(0.36497432636279686), 'val_masked_token_top2_accuracy': np.float64(0.4784945939101425), 'val_masked_token_top5_accuracy': np.float64(0.6185943133690778), 'val_psnr': np.float64(18.93759428286085), 'val_select_logit': np.float64(10.699732406466614), 'val_select_p': np.float64(0.4912407164480172), 'val_ssim': np.float64(0.5805023651497037), 'val_total_loss': np.float64(3.470923194698259), 'val_z_loss': np.float64(154.57306955374924), 'val_loss': np.float32(3.4709234), 'val_full_frame_codebook_usage_lam': np.float64(1.0), 'val_full_frame_codebook_usage_tokenizer': np.float64(0.2633463541666667), 'val_full_frame_cross_entropy_loss': np.float64(1.7980740304086722), 'val_full_frame_entropy': np.float64(0.252041938550332), 'val_full_frame_masked_token_top16_accuracy': np.float64(0.9928698411174849), 'val_full_frame_masked_token_top1_accuracy': np.float64(0.8328876740792218), 'val_full_frame_masked_token_top2_accuracy': np.float64(0.9221479238248339), 'val_full_frame_masked_token_top5_accuracy': np.float64(0.9736742201973411), 'val_full_frame_psnr': np.float64(28.751719717885933), 'val_full_frame_select_logit': np.float64(100.21908793729894), 'val_full_frame_select_p': np.float64(0.912218968073527), 'val_full_frame_ssim': np.float64(0.8437704747798396), 'val_full_frame_z_loss': np.float64(51192.01493566176), 'val_full_frame_loss': np.float32(1.798074)}
[content] appendix_c_nodes_video_noise.md (markdown)
Step 200000, validation loss: 5.663453578948975
{'val_codebook_usage_lam': np.float64(1.0), 'val_codebook_usage_tokenizer': np.float64(0.9687117034313726), 'val_cross_entropy_loss': np.float64(5.6634534480525), 'val_entropy': np.float64(3.8459870207543467), 'val_masked_token_top16_accuracy': np.float64(0.39807266756600024), 'val_masked_token_top1_accuracy': np.float64(0.10833961239048079), 'val_masked_token_top2_accuracy': np.float64(0.16518428921699524), 'val_masked_token_top5_accuracy': np.float64(0.2562381183984233), 'val_psnr': np.float64(15.170352804894542), 'val_select_logit': np.float64(6.860248369329116), 'val_select_p': np.float64(0.22353572529904983), 'val_ssim': np.float64(0.4300605286570156), 'val_total_loss': np.float64(5.6634534480525), 'val_z_loss': np.float64(81.19780237534466), 'val_loss': np.float32(5.6634536), 'val_full_frame_codebook_usage_lam': np.float64(1.0), 'val_full_frame_codebook_usage_tokenizer': np.float64(0.2633463541666667), 'val_full_frame_cross_entropy_loss': np.float64(1.7980740304086722), 'val_full_frame_entropy': np.float64(0.252041938550332), 'val_full_frame_masked_token_top16_accuracy': np.float64(0.9928698411174849), 'val_full_frame_masked_token_top1_accuracy': np.float64(0.8328876740792218), 'val_full_frame_masked_token_top2_accuracy': np.float64(0.9221479238248339), 'val_full_frame_masked_token_top5_accuracy': np.float64(0.9736742201973411), 'val_full_frame_psnr': np.float64(28.751719717885933), 'val_full_frame_select_logit': np.float64(100.21908793729894), 'val_full_frame_select_p': np.float64(0.912218968073527), 'val_full_frame_ssim': np.float64(0.8437704747798396), 'val_full_frame_z_loss': np.float64(51192.01493566176), 'val_full_frame_loss': np.float32(1.798074)}
[content] appendix_c_nodes_video_noise.md (markdown)
Step 200000, validation loss: 1.3161627054214478
{'val_codebook_usage_lam': np.float64(1.0), 'val_codebook_usage_tokenizer': np.float64(0.8595281862745098), 'val_cross_entropy_loss': np.float64(1.3161625441382914), 'val_entropy': np.float64(0.9603639922890008), 'val_masked_token_top16_accuracy': np.float64(0.9656095154145184), 'val_masked_token_top1_accuracy': np.float64(0.6909338095608879), 'val_masked_token_top2_accuracy': np.float64(0.8155956373495215), 'val_masked_token_top5_accuracy': np.float64(0.9094531045240515), 'val_psnr': np.float64(22.258947148042566), 'val_select_logit': np.float64(15.273398137560077), 'val_select_p': np.float64(0.7302459712122001), 'val_ssim': np.float64(0.6844308913922778), 'val_total_loss': np.float64(1.3161625441382914), 'val_z_loss': np.float64(289.0865448596431), 'val_loss': np.float32(1.3161627), 'val_full_frame_codebook_usage_lam': np.float64(1.0), 'val_full_frame_codebook_usage_tokenizer': np.float64(0.2633463541666667), 'val_full_frame_cross_entropy_loss': np.float64(1.7980740304086722), 'val_full_frame_entropy': np.float64(0.252041938550332), 'val_full_frame_masked_token_top16_accuracy': np.float64(0.9928698411174849), 'val_full_frame_masked_token_top1_accuracy': np.float64(0.8328876740792218), 'val_full_frame_masked_token_top2_accuracy': np.float64(0.9221479238248339), 'val_full_frame_masked_token_top5_accuracy': np.float64(0.9736742201973411), 'val_full_frame_psnr': np.float64(28.751719717885933), 'val_full_frame_select_logit': np.float64(100.21908793729894), 'val_full_frame_select_p': np.float64(0.912218968073527), 'val_full_frame_ssim': np.float64(0.8437704747798396), 'val_full_frame_z_loss': np.float64(51192.01493566176), 'val_full_frame_loss': np.float32(1.798074)}
[content] appendix_c_nodes_video_noise.md (markdown)
Step 200000, validation loss: 1.349543571472168
{'val_codebook_usage_lam': np.float64(1.0), 'val_codebook_usage_tokenizer': np.float64(0.8595281862745098), 'val_cross_entropy_loss': np.float64(1.3495435621224197), 'val_entropy': np.float64(0.9796019815931133), 'val_masked_token_top16_accuracy': np.float64(0.9627614582286161), 'val_masked_token_top1_accuracy': np.float64(0.6846290978730893), 'val_masked_token_top2_accuracy': np.float64(0.809233519376493), 'val_masked_token_top5_accuracy': np.float64(0.9047035387918061), 'val_psnr': np.float64(18.188905603745404), 'val_select_logit': np.float64(15.189011087604598), 'val_select_p': np.float64(0.728449939512739), 'val_ssim': np.float64(0.6222006047473234), 'val_total_loss': np.float64(1.3495435621224197), 'val_z_loss': np.float64(286.6210386986826), 'val_loss': np.float32(1.3495436), 'val_full_frame_codebook_usage_lam': np.float64(1.0), 'val_full_frame_codebook_usage_tokenizer': np.float64(0.2633463541666667), 'val_full_frame_cross_entropy_loss': np.float64(20.059853647269456), 'val_full_frame_entropy': np.float64(1.0269374473422181), 'val_full_frame_masked_token_top16_accuracy': np.float64(0.7249108506183998), 'val_full_frame_masked_token_top1_accuracy': np.float64(0.38196300174675735), 'val_full_frame_masked_token_top2_accuracy': np.float64(0.47085559777185026), 'val_full_frame_masked_token_top5_accuracy': np.float64(0.590352032698837), 'val_full_frame_psnr': np.float64(16.088213939292757), 'val_full_frame_select_logit': np.float64(84.10442965638404), 'val_full_frame_select_p': np.float64(0.7601301389582017), 'val_full_frame_ssim': np.float64(0.5480527725874209), 'val_full_frame_z_loss': np.float64(108920.47901348039), 'val_full_frame_loss': np.float32(20.059855)}
[content] appendix_c_nodes_video_noise.md (markdown)
Step 200000, validation loss: 3.554758071899414
{'val_codebook_usage_lam': np.float64(1.0), 'val_codebook_usage_tokenizer': np.float64(0.9107689950980392), 'val_cross_entropy_loss': np.float64(3.5547584225149715), 'val_entropy': np.float64(2.098846045194888), 'val_masked_token_top16_accuracy': np.float64(0.7650342314851051), 'val_masked_token_top1_accuracy': np.float64(0.3577049625854866), 'val_masked_token_top2_accuracy': np.float64(0.4692117782200084), 'val_masked_token_top5_accuracy': np.float64(0.6073614499148201), 'val_psnr': np.float64(17.192077674117744), 'val_select_logit': np.float64(10.875100004906749), 'val_select_p': np.float64(0.4924066820565392), 'val_ssim': np.float64(0.5347406349930108), 'val_total_loss': np.float64(3.5547584225149715), 'val_z_loss': np.float64(159.5038272633272), 'val_loss': np.float32(3.554758), 'val_full_frame_codebook_usage_lam': np.float64(1.0), 'val_full_frame_codebook_usage_tokenizer': np.float64(0.2633463541666667), 'val_full_frame_cross_entropy_loss': np.float64(20.059853647269456), 'val_full_frame_entropy': np.float64(1.0269374473422181), 'val_full_frame_masked_token_top16_accuracy': np.float64(0.7249108506183998), 'val_full_frame_masked_token_top1_accuracy': np.float64(0.38196300174675735), 'val_full_frame_masked_token_top2_accuracy': np.float64(0.47085559777185026), 'val_full_frame_masked_token_top5_accuracy': np.float64(0.590352032698837), 'val_full_frame_psnr': np.float64(16.088213939292757), 'val_full_frame_select_logit': np.float64(84.10442965638404), 'val_full_frame_select_p': np.float64(0.7601301389582017), 'val_full_frame_ssim': np.float64(0.5480527725874209), 'val_full_frame_z_loss': np.float64(108920.47901348039), 'val_full_frame_loss': np.float32(20.059855)}
[content] appendix_c_nodes_video_noise.md (markdown)
Step 200000, validation loss: 5.770074367523193
{'val_codebook_usage_lam': np.float64(1.0), 'val_codebook_usage_tokenizer': np.float64(0.9687117034313726), 'val_cross_entropy_loss': np.float64(5.7700746480156395), 'val_entropy': np.float64(3.8086358846402635), 'val_masked_token_top16_accuracy': np.float64(0.3889244046865725), 'val_masked_token_top1_accuracy': np.float64(0.10453694342982535), 'val_masked_token_top2_accuracy': np.float64(0.15955179842079387), 'val_masked_token_top5_accuracy': np.float64(0.24805806752513437), 'val_psnr': np.float64(14.525648341459387), 'val_select_logit': np.float64(7.36723949394974), 'val_select_p': np.float64(0.2255459670342651), 'val_ssim': np.float64(0.40558044992241205), 'val_total_loss': np.float64(5.7700746480156395), 'val_z_loss': np.float64(90.42310318292355), 'val_loss': np.float32(5.7700744), 'val_full_frame_codebook_usage_lam': np.float64(1.0), 'val_full_frame_codebook_usage_tokenizer': np.float64(0.2633463541666667), 'val_full_frame_cross_entropy_loss': np.float64(20.059853647269456), 'val_full_frame_entropy': np.float64(1.0269374473422181), 'val_full_frame_masked_token_top16_accuracy': np.float64(0.7249108506183998), 'val_full_frame_masked_token_top1_accuracy': np.float64(0.38196300174675735), 'val_full_frame_masked_token_top2_accuracy': np.float64(0.47085559777185026), 'val_full_frame_masked_token_top5_accuracy': np.float64(0.590352032698837), 'val_full_frame_psnr': np.float64(16.088213939292757), 'val_full_frame_select_logit': np.float64(84.10442965638404), 'val_full_frame_select_p': np.float64(0.7601301389582017), 'val_full_frame_ssim': np.float64(0.5480527725874209), 'val_full_frame_z_loss': np.float64(108920.47901348039), 'val_full_frame_loss': np.float32(20.059855)}
[content] appendix_c_nodes_video_noise.md (markdown)
Step 200000, validation loss: 0.7587606310844421
{'val_codebook_usage_lam': np.float64(1.0), 'val_codebook_usage_tokenizer': np.float64(0.8477328431372549), 'val_cross_entropy_loss': np.float64(0.7587607526311687), 'val_entropy': np.float64(0.8734044315768223), 'val_masked_token_top16_accuracy': np.float64(0.9815691931574952), 'val_masked_token_top1_accuracy': np.float64(0.7719808945468828), 'val_masked_token_top2_accuracy': np.float64(0.8775904914912056), 'val_masked_token_top5_accuracy': np.float64(0.9463982956082213), 'val_psnr': np.float64(18.16093515882305), 'val_select_logit': np.float64(15.902083396911621), 'val_select_p': np.float64(0.7548163252718308), 'val_ssim': np.float64(0.6325810738638336), 'val_total_loss': np.float64(0.7587607526311687), 'val_z_loss': np.float64(310.92326743929993), 'val_loss': np.float32(0.75876063), 'val_full_frame_codebook_usage_lam': np.float64(1.0), 'val_full_frame_codebook_usage_tokenizer': np.float64(0.2633463541666667), 'val_full_frame_cross_entropy_loss': np.float64(20.059853647269456), 'val_full_frame_entropy': np.float64(1.0269374473422181), 'val_full_frame_masked_token_top16_accuracy': np.float64(0.7249108506183998), 'val_full_frame_masked_token_top1_accuracy': np.float64(0.38196300174675735), 'val_full_frame_masked_token_top2_accuracy': np.float64(0.47085559777185026), 'val_full_frame_masked_token_top5_accuracy': np.float64(0.590352032698837), 'val_full_frame_psnr': np.float64(16.088213939292757), 'val_full_frame_select_logit': np.float64(84.10442965638404), 'val_full_frame_select_p': np.float64(0.7601301389582017), 'val_full_frame_ssim': np.float64(0.5480527725874209), 'val_full_frame_z_loss': np.float64(108920.47901348039), 'val_full_frame_loss': np.float32(20.059855)}
[tab] slurm/jobs/mihir/horeka/coinrun/train_dyn_single_gpu.sh (shellscript)
#!/usr/bin/env bash

#SBATCH --nodes=1
#SBATCH --ntasks-per-node=1
#SBATCH --time=00:40: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/dynamics/%x_%j.log
#SBATCH --error=/hkfs/work/workspace/scratch/tum_ind3695-jafa_ws_shared/logs/logs_mihir/coinrun/dynamics/%x_%j.log
#SBATCH --job-name=train_dyn_single_gpu
#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/npy_test
array_records_dir_val=/hkfs/work/workspace/scratch/tum_ind3695-jafa_ws_shared/data_coinrun/npy_test

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

tokenizer_checkpoint=/hkfs/work/workspace/scratch/tum_ind3695-jafa_ws_shared/checkpoints/big-runs/tokenizer/interactive/3536670

env | grep SLURM

export PYTHONUNBUFFERED=1


srun python jasmine/train_dynamics.py \
    --save_ckpt \
    --image_height=64 \
    --image_width=64 \
    --ckpt_dir $CHECKPOINT_DIR \
    --batch_size=110 \
    --patch_size=4 \
    --init_lr=0 \
    --max_lr=1e-4 \
    --log_image_interval=50 \
    --log_checkpoint_interval=50 \
    --dyna_type=maskgit \
    --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 10 \
    --data_dir $array_records_dir_train \
    --tokenizer_checkpoint $tokenizer_checkpoint \
    --val_data_dir $array_records_dir_val \
    --log_interval 1 \
    --val_interval 50 \
    --eval_full_frame \
    --val_steps 5
[tab] slurm/jobs/mihir/horeka/coinrun/ablations/train_dyn_default-no-noise-main.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/coinrun/dynamics/maskgit/%x_%j.log
#SBATCH --error=/hkfs/work/workspace/scratch/tum_ind3695-jafa_ws_shared/logs/logs_mihir/coinrun/dynamics/maskgit/%x_%j.log
#SBATCH --job-name=train_dynamics_maskgit
#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_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/coinrun/maskgit/$job_name/$slurm_job_id
mkdir -p $CHECKPOINT_DIR

tokenizer_ckpt_dir=/hkfs/work/workspace/scratch/tum_ind3695-jafa_ws_shared/checkpoints/big-runs/tokenizer/train_tokenizer_default/3528955

env | grep SLURM

srun python jasmine/train_dynamics.py \
    --save_ckpt \
    $restore_ckpt_flag \
    --wandb_id $SLURM_JOB_ID \
    --ckpt_dir $CHECKPOINT_DIR \
    --batch_size=110 \
    --image_height=64 \
    --image_width=64 \
    --patch_size=16 \
    --max_lr=3e-5 \
    --log_image_interval=1000 \
    --log \
    --log_checkpoint_interval=1000 \
    --name=coinrun-dynamics-maskgit-no-noise-main-$slurm_job_id \
    --tags coinrun dynamics maskgit no-noise-main \
    --entity instant-uv \
    --project jafar \
    --tokenizer_checkpoint=$tokenizer_ckpt_dir \
    --eval_full_frame \
    --data_dir $array_records_dir_train \
    --val_data_dir $array_records_dir_val &

child_pid=$!

wait $child_pid
[tab] slurm/jobs/mihir/horeka/coinrun/ablations/train_dyn_default-no-noise-main copy.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/coinrun/dynamics/maskgit/%x_%j.log
#SBATCH --error=/hkfs/work/workspace/scratch/tum_ind3695-jafa_ws_shared/logs/logs_mihir/coinrun/dynamics/maskgit/%x_%j.log
#SBATCH --job-name=train_dynamics_maskgit
#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_coinrun/coinrun_episodes_500m_gt_actions_split/train
array_records_dir_val=/hkfs/work/workspace/scratch/tum_ind3695-jafa_ws_shared/data_coinrun/coinrun_episodes_500m_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/coinrun/maskgit/$job_name/$slurm_job_id
mkdir -p $CHECKPOINT_DIR

tokenizer_ckpt_dir=/hkfs/work/workspace/scratch/tum_ind3695-jafa_ws_shared/checkpoints/big-runs/tokenizer/train_tokenizer_default/3528955

env | grep SLURM

srun python jasmine/train_dynamics.py \
    --save_ckpt \
    $restore_ckpt_flag \
    --wandb_id $SLURM_JOB_ID \
    --ckpt_dir $CHECKPOINT_DIR \
    --batch_size=36 \
    --image_height=64 \
    --image_width=64 \
    --patch_size=16 \
    --name=coinrun-dynamics-maskgit-main-$slurm_job_id \
    --tags coinrun dynamics maskgit main \
    --entity instant-uv \
    --project jafar \
    --tokenizer_checkpoint=$tokenizer_ckpt_dir \
    --eval_full_frame \
    --data_dir $array_records_dir_train \
    --val_data_dir $array_records_dir_val &

child_pid=$!

wait $child_pid
[tab] slurm/jobs/mihir/horeka/coinrun/ablations/train_dyn_default-no-noise-ac-prepend.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/coinrun/dynamics/maskgit/%x_%j.log
#SBATCH --error=/hkfs/work/workspace/scratch/tum_ind3695-jafa_ws_shared/logs/logs_mihir/coinrun/dynamics/maskgit/%x_%j.log
#SBATCH --job-name=train_dynamics_maskgit
#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_coinrun/coinrun_episodes_500m_gt_actions_split/train
array_records_dir_val=/hkfs/work/workspace/scratch/tum_ind3695-jafa_ws_shared/data_coinrun/coinrun_episodes_500m_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/coinrun/maskgit/$job_name/$slurm_job_id
mkdir -p $CHECKPOINT_DIR

tokenizer_ckpt_dir=/hkfs/work/workspace/scratch/tum_ind3695-jafa_ws_shared/checkpoints/big-runs/tokenizer/train_tokenizer_default/3528955

env | grep SLURM

srun python jasmine/train_dynamics.py \
    --save_ckpt \
    $restore_ckpt_flag \
    --wandb_id $SLURM_JOB_ID \
    --ckpt_dir $CHECKPOINT_DIR \
    --batch_size=36 \
    --image_height=64 \
    --image_width=64 \
    --patch_size=16 \
    --name=coinrun-dynamics-maskgit-main-$slurm_job_id \
    --tags coinrun dynamics maskgit main \
    --entity instant-uv \
    --project jafar \
    --tokenizer_checkpoint=$tokenizer_ckpt_dir \
    --eval_full_frame \
    --data_dir $array_records_dir_train \
    --val_data_dir $array_records_dir_val &

child_pid=$!

wait $child_pid
[tab] slurm/jobs/mihir/horeka/coinrun/ablations/train_dyn_default-no-noise-ac-prepend.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/coinrun/dynamics/maskgit/%x_%j.log
#SBATCH --error=/hkfs/work/workspace/scratch/tum_ind3695-jafa_ws_shared/logs/logs_mihir/coinrun/dynamics/maskgit/%x_%j.log
#SBATCH --job-name=train_dynamics_maskgit
#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_coinrun/coinrun_episodes_500m_gt_actions_split/train
array_records_dir_val=/hkfs/work/workspace/scratch/tum_ind3695-jafa_ws_shared/data_coinrun/coinrun_episodes_500m_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/coinrun/maskgit/$job_name/$slurm_job_id
mkdir -p $CHECKPOINT_DIR

tokenizer_ckpt_dir=/hkfs/work/workspace/scratch/tum_ind3695-jafa_ws_shared/checkpoints/big-runs/tokenizer/train_tokenizer_default/3528955

env | grep SLURM

srun python jasmine/train_dynamics.py \
    --save_ckpt \
    $restore_ckpt_flag \
    --wandb_id $SLURM_JOB_ID \
    --ckpt_dir $CHECKPOINT_DIR \
    --batch_size=36 \
    --image_height=64 \
    --image_width=64 \
    --patch_size=16 \
    --name=coinrun-dynamics-maskgit-action-prepend-$slurm_job_id \
    --tags coinrun dynamics maskgit action-prepend \
    --entity instant-uv \
    --project jafar \
    --tokenizer_checkpoint=$tokenizer_ckpt_dir \
    --eval_full_frame \
    --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_patch_size_4.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/tokenizer/%x_%j.log
#SBATCH --error=/hkfs/work/workspace/scratch/tum_ind3695-jafa_ws_shared/logs/logs_mihir/doom/tokenizer/%x_%j.log
#SBATCH --exclude=hkn0735
#SBATCH --job-name=tokenizer_60x80_4_patchsize
#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/mihir/tokenizer/$job_name/$slurm_job_id
mkdir -p $CHECKPOINT_DIR

env | grep SLURM

srun python jasmine/train_tokenizer.py \
    --save_ckpt \
    --patch_size=4 \
    --image_height=60 \
    --image_width=80 \
    --ckpt_dir $CHECKPOINT_DIR \
    --batch_size=48 \
    --name=doom-tokenizer-default-60x80-patchsize-4-$slurm_job_id \
    --tags tokenizer doom default 60x80 patchsize-4 \
    --entity instant-uv \
    --project jafar \
    --data_dir $array_records_dir_train \
    --val_data_dir $array_records_dir_val &

child_pid=$!

wait $child_pid