p-doom/crowd-code-dataset-0.2 huggingface dataset:
[content] message.md (markdown)
@dataclass
class Args:
    # Experiment
    num_steps: int = 200_000
    seed: int = 0
    seq_len: int = 16
    image_channels: int = 3
    image_height: int = 64
    image_width: int = 64
    data_dir: str = ""
    save_ckpt: bool = False
    restore_ckpt: bool = False
    # Optimization
    batch_size: int = 36
    init_lr: float = 0.0
    max_lr: float = 3e-5
    decay_end: float = 0.0
    wsd_decay_steps: int = (
        0  # NOTE: wsd_decay_steps will only be used when using a wsd-schedule
    )
    warmup_steps: int = 5000
    lr_schedule: str = "cos"  # supported options: wsd, cos
    # Tokenizer
    tokenizer_dim: int = 512
    tokenizer_ffn_dim: int = 2048
    latent_patch_dim: int = 32
    num_patch_latents: int = 1024
    patch_size: int = 4
    tokenizer_num_blocks: int = 4
    tokenizer_num_heads: int = 8
    tokenizer_checkpoint: str = ""
    # LAM
    lam_dim: int = 512
    lam_ffn_dim: int = 2048
    latent_action_dim: int = 32
    num_actions: int = 6
    lam_patch_size: int = 16
    lam_num_blocks: int = 4
    lam_num_heads: int = 8
    lam_checkpoint: str = ""
    # Dynamics
    dyna_type: str = "maskgit"  # supported options: maskgit, causal
    dyna_dim: int = 512
    dyna_ffn_dim: int = 2048
    dyna_num_blocks: int = 6
    dyna_num_heads: int = 8
    dropout: float = 0.0
    mask_limit: float = 0.5
    z_loss_weight: float = 0.0
    param_dtype = jnp.float32
    dtype = jnp.bfloat16
    use_flash_attention: bool = True
    use_gt_actions: bool = False
    # Logging
    log: bool = False
    entity: str = ""
    project: str = ""
    name: str = "train_dynamics"
    tags: list[str] = field(default_factory=lambda: ["dynamics"])
    log_interval: int = 50
    log_image_interval: int = 1000
    ckpt_dir: str = ""
    log_checkpoint_interval: int = 5000
    log_checkpoint_keep_period: int = 20_000
    log_gradients: bool = False
    val_data_dir: str = ""
    val_interval: int = 20_000
    val_steps: int = 50
    eval_full_frame: bool = True
    val_maskgit_steps: int = 25
    val_temperature: float = 1
    val_sample_argmax: bool = False
    wandb_id: str = ""
[content] message.md (markdown)
    # Experiment
    num_steps: int = 200_000
    seed: int = 0
    seq_len: int = 16
    image_channels: int = 3
    image_height: int = 64
    image_width: int = 64
    data_dir: str = ""
    save_ckpt: bool = False
    restore_ckpt: bool = False
    # Optimization
    batch_size: int = 36
    init_lr: float = 0.0
    max_lr: float = 3e-5
    decay_end: float = 0.0
    wsd_decay_steps: int = (
        10000  # NOTE: wsd_decay_steps will only be used when using a wsd-schedule
    )
    warmup_steps: int = 5000
    lr_schedule: str = "cos"  # supported options: wsd, cos
    # Tokenizer
    tokenizer_dim: int = 512
    tokenizer_ffn_dim: int = 2048
    latent_patch_dim: int = 32
    num_patch_latents: int = 1024
    patch_size: int = 4
    tokenizer_num_blocks: int = 4
    tokenizer_num_heads: int = 8
    tokenizer_checkpoint: str = ""
    # LAM
    lam_dim: int = 512
    lam_ffn_dim: int = 2048
    latent_action_dim: int = 32
    num_actions: int = 6
    lam_patch_size: int = 16
    lam_num_blocks: int = 4
    lam_num_heads: int = 8
    lam_checkpoint: str = ""
    # Dynamics
    dyna_type: str = "maskgit"  # supported options: maskgit, causal
    dyna_dim: int = 512
    dyna_ffn_dim: int = 2048
    dyna_num_blocks: int = 6
    dyna_num_heads: int = 8
    max_noise_level: float = 0.7
    noise_buckets: int = 10
    dropout: float = 0.0
    mask_limit: float = 0.5
    param_dtype = jnp.float32
    dtype = jnp.bfloat16
    use_flash_attention: bool = True
    use_gt_actions: bool = False
    # Logging
    log: bool = False
    entity: str = ""
    project: str = ""
    name: str = "train_dynamics"
    tags: list[str] = field(default_factory=lambda: ["dynamics"])
    log_interval: int = 50
    log_image_interval: int = 1000
    ckpt_dir: str = ""
    log_checkpoint_interval: int = 5000
    log_checkpoint_keep_period: int = 20000
    log_gradients: bool = False
    val_data_dir: str = ""
    val_interval: int = 20_000
    val_steps: int = 50
    eval_full_frame: bool = True
    val_maskgit_steps: int = 25
    val_temperature: float = 1
    val_sample_argmax: bool = False
    wandb_id: str = ""
