| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
|
|
| echo "My SLURM_ARRAY_JOB_ID is ${SLURM_ARRAY_JOB_ID}" |
| echo "My SLURM_ARRAY_TASK_ID is ${SLURM_ARRAY_TASK_ID}" |
| echo "Executing on the machine: $(hostname)" |
|
|
| module purge |
| module load anaconda3/2023.3 |
| module load fsl/6.0.6.2 |
| conda activate rt_mindEye2 |
| |
|
|
| |
| |
| sub="sub-005" |
| session="all" |
| session_label='ses-01-02' |
| split=MST # MST train/test split, alternative would be train on non-repeats and test on images that repeat (split=orig) |
| task=C |
| func_task_name=C |
| resample_voxel_size=False |
| resample_post_glmsingle=False |
| load_from_resampled_file=True |
| remove_close_to_MST=False |
| remove_random_n=False |
| resampled_vox_size=2.0 |
| resample_method="trilinear" |
| |
| vox_dim_str=${resampled_vox_size//./_} |
|
|
| |
| model_name="${sub}_${session}_task-${task}_bs24_MST_rishab_${split}split_finetune_multisubj-ckpt_unionmask" |
| |
| main_script="main-finetune" |
| |
| glmsingle_path="/scratch/gpfs/ri4541/MindEyeV2/src/mindeyev2/glmsingle_${sub}_${session_label}_task-${task}" |
| |
|
|
| export NUM_GPUS=1 # Set to equal gres=gpu:#! |
| export BATCH_SIZE=24 |
| export GLOBAL_BATCH_SIZE=$((BATCH_SIZE * NUM_GPUS)) |
|
|
| Make sure another job doesnt use same port, here using random number |
| export MASTER_PORT=$((RANDOM % (19000 - 11000 + 1) + 11000)) |
| export HOSTNAMES=$(scontrol show hostnames "$SLURM_JOB_NODELIST") |
| export MASTER_ADDR=$(scontrol show hostnames "$SLURM_JOB_NODELIST" | head -n 1) |
| export COUNT_NODE=$(scontrol show hostnames "$SLURM_JOB_NODELIST" | wc -l) |
| echo MASTER_ADDR=${MASTER_ADDR} |
| echo MASTER_PORT=${MASTER_PORT} |
| echo WORLD_SIZE=${COUNT_NODE} |
|
|
| echo model_name=${model_name} |
|
|
| eval_dir="/scratch/gpfs/ri4541/MindEyeV2/src/mindeyev2/evals/${model_name}" |
| export SUB=${sub} |
| export SESSION=${session} |
| export SESSION_LABEL=${session_label} |
| export SPLIT=${split} |
| export TASK=${task} |
| export FUNC_TASK_NAME=${func_task_name} |
| export RESAMPLE_VOXEL_SIZE=${resample_voxel_size} |
| export RESAMPLE_POST_GLMSINGLE=${resample_post_glmsingle} |
| export LOAD_FROM_RESAMPLED_FILE=${load_from_resampled_file} |
| export REMOVE_CLOSE_TO_MST=${remove_close_to_MST} |
| export REMOVE_RANDOM_N=${remove_random_n} |
| export RESAMPLED_VOX_SIZE=${resampled_vox_size} |
| export RESAMPLE_METHOD=${resample_method} |
|
|
| export glmsingle_path=${glmsingle_path} |
| export eval_dir=${eval_dir} |
| export WANDB_MODE="offline" |
|
|
| |
| jupyter nbconvert "${main_script}.ipynb" --to python && \ |
| accelerate launch --num_processes=$(($NUM_GPUS * $COUNT_NODE)) --num_machines=$COUNT_NODE --main_process_ip=$MASTER_ADDR --main_process_port=$MASTER_PORT "${main_script}.py" --data_path=/scratch/gpfs/ri4541/MindEyeV2/src/mindeyev2 --model_name=${model_name} --no-multi_subject --subj=1 --batch_size=${BATCH_SIZE} --max_lr=3e-4 --mixup_pct=.33 --num_epochs=150 --use_prior --prior_scale=30 --clip_scale=1 --no-blurry_recon --blur_scale=.5 --no-use_image_aug --n_blocks=4 --hidden_dim=1024 --num_sessions=40 --ckpt_interval=999 --ckpt_saving --wandb_log --multisubject_ckpt=/scratch/gpfs/ri4541/MindEyeV2/src/mindeyev2/train_logs/multisubject_subj01_1024hid_nolow_300ep --seed="${SLURM_ARRAY_TASK_ID}" && \ |
|
|
| |
| |
|
|
| |
| |
|
|
| |
| |
|
|
| |
| |
|
|
| |
| |
|
|
| |
| |
|
|
| echo "Remember to sync wandb logs with online node!" |
|
|