|
|
#!/usr/bin/env bash |
|
|
set -e |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
CMD="python train.py" |
|
|
CFG_STAGE1="/workspace/stormer/configs/pretrain_one_step.yaml" |
|
|
CFG_STAGE2="/workspace/stormer/configs/finetune_multi_step_stage2.yaml" |
|
|
CFG_STAGE3="/workspace/stormer/configs/finetune_multi_step_stage3.yaml" |
|
|
|
|
|
DATA_ROOT="/workspace/stormer/wb2_processed" |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
SETTINGS=( |
|
|
"384-18-6" |
|
|
) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
for setting in "${SETTINGS[@]}"; do |
|
|
|
|
|
IFS="-" read -r h d nh <<< "${setting}" |
|
|
|
|
|
RUN_ID="h${h}_d${d}_n${nh}" |
|
|
echo "============================================================" |
|
|
echo "RUN: ${RUN_ID} (hidden=${h}, depth=${d}, num_heads=${nh})" |
|
|
echo "============================================================" |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
PRETRAIN_CKPT="/workspace/stormer/results/pretrain/${RUN_ID}/pretrain_one_step_${RUN_ID}/checkpoints/last.ckpt" |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
${CMD} \ |
|
|
--config "${CFG_STAGE2}" \ |
|
|
--trainer.default_root_dir "/workspace/stormer/results/finetune/4steps_${RUN_ID}" \ |
|
|
--trainer.logger.init_args.name "finetune_4_steps_${RUN_ID}" \ |
|
|
--model.net.init_args.hidden_size "${h}" \ |
|
|
--model.net.init_args.depth "${d}" \ |
|
|
--model.net.init_args.num_heads "${nh}" \ |
|
|
--model.net.patch_size 4 \ |
|
|
--model.pretrained_path "${PRETRAIN_CKPT}" \ |
|
|
--data.root_dir "${DATA_ROOT}" \ |
|
|
--data.steps 4 \ |
|
|
--data.batch_size 1 |
|
|
|
|
|
FINETUNE4_CKPT="/workspace/stormer/results/finetune/4steps_${RUN_ID}/finetune_4_steps_${RUN_ID}/checkpoints/last.ckpt" |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
${CMD} \ |
|
|
--config "${CFG_STAGE3}" \ |
|
|
--trainer.default_root_dir "/workspace/stormer/results/finetune/8steps_${RUN_ID}" \ |
|
|
--trainer.logger.init_args.name "finetune_8_steps_${RUN_ID}" \ |
|
|
--model.net.init_args.hidden_size "${h}" \ |
|
|
--model.net.init_args.depth "${d}" \ |
|
|
--model.net.init_args.num_heads "${nh}" \ |
|
|
--model.net.patch_size 4 \ |
|
|
--model.pretrained_path "${FINETUNE4_CKPT}" \ |
|
|
--data.root_dir "${DATA_ROOT}" \ |
|
|
--data.steps 8 \ |
|
|
--data.batch_size 1 |
|
|
|
|
|
done |