p-doom/crowd-code-dataset-0.2 huggingface dataset:
[tab] slurm/dev/franz/berlin/coinrun/sample/maskgit/sample_mila_submission.sh (shellscript)
#!/usr/bin/env bash

#SBATCH --nodes=1
#SBATCH --ntasks-per-node=4
#SBATCH --time=01:00:00
#SBATCH --partition=accelerated
#SBATCH --cpus-per-task=5
#SBATCH --gres=gpu:4
#SBATCH --output=/fast/project/HFMI_SynergyUnit/jafar_ws/logs/franz/coinrun/dynamics_sample/%x_%j.log
#SBATCH --error=/fast/project/HFMI_SynergyUnit/jafar_ws/logs/franz/coinrun/dynamics_sample/%x_%j.log
#SBATCH --job-name=coinrun_sample_maskgit_mila_submission

# Activate virtual environment
source .venv/bin/activate

array_records_dir="/fast/project/HFMI_SynergyUnit/jafar_ws/data/coinrun/array_records_500m_seed_w_increment/val"
CHECKPOINT_PATH="/fast/project/HFMI_SynergyUnit/jafar_ws/checkpoints/coinrun/dynamics/dynamics_coinrun_mila_submission/29973"


echo "Sampling from checkpoint: $CHECKPOINT_PATH"

srun python jasmine/sample.py \
    --checkpoint $CHECKPOINT_PATH \
    --data_dir=$array_records_dir \
    --seq_len=16 \
    --batch_size=4 \
    --patch_size=16 \
    --start_frame=4 \
    --image_height=64 \
    --image_width=64 \
    --dyna_type=maskgit
[tab] slurm/dev/franz/berlin/atari/sample/sample_mila_submission.sh (shellscript)
#!/usr/bin/env bash

#SBATCH --nodes=1
#SBATCH --ntasks-per-node=4
#SBATCH --time=01:00:00
#SBATCH --partition=accelerated
#SBATCH --cpus-per-task=5
#SBATCH --gres=gpu:4
#SBATCH --output=/fast/project/HFMI_SynergyUnit/jafar_ws/logs/franz/coinrun/dynamics_sample/%x_%j.log
#SBATCH --error=/fast/project/HFMI_SynergyUnit/jafar_ws/logs/franz/coinrun/dynamics_sample/%x_%j.log
#SBATCH --job-name=coinrun_sample_maskgit_mila_submission

# Activate virtual environment
source .venv/bin/activate

array_records_dir="/fast/project/HFMI_SynergyUnit/jafar_ws/data/coinrun/array_records_500m_seed_w_increment/val"
CHECKPOINT_PATH="/fast/project/HFMI_SynergyUnit/jafar_ws/checkpoints/coinrun/dynamics/dynamics_coinrun_mila_submission/29973"


echo "Sampling from checkpoint: $CHECKPOINT_PATH"

srun python jasmine/sample.py \
    --checkpoint $CHECKPOINT_PATH \
    --data_dir=$array_records_dir \
    --seq_len=16 \
    --batch_size=4 \
    --patch_size=16 \
    --start_frame=4 \
    --image_height=64 \
    --image_width=64 \
    --dyna_type=maskgit
[tab] slurm/dev/franz/berlin/atari/sample/sample_atari.sh (shellscript)
#!/usr/bin/env bash

#SBATCH --nodes=1
#SBATCH --ntasks-per-node=4
#SBATCH --time=01:00:00
#SBATCH --partition=accelerated
#SBATCH --cpus-per-task=5
#SBATCH --gres=gpu:4
#SBATCH --output=/fast/project/HFMI_SynergyUnit/jafar_ws/logs/franz/coinrun/dynamics_sample/%x_%j.log
#SBATCH --error=/fast/project/HFMI_SynergyUnit/jafar_ws/logs/franz/coinrun/dynamics_sample/%x_%j.log
#SBATCH --job-name=coinrun_sample_maskgit_mila_submission

# Activate virtual environment
source .venv/bin/activate

array_records_dir="/fast/project/HFMI_SynergyUnit/jafar_ws/data/atari/breakout/val/"
CHECKPOINT_PATH=""


echo "Sampling from checkpoint: $CHECKPOINT_PATH"

srun python jasmine/sample.py \
    --checkpoint $CHECKPOINT_PATH \
    --data_dir=$array_records_dir \
    --seq_len=16 \
    --batch_size=4 \
    --patch_size=16 \
    --start_frame=4 \
    --image_height=64 \
    --image_width=64 \
    --dyna_type=maskgit
[content] slurm/dev/franz/berlin/atari/sample/sample_atari.sh (shellscript)
    --num_patch_latents=512 \
    --latent_patch_dim=512 \
    --tokenizer_dim=256 \
    --tokenizer_ffn_dim=256 \
    --tokenizer_num_heads=4 \
    --patch_size=4 \
    --latent_action_dim=512 \
    --image_height=84 \
    --image_width=84 \
