mats-sql-bundle / code /slurm_logs /launch_v3_4chunks.sh
thanhdath's picture
Push code: scripts, slurm sbatch, recipes, utils (v3 + selector series)
778d47d verified
Raw
History Blame Contribute Delete
746 Bytes
#!/bin/bash
# Launch 4 parallel chunks of v3 preference dataset build for one SIDE (sel or cond).
# Usage: SIDE=sel bash launch_v3_4chunks.sh
# SIDE=cond bash launch_v3_4chunks.sh
# Splits griffith 9345 items into 4 chunks ≈ 2337 each.
SIDE=${SIDE:-sel}
N=9345
C=$(( (N + 3) / 4 )) # ~2336
cd /weka/s225250685/mats-tist
for i in 0 1 2 3; do
START=$(( i * C ))
END=$(( (i + 1) * C ))
if [ $END -gt $N ]; then END=$N; fi
OUT="data/hf_orpo_val_${SIDE}_v3_chunk${i}"
echo "Submitting chunk $i: $SIDE [$START:$END] → $OUT"
sbatch --export=SIDE=$SIDE,START_IDX=$START,END_IDX=$END,OUT_DIR=$OUT slurm_logs/build_orpo_v3_chunk.sbatch
done
echo "---"
squeue -u $USER -o "%.10i %.20j %.2t %.10M %P %R" 2>/dev/null