File size: 1,542 Bytes
24aaa76 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 | #!/bin/bash
#SBATCH --job-name=r5_vlma_lead_V
#SBATCH --partition=H100
#SBATCH --qos=nu-h100
#SBATCH --gres=gpu:h100:1
#SBATCH --cpus-per-task=16
#SBATCH --mem=96G
#SBATCH --time=2-06:00:00
#SBATCH --output=/path/to/TURKIC_OCR_DATA/logs/%x_%j.out
# R5 VLMA, GPU slot V, follow-on of job 50942 (submit with --dependency=afterany:50942).
# 1) runner.py queue_V2.json: finishes any VLMA short task 50942 left (same state file), exits when nothing runs;
# 2) leader_runner.py queue_lead_V.json: catch-up D9 validation, then the amendment 3.3 D2 leader runs.
# HARD CAP (amendment 3.4 E1): every step runs under GNU timeout ending at 2026-11-24 11:59 UTC, so the job cannot run
# past 12:00 UTC whenever it starts; the runners stop training at 11:30 and validation at 11:55.
set -u
CODE=/path/to/TURKIC_OCR_CODE
S=$CODE/scripts/r5_vlma
PY="$CODE/.venv_vlm/bin/python -I"
export HF_HUB_OFFLINE=1 TOKENIZERS_PARALLELISM=false
unset HF_TOKEN HUGGING_FACE_HUB_TOKEN || true
END=$(date -u -d "2026-11-24T11:59:00Z" +%s)
echo "job $SLURM_JOB_ID on $(hostname) start $(date -u +%FT%TZ); hard stop 2026-11-24T11:59:00Z"
nvidia-smi --query-gpu=name,driver_version,memory.total --format=csv
LEFT=$(( END - $(date -u +%s) ))
[ $LEFT -gt 300 ] || { echo "past the hard stop; exit"; exit 0; }
timeout -k 120 $LEFT $PY $S/runner.py $S/queue_V2.json
LEFT=$(( END - $(date -u +%s) ))
[ $LEFT -gt 300 ] || { echo "past the hard stop; exit"; exit 0; }
timeout -k 120 $LEFT $PY $S/leader_runner.py $S/queue_lead_V.json
echo "[r5_vlma_lead_V] end $(date -u +%FT%TZ)"
|