p-doom/crowd-code-dataset-0.2 huggingface dataset:
[tab] slurm/dev/mihir/cremers/coinrun_train_tokenizer.sbatch (shellscript)
#!/bin/bash
#SBATCH --nodes=1
#SBATCH --ntasks-per-node=2
#SBATCH --time=20:00:00
#SBATCH --cpus-per-task=5
#SBATCH --gres=gpu:2,VRAM:24G
#SBATCH --mem=150G
#SBATCH --output=logs/logs_training/%x_%j.log
#SBATCH --error=logs/logs_training/%x_%j.log
#SBATCH --job-name=train_tokenizer_coinrun

# Log the sbatch script
cat $0

tf_records_dir="/storage/user/mahajanm/Projects/world-modeling/knoms_tfrecords_500/"
ws_dir='/storage/user/mahajanm/Projects/world-modeling'
job_name=$SLURM_JOB_NAME
slurm_job_id=$SLURM_JOB_ID

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

env | grep SLURM

SLURM_STEP_NODELIST=$SLURM_NODELIST srun python jasmine/train_tokenizer.py \
    --ckpt_dir $CHECKPOINT_DIR \
    --batch_size=12 \
    --num_steps=75000 \
    --warmup_steps=2500 \
    --log_checkpoint_interval=18750 \
    --log \
    --entity instant-uv \
    --project jafar \
    --data_dir $tf_records_dir
[tab] slurm/utils/mihir/night-job-starter.sh (shellscript)
while true; do
    if [ -d "/fast/project/HFMI_ProFOUND/mihir/checkpoints/tokenizer/mae/coinrun_train_tokenizer_mae/32925/300000" ]; then
        echo "Directory exists. Starting job."
        sleep 30
        sbatch slurm/jobs/mihir/berlin/diffusion/coinrun/dyn_dit_coinrun.sh
        break
    else
        echo "Checkpoint directory does not exist. Will check again in 5 seconds."
        sleep 10m
    fi
done
[tab] slurm/jobs/mihir/berlin/diffusion/coinrun/dyn_dit_coinrun.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_coinrun

cat $0

source .venv/bin/activate

array_records_dir_train=/fast/project/HFMI_ProFOUND/mihir/data/data_coinrun/coinrun_episodes_50m/train
array_records_dir_val=/fast/project/HFMI_ProFOUND/mihir/data/data_coinrun/coinrun_episodes_50m/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/coinrun_train_tokenizer_mae/32925


srun python jasmine/baselines/diffusion/train_dynamics_diffusion.py \
    --save_ckpt \
    --ckpt_dir $CHECKPOINT_DIR \
    --diffusion_denoise_steps=128 \
    --name=train_dyn_diffusion_coinrun_$slurm_job_id \
    --tags dyn diffusion coinrun \
    --entity instant-uv \
    --project jafar \
    --data_dir $array_records_dir_train \
    --val_data_dir $array_records_dir_val \
    --tokenizer_checkpoint=$tokenizer_checkpoint \