p-doom/crowd-code-dataset-0.2 huggingface dataset:
[tab] scripts_horeka/train_dynamics.sh (shellscript)
#!/usr/bin/env bash

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


tf_records_dir=$ws_dir/knoms_tfrecords_500_shards
ws_dir='/hkfs/work/workspace/scratch/tum_ind3695-jafa_ws_shared/'

job_name="debug"
slurm_job_id="0000"

CHECKPOINT_DIR=$ws_dir/checkpoints/$job_name/$slurm_job_id
mkdir -p $CHECKPOINT_DIR

env | grep SLURM

# Use checkpoints from tokenizer/lam overfit sample runs
tokenizer_ckpt_dir=/hkfs/work/workspace/scratch/tum_ind3695-jafa_ws_shared/checkpoints/3299272/tokenizer_1751037678_153500/
# lam_ckpt_dir=/hkfs/work/workspace/scratch/tum_ind3695-jafa_ws_shared/checkpoints/3299259/lam_1751036759_200000/
lam_ckpt_dir=/hkfs/work/workspace/scratch/tum_ind3695-jafa_ws_shared/checkpoints/lam-1-action/lam_1751297992_5/

python train_dynamics.py \
    --ckpt_dir $CHECKPOINT_DIR \
    --batch_size=1 \
    --min_lr=3e-4 \
    --max_lr=3e-4 \
    --log_image_interval=500 \
    --log \
    --log_checkpoint_interval=500 \
    --name=dynamics-tiny-overfit-big-lr-$slurm_job_id \
    --tags dynamics overfit tiny \
    --entity instant-uv \
    --project jafar \
    --tokenizer_checkpoint=$tokenizer_ckpt_dir \
    --lam_checkpoint=$lam_ckpt_dir \
    --data_dir $tf_records_dir \
    --tokenizer_dim=384 \
    --latent_patch_dim=32 \
    --num_patch_latents=1024 \
    --patch_size=4 \
    --tokenizer_num_blocks=8 \
    --tokenizer_num_heads=8 \
    --lam_dim=384 \
    --latent_action_dim=32 \
    --lam_patch_size=16 \
    --lam_num_blocks=8 \
    --lam_num_heads=8 \
    --dyna_dim=128 \
    --dyna_num_blocks=2 \
    --dyna_num_heads=4 \
    --num_latent_actions=1 \
    --mask_limit=0.0
[tab] scripts_horeka/overfit_sample_tiny/sample.sh (shellscript)
#!/usr/bin/env bash

# Unload modules that may interfere
module unload mpi/openmpi/5.0
module unload devel/cuda/12.4

# Activate virtual environment
source .venv/bin/activate

# Set workspace and checkpoint directory (update slurm_job_id as needed)
ws_dir='/hkfs/work/workspace/scratch/tum_ind3695-jafa_ws_shared'
# Replace the following with the actual job id/checkpoint you want to sample from
slurm_job_id=3301029

# job_name=train_dynamics_minecraft_overfit_sample_tiny
CHECKPOINT_DIR=$ws_dir/checkpoints/${slurm_job_id}

# Example: If you want to use a specific checkpoint, set it here
# CHECKPOINT_PATH=$ws_dir/checkpoints/3299272/dynamics-tiny-overfit-big-lr-3299272_50000/
# Or use the latest in the directory
# CHECKPOINT_PATH=$(ls -d $CHECKPOINT_DIR/*/ | sort | tail -n 1)
CHECKPOINT_PATH=$CHECKPOINT_DIR/genie_1751067601_200000/
# CHECKPOINT_PATH=/hkfs/work/workspace/scratch/tum_ind3695-jafa_ws_shared/checkpoints/0000/genie_1751301068_2000/
# CHECKPOINT_PATH=/hkfs/work/workspace/scratch/tum_ind3695-jafa_ws_shared/data/../checkpoints/3307618/genie_1751322003_15500/
CHECKPOINT_PATH=/hkfs/work/workspace/scratch/tum_ind3695-jafa_ws_shared/checkpoints/3307619/genie_1751322003_23500/

echo "Sampling from checkpoint: $CHECKPOINT_PATH"

python sample.py \
    --checkpoint "$CHECKPOINT_PATH" \
    --tokenizer_dim=384 \
    --latent_patch_dim=32 \
    --num_patch_latents=1024 \
    --patch_size=4 \
    --tokenizer_num_blocks=8 \
    --tokenizer_num_heads=8 \
    --lam_dim=384 \
    --latent_action_dim=32 \
    --lam_patch_size=16 \
    --lam_num_blocks=8 \
    --lam_num_heads=8 \
    --dyna_dim=128 \
    --dyna_num_blocks=2 \
    --dyna_num_heads=4 \
    --maskgit_steps=1 \
    --num_latent_actions=6 \
    --seq_len=16 \
    --start_frame=0