p-doom/crowd-code-dataset-0.2 huggingface dataset:
[tab] slurm/jobs/alfred/helmholtz_cluster/jafar_og_reproduction/generate_dataset_10m.sbatch (shellscript)
#!/usr/bin/env bash

#SBATCH --nodes=1
#SBATCH --ntasks-per-node=1
#SBATCH --time=2:00:00
#SBATCH --partition=cpu_p
#SBATCH --qos=cpu_short
#SBATCH --cpus-per-task=8
#SBATCH --output=/lustre/groups/haicu/workspace/alfred.nguyen/jafar_worksapce/logs/coinrun/generate_dataset/%x_%j.log
#SBATCH --error=/lustre/groups/haicu/workspace/alfred.nguyen/jafar_worksapce/logs/coinrun/generate_dataset/%x_%j.log
#SBATCH --job-name=generate_coinrun_dataset_10m


# Log the sbatch script
cat $0
source .venv/bin/activate

python generate_dataset.py \
    --num_episodes 10000 \
    --output_dir /lustre/groups/haicu/workspace/alfred.nguyen/jafar_worksapce/data/coinrun_episodes_10m \
    --min_episode_length 1000
[tab] slurm/jobs/mihir/horeka/lam/train_lam_minecraft_1node_dev.sbatch (shellscript)
#!/usr/bin/env bash

#SBATCH --nodes=1
#SBATCH --ntasks-per-node=4
#SBATCH --time=00:30:00
#SBATCH --partition=accelerated
#SBATCH --cpus-per-task=5
#SBATCH --gres=gpu:4
#SBATCH --output=/hkfs/work/workspace/scratch/tum_ind3695-jafa_ws_shared/logs/logs_mihir/lam/train_lam_minecraft_8node_%j.log
#SBATCH --error=/hkfs/work/workspace/scratch/tum_ind3695-jafa_ws_shared/logs/logs_mihir/lam/train_lam_minecraft_8node_%j.log
#SBATCH --job-name=train_lam_minecraft_1node_dev
#SBATCH --reservation=llmtum
#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..."
    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=/hkfs/work/workspace/scratch/tum_ind3695-jafa_ws_shared/data_new/open_ai_minecraft_arrayrecords_chunked

job_name=$SLURM_JOB_NAME
slurm_job_id=$SLURM_JOB_ID

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

env | grep SLURM

srun python train_lam.py \
    --save_ckpt \
    $restore_ckpt_flag \
    --wandb_id $slurm_job_id \
    --ckpt_dir $CHECKPOINT_DIR \
    --batch_size=20 \
    --init_lr=0 \
    --max_lr=1e-4 \
    --log_image_interval=1000 \
    --darkness_threshold=50 \
    --log \
    --log_checkpoint_interval=1000 \
    --name=lam-minecraft-1-node-dev-$slurm_job_id \
    --tags lam minecraft 1-node \
    --entity instant-uv \
    --project jafar \
    --num_latents=100 \
    --model_dim=896 \
    --num_blocks=12 \
    --num_heads=14 \
    --latent_dim=48 \
    --ffn_dim=3584 \
    --data_dir $array_records_dir &

child_pid=$!

wait $child_pid