[tab] slurm/jobs/alfred/berlin/coinrun/coinrun_lam/lam_coinrun.sbatch (shellscript)
#!/usr/bin/env bash

#SBATCH --nodes=1
#SBATCH --ntasks-per-node=4
#SBATCH --time=24:00:00
#SBATCH --cpus-per-task=5
#SBATCH --gres=gpu:4
#SBATCH --output=/fast/project/HFMI_SynergyUnit/jafar_ws/logs/ali/lam/%x_%j.log
#SBATCH --error=/fast/project/HFMI_SynergyUnit/jafar_ws/logs/ali/lam/%x_%j.log
#SBATCH --job-name=train_lam_model_size_scaling_38M
#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=/fast/project/HFMI_SynergyUnit/jafar_ws/data/coinrun/array_records

job_name=$SLURM_JOB_NAME
slurm_job_id=$SLURM_JOB_ID

tags="lam coinrung 38M"

CHECKPOINT_PATH="/fast/project/HFMI_SynergyUnit/jafar_ws/checkpoints/lam/coinrun/${job_name}_${slurm_job_id}"
mkdir -p $CHECKPOINT_PATH

env | grep SLURM

srun python jasmine/train_lam.py \
    --save_ckpt \
    $restore_ckpt_flag \
    --wandb_id $SLURM_JOB_ID \
    --ckpt_dir $CHECKPOINT_PATH \
    --batch_size=48 \
    --image_height=64 \
    --image_width=64 \
    --max_lr=1e-4 \
    --log_image_interval=1000 \
    --log_checkpoint_interval=1000 \
    --log \
    --name="${job_name}_${slurm_job_id}" \
    --tags $tags \
    --entity instant-uv \
    --project jafar \
    --data_dir $array_records_dir
[tab] slurm/jobs/alfred/berlin/coinrun/coinrun_ablation/coinrun_lam_baseline.sbatch (shellscript)
#!/usr/bin/env bash

#SBATCH --nodes=1
#SBATCH --ntasks-per-node=1 
#SBATCH --gres=gpu:1
#SBATCH --time=1-00:00:00
#SBATCH --cpus-per-task=5
#SBATCH --output=/fast/project/HFMI_SynergyUnit/jafar_ws/logs/ali/coinrun/lam/%x_%j.log
#SBATCH --error=/fast/project/HFMI_SynergyUnit/jafar_ws/logs/ali/coinrun/lam/%x_%j.log
#SBATCH --job-name=train_lam_coinrun_ablation_baseline
#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

source .venv/bin/activate

job_name=$SLURM_JOB_NAME
slurm_job_id=$SLURM_JOB_ID

tags="coinrun lam_ablation"

array_records_dir="/fast/project/HFMI_SynergyUnit/jafar_ws/data/coinrun/array_records_10m"

CHECKPOINT_DIR="/fast/project/HFMI_SynergyUnit/jafar_ws/checkpoints/coinrun/lam/${job_name}_${slurm_job_id}"
mkdir -p $CHECKPOINT_DIR

env | grep SLURM

srun python jasmine/train_lam_full_prec.py \
    --save_ckpt \
    $restore_ckpt_flag \
    --wandb_id $SLURM_JOB_ID \
    --ckpt_dir $CHECKPOINT_DIR \
    --batch_size=36 \
    --image_height=64 \
    --image_width=64 \
    --max_lr=3e-5 \
    --init_lr=3e-6 \
    --decay_end=0 \
    --log_image_interval=1000 \
    --log_checkpoint_interval=1000 \
    --log \
    --ffn_dim=512 \
    --num_blocks=8 \
    --name="${job_name}_${slurm_job_id}" \
    --tags $tags \
    --entity instant-uv \
    --project jafar \
    --lr_schedule cos \
    --no_use_flash_attention \
    --data_dir $array_records_dir &

