File size: 1,547 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 32 33 34 35 36 | #!/bin/bash
#SBATCH --job-name=loopguard_run
#SBATCH --partition=H100
#SBATCH --qos=nu-h100
#SBATCH --gres=gpu:h100:1
#SBATCH --cpus-per-task=16
#SBATCH --mem=96G
#SBATCH --time=04:00:00
#SBATCH --output=/path/to/TURKIC_OCR_DATA/logs/%x_%j.out
#SBATCH --dependency=singleton
# LOOPGUARD-1 (records/R5/LOOPGUARD/design.json): the one GPU job. Copy of scripts/r5_onemodel/onemodel_gate.sbatch with this
# experiment's names. It runs only reviewed code: READY lists the sha256 of every approved file (the code,
# the reused r5_vlma / r5eval / linedet files and the two data pin lists), and the job refuses to start if READY is missing
# or any listed file changed since the review. A resubmission by lg_run_gpu.sh submits THIS file again, so every segment
# passes the same check. The candidate list is DATA/outputs/r5/loopguard/READY_CANDIDATE; it is copied to READY by hand.
set -u
C=/path/to/TURKIC_OCR_CODE
D=/path/to/TURKIC_OCR_DATA
READY=$D/outputs/r5/loopguard/READY
hostname; date -u; nvidia-smi --query-gpu=name,memory.total --format=csv,noheader
if [ ! -f "$READY" ]; then
echo "NOT STARTED: no READY file (code review not finished); exit 3"
exit 3
fi
cd "$C" || exit 3
if ! sha256sum -c --quiet "$READY"; then
echo "NOT STARTED: a reviewed file changed after the review; exit 3"
exit 3
fi
if [ ! -f "$C/scripts/r5_loopguard/lg_run_gpu.sh" ]; then
echo "NOT STARTED: scripts/r5_loopguard/lg_run_gpu.sh missing; exit 3"
exit 3
fi
echo "review check passed; starting LOOPGUARD-1"
exec bash "$C/scripts/r5_loopguard/lg_run_gpu.sh"
|