[content] slurm/dev/franz/berlin/atari/sample/sample_atari.sh (shellscript)
declare -A TOKENIZER_CKPT_MAP=(
    [alien]="/fast/project/HFMI_SynergyUnit/jafar_ws/checkpoints/atari/alien/tokenizer/tokenizer_atari_alien_dev_lr_3e-6_fleuret_hparams_patch_size_4_30280"
    [amidar]="/fast/project/HFMI_SynergyUnit/jafar_ws/checkpoints/atari/amidar/tokenizer/tokenizer_atari_amidar_dev_lr_3e-6_fleuret_hparams_patch_size_4_30281"
    [assault]="/fast/project/HFMI_SynergyUnit/jafar_ws/checkpoints/atari/assault/tokenizer/tokenizer_atari_assault_dev_lr_3e-6_fleuret_hparams_patch_size_4_30282"
    [asterix]="/fast/project/HFMI_SynergyUnit/jafar_ws/checkpoints/atari/asterix/tokenizer/tokenizer_atari_asterix_dev_lr_3e-6_fleuret_hparams_patch_size_4_30283"
    [bank_heist]="/fast/project/HFMI_SynergyUnit/jafar_ws/checkpoints/atari/bank_heist/tokenizer/tokenizer_atari_bank_heist_dev_lr_3e-6_fleuret_hparams_patch_size_4_30284"
    [battle_zone]="/fast/project/HFMI_SynergyUnit/jafar_ws/checkpoints/atari/battle_zone/tokenizer/tokenizer_atari_battle_zone_dev_lr_3e-6_fleuret_hparams_patch_size_4_30285"
    [boxing]="/fast/project/HFMI_SynergyUnit/jafar_ws/checkpoints/atari/boxing/tokenizer/tokenizer_atari_boxing_dev_lr_3e-6_fleuret_hparams_patch_size_4_30286"
    [breakout]="/fast/project/HFMI_SynergyUnit/jafar_ws/checkpoints/atari/breakout/tokenizer/tokenizer_atari_breakout_dev_lr_3e-6_fleuret_hparams_patch_size_4_30287"
    [crazy_climber]="/fast/project/HFMI_SynergyUnit/jafar_ws/checkpoints/atari/crazy_climber/tokenizer/tokenizer_atari_crazy_climber_dev_lr_3e-6_fleuret_hparams_patch_size_4_30289"
    [demon_attack]="/fast/project/HFMI_SynergyUnit/jafar_ws/checkpoints/atari/demon_attack/tokenizer/tokenizer_atari_demon_attack_dev_lr_3e-6_fleuret_hparams_patch_size_4_30290"
)
[tab] slurm/dev/franz/berlin/atari/dynamics_fleuret_hparams_patch_size_4/spawn_dynamics.sh (shellscript)
#!/usr/bin/env bash

set -euo pipefail

REPO_ROOT="/home/franz.srambical/jafar"

DATA_ROOT="${DATA_ROOT:-/fast/project/HFMI_SynergyUnit/jafar_ws/data/atari}"

DYNAMICS_SCRIPT="${DYNAMICS_SCRIPT:-$REPO_ROOT/slurm/dev/franz/berlin/atari/dynamics_fleuret_hparams_patch_size_4/dynamics.sh}"

# (No tokenizer checkpoint override passed by spawner; dynamics.sh resolves mapping)

if [ "$#" -gt 0 ]; then
    ENV_LIST=("$@")
else
    if [ ! -d "$DATA_ROOT" ]; then
        echo "DATA_ROOT does not exist: $DATA_ROOT" >&2
        exit 1
    fi
    mapfile -t ENV_LIST < <(find "$DATA_ROOT" -mindepth 1 -maxdepth 1 -type d -printf '%f
' | sort)
fi

echo "Submitting Dynamics jobs for environments: ${ENV_LIST[*]}"

for env in "${ENV_LIST[@]}"; do
    env_dir="$DATA_ROOT/$env"
    if [ ! -d "$env_dir/train" ] || [ ! -d "$env_dir/val" ]; then
        echo "Skipping $env (missing train/val under $env_dir)"
        continue
    fi

    job_name="dynamics_atari_${env}_dev_fleuret_hparams_patch_size_4"

    # Tokenizer checkpoint is resolved inside dynamics.sh

    job_id=$(sbatch --parsable \
        --job-name="$job_name" \
        --chdir="$REPO_ROOT" \
        --export=ALL,ENV_NAME="$env" \
        "$DYNAMICS_SCRIPT")

    echo "Submitted $job_name (ENV_NAME=$env) as job $job_id"
done
[content] slurm/dev/franz/berlin/atari/sample/spawn_sampler.sh (shellscript)
#!/usr/bin/env bash

set -euo pipefail

REPO_ROOT="/home/franz.srambical/jafar"

DATA_ROOT="${DATA_ROOT:-/fast/project/HFMI_SynergyUnit/jafar_ws/data/atari}"

SAMPLE_SCRIPT="${SAMPLE_SCRIPT:-$REPO_ROOT/slurm/dev/franz/berlin/atari/sample/sample_atari.sh}"

if [ "$#" -gt 0 ]; then
    ENV_LIST=("$@")
else
    if [ ! -d "$DATA_ROOT" ]; then
        echo "DATA_ROOT does not exist: $DATA_ROOT" >&2
        exit 1
    fi
    mapfile -t ENV_LIST < <(find "$DATA_ROOT" -mindepth 1 -maxdepth 1 -type d -printf '%f
' | sort)
fi

echo "Submitting Sample jobs for environments: ${ENV_LIST[*]}"

for env in "${ENV_LIST[@]}"; do
    env_dir="$DATA_ROOT/$env"
    if [ ! -d "$env_dir/val" ]; then
        echo "Skipping $env (missing val under $env_dir)"
        continue
    fi

    job_name="sample_atari_${env}_maskgit"

    job_id=$(sbatch --parsable \
        --job-name="$job_name" \
        --chdir="$REPO_ROOT" \
        --export=ALL,ENV_NAME="$env" \
        "$SAMPLE_SCRIPT")

    echo "Submitted $job_name (ENV_NAME=$env) as job $job_id"
done