child_pid=$!

wait $child_pid
[tab] slurm/jobs/alfred/berlin/coinrun/coinrun_ablation/wsd/coinrun_lam_wsd_3e-6.sbatch (shellscript)
#!/usr/bin/env bash

#SBATCH --nodes=1
#SBATCH --ntasks-per-node=1 
#SBATCH --gres=gpu:1
#SBATCH --time=1-00:00:00
#SBATCH --cpus-per-task=5
#SBATCH --output=/fast/project/HFMI_SynergyUnit/jafar_ws/logs/ali/coinrun/lam/%x_%j.log
#SBATCH --error=/fast/project/HFMI_SynergyUnit/jafar_ws/logs/ali/coinrun/lam/%x_%j.log
#SBATCH --job-name=train_lam_coinrun_ablation_wsd_3e-6
#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

source .venv/bin/activate

job_name=$SLURM_JOB_NAME
slurm_job_id=$SLURM_JOB_ID

tags="coinrun lam_ablation"

array_records_dir="/fast/project/HFMI_SynergyUnit/jafar_ws/data/coinrun/array_records_10m"

CHECKPOINT_DIR="/fast/project/HFMI_SynergyUnit/jafar_ws/checkpoints/coinrun/lam/${job_name}_${slurm_job_id}"
mkdir -p $CHECKPOINT_DIR

env | grep SLURM

srun python jasmine/train_lam_full_prec.py \
    --save_ckpt \
    $restore_ckpt_flag \
    --wandb_id $SLURM_JOB_ID \
    --ckpt_dir $CHECKPOINT_DIR \
    --batch_size=36 \
    --image_height=64 \
    --image_width=64 \
    --init_lr=0 \
    --max_lr=3e-6 \
    --decay_end=0 \
    --log_image_interval=1000 \
    --log_checkpoint_interval=1000 \
    --log \
    --ffn_dim=512 \
    --num_blocks=8 \
    --name="${job_name}_${slurm_job_id}" \
    --tags $tags \
    --entity instant-uv \
    --project jafar \
    --lr_schedule wsd \
    --no_use_flash_attention \
    --data_dir $array_records_dir &

child_pid=$!

