#!/bin/bash #SBATCH --job-name=r5_vlma_lead_L #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, GPU slot L: leader runs of amendment 3.3 D2 after the line block (submit with --dependency=afterany:51128). # leader_runner.py queue_lead_L.json takes the runs the plan placed on slot L (then any open run), claiming each one # so that no run executes on two slots at once. # HARD CAP (amendment 3.4 E1): GNU timeout ending at 2026-11-24 11:59 UTC, whenever the job starts; training stops at # 11:30, validation 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/leader_runner.py $S/queue_lead_L.json echo "[r5_vlma_lead_L] end $(date -u +%FT%TZ)"