wait $child_pid
[tab] slurm/jobs/alfred/berlin/coinrun/coinrun_reproduction/coinrun_lam_reproduction_full_prec_cosine.sbatch (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 --output=/fast/project/HFMI_SynergyUnit/jafar_ws/logs/ali/coinrun/lam/%x_%j.log
#SBATCH --error=/fast/project/HFMI_SynergyUnit/jafar_ws/logs/ali/coinrun/lam/%x_%j.log
#SBATCH --job-name=train_lam_coinrun_reproduction_full_prec_cosine
#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

job_name=$SLURM_JOB_NAME
slurm_job_id=$SLURM_JOB_ID

tags="coinrun reproduction 10m_dataset lam lam_repro"

array_records_dir="/fast/project/HFMI_SynergyUnit/jafar_ws/data/coinrun/array_records_10m"

CHECKPOINT_DIR="/fast/project/HFMI_SynergyUnit/jafar_ws/checkpoints/coinrun/lam/${job_name}_${slurm_job_id}"
mkdir -p $CHECKPOINT_DIR

env | grep SLURM

srun python jasmine/train_lam_full_prec.py \
    --save_ckpt \
    $restore_ckpt_flag \
    --wandb_id $SLURM_JOB_ID \
    --ckpt_dir $CHECKPOINT_DIR \
    --batch_size=36 \
    --image_height=64 \
    --image_width=64 \
    --max_lr=3e-5 \
    --log_image_interval=1000 \
    --log_checkpoint_interval=1000 \
    --log \
    --name="${job_name}_${slurm_job_id}" \
    --tags $tags \
    --entity instant-uv \
    --project jafar \
    --lr_schedule cos \
    --data_dir $array_records_dir
[tab] slurm/jobs/alfred/berlin/coinrun/coinrun_reproduction/coinrun_lam_reproduction_full_prec_w_restore.sbatch (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 --output=/fast/project/HFMI_SynergyUnit/jafar_ws/logs/ali/coinrun/lam/%x_%j.log
#SBATCH --error=/fast/project/HFMI_SynergyUnit/jafar_ws/logs/ali/coinrun/lam/%x_%j.log
#SBATCH --job-name=train_lam_coinrun_reproduction_full_prec_w_restore_100k
#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

job_name=$SLURM_JOB_NAME
slurm_job_id=$SLURM_JOB_ID

tags="coinrun reproduction 10m_dataset lam lam_repro 100k_ckpt full_prec"

array_records_dir="/fast/project/HFMI_SynergyUnit/jafar_ws/data/coinrun/array_records_10m"

# CHECKPOINT_DIR="/fast/project/HFMI_SynergyUnit/jafar_ws/checkpoints/coinrun/lam/${job_name}_${slurm_job_id}"
CHECKPOINT_DIR="/fast/project/HFMI_SynergyUnit/jafar_ws/checkpoints/coinrun/lam/train_lam_coinrun_reproduction_20067/100000_ckpt_full_prec"
# mkdir -p $CHECKPOINT_DIR

env | grep SLURM

srun python jasmine/train_lam_full_prec.py \
    --save_ckpt \
    --restore-ckpt \
    --wandb_id $SLURM_JOB_ID \
    --ckpt_dir $CHECKPOINT_DIR \
    --batch_size=36 \
    --image_height=64 \
    --image_width=64 \
    --max_lr=3e-5 \
    --log_image_interval=1000 \
    --log_checkpoint_interval=1000 \
    --log \
    --name="${job_name}_${slurm_job_id}" \
    --tags $tags \
    --entity instant-uv \
    --project jafar \
    --data_dir $array_records_dir
[tab] slurm/jobs/alfred/berlin/coinrun/coinrun_reproduction/coinrun_lam_reproduction_full_prec.sbatch (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 --output=/fast/project/HFMI_SynergyUnit/jafar_ws/logs/ali/coinrun/lam/%x_%j.log
#SBATCH --error=/fast/project/HFMI_SynergyUnit/jafar_ws/logs/ali/coinrun/lam/%x_%j.log
#SBATCH --job-name=train_lam_coinrun_reproduction_full_prec
#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

job_name=$SLURM_JOB_NAME
slurm_job_id=$SLURM_JOB_ID

tags="coinrun reproduction 10m_dataset lam lam_repro"

array_records_dir="/fast/project/HFMI_SynergyUnit/jafar_ws/data/coinrun/array_records_10m"

CHECKPOINT_DIR="/fast/project/HFMI_SynergyUnit/jafar_ws/checkpoints/coinrun/lam/${job_name}_${slurm_job_id}"
mkdir -p $CHECKPOINT_DIR

env | grep SLURM

srun python jasmine/train_lam_full_prec.py \
    --save_ckpt \
    $restore_ckpt_flag \
    --wandb_id $SLURM_JOB_ID \
    --ckpt_dir $CHECKPOINT_DIR \
    --batch_size=36 \
    --image_height=64 \
    --image_width=64 \
    --max_lr=3e-5 \
    --log_image_interval=1000 \
    --log_checkpoint_interval=1000 \
    --log \
    --name="${job_name}_${slurm_job_id}" \
    --tags $tags \
    --entity instant-uv \
    --project jafar \
    --data_dir $array_records_dir
[tab] slurm/dev/alfred/berlin/train_lam_dev/train_lam.sbatch (shellscript)
#!/usr/bin/env bash

#SBATCH --nodes=1
#SBATCH --ntasks-per-node=1
#SBATCH --gres=gpu:1
#SBATCH --time=6:00:00
#SBATCH --cpus-per-task=8
#SBATCH --output=/fast/project/HFMI_SynergyUnit/jafar_ws/logs/ali/minecraft/lam/%x_%j.log
#SBATCH --error=/fast/project/HFMI_SynergyUnit/jafar_ws/logs/ali/minecraft/lam/%x_%j.log
#SBATCH --job-name=minecraft_lam_dev
#SBATCH --requeue
#SBATCH --signal=b:usr1@300 # 5 min before timeout


source .venv/bin/activate


array_records_dir="/fast/project/HFMI_SynergyUnit/jafar_ws/avocadoali/test_set_uncompressed"

job_name="debug"
slurm_job_id="0000"

CHECKPOINT_DIR=/fast/project/HFMI_SynergyUnit/jafar_ws/checkpoints/lam/mock_lam
mkdir -p $CHECKPOINT_DIR

tags="lam gt_actions_sampling_fix "

export xla_flags=--xla_gpu_autotune_level=0

srun python jasmine/train_lam.py \
    --ckpt_dir $CHECKPOINT_DIR \
    --save_ckpt \
    --batch_size=12 \
    --log_image_interval=20 \
    --log \
    --tags $tags \
    --name=test-wandb-tags-$slurm_job_id \
    --entity instant-uv \
    --project jafar \
    --log_checkpoint_interval 10 \
    --data_dir $array_records_dir
[tab] slurm/dev/alfred/berlin/train_dyn_dev/train_dynacmis_overfit.sbatch (shellscript)
#!/usr/bin/env bash

#sbatch --nodes=1
#sbatch --ntasks-per-node=1
#sbatch --time=0:01:00
#sbatch --cpus-per-task=5
#sbatch --gres=gpu:1
#sbatch --output=/fast/project/HFMI_SynergyUnit/jafar_ws/logs/ali/dev/%x_%j.log
#sbatch --error=/fast/project/HFMI_SynergyUnit/jafar_ws/logs/ali/dev/%x_%j.log
#sbatch --job-name=train_dynacmis_dev


########################################################
# setup the environment
########################################################
cat $0

source .venv/bin/activate

job_name="train_dynamics_lr_scaling_berlin_dev"
tags="dynamic_lr_tuning_dev requeue_dev "
# array_records_dir="/fast/project/hfmi_synergyunit/jafar_ws/data_uncompressed/train"


# array_records_dir="tests/data/dummy_arrayrecord"
# array_records_dir="tests/data/dummy_arrayrecord_16"
# array_records_dir="tests/data/dummy_arrayrecord_14"
# array_records_dir="tests/data/dummy_arrayrecord_12"

# array_records_dir="/home/alfred.nguyen/projects/jafar/data/open_ai_minecraft_arrary_records_w_actions_smol"
# array_records_dir="/home/alfred.nguyen/projects/jasmine/tests/data/dummy_arrayrecord/"
array_records_dir="/fast/project/HFMI_SynergyUnit/jafar_ws/avocadoali/test_set_uncompressed"
# array_records_dir="/fast/project/HFMI_SynergyUnit/jafar_ws/avocadoali/overfit_set"
# tokenizer_checkpoint_dir="/fast/project/HFMI_SynergyUnit/jafar_ws/checkpoints/tokenizer"
# tokenizer_checkpoint_dir="/fast/project/HFMI_SynergyUnit/jafar_ws/checkpoints/tokenizer/nnx/279000"
tokenizer_checkpoint_dir="/fast/project/HFMI_SynergyUnit/jafar_ws/checkpoints/minecraft/tokenizer/overfit/interactive_20612"
checkpoint_dir="/fast/project/HFMI_SynergyUnit/jafar_ws/checkpoints/dev/${job_name}_${slurm_job_id}"
mkdir -p $checkpoint_dir

# export xla_flags=--xla_gpu_autotune_level=0

python train_dynamics.py \
    --save_ckpt \
    --ckpt_dir $checkpoint_dir \
    --tokenizer_checkpoint $tokenizer_checkpoint_dir \
    --batch_size=60 \
    --log_checkpoint_interval=5 \
    --log \
    --name=${job_name} \
    --tags $tags \
    --entity instant-uv \
    --project jafar \
    --data_dir $array_records_dir


# srun python jasmine/train_dynamics.py \
#     --save_ckpt \
#     --ckpt_dir $checkpoint_dir \
#     --tokenizer_checkpoint $tokenizer_checkpoint_dir \
#     --batch_size=12 \
#     --log_checkpoint_interval=500 \
#     --log \
#     --name=${job_name} \
#     --tags $tags \
#     --entity instant-uv \
#     --project jafar \
    # --use_gt_actions \
#     --data_dir $array_records_dir &

# child_pid=$!

# wait $child_pid