File size: 2,783 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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
#!/bin/bash
#SBATCH --job-name=r5_testpass_V
#SBATCH --partition=H100
#SBATCH --qos=nu-h100
#SBATCH --gres=gpu:h100:1
#SBATCH --cpus-per-task=16
#SBATCH --mem=96G
#SBATCH --time=10:00:00
#SBATCH --dependency=afterany:52334
#SBATCH --output=/path/to/TURKIC_OCR_DATA/logs/%x_%j.out
# R5 test pass, GPU slot V (clarifications J2-J9, 23 Nov 2026). NOT submitted by VLMA; it is submitted by hand.
# J3: always starts runner workers 0 and 1 on this GPU; worker 1 reads DATA/outputs/r5/vlma/testpass_nproc.txt (written
# by corun_check.sh) when the pass opens and exits unless it starts with "2" (missing file = one process).
# 52334/52335 end when their leader runs are done (possibly well before 11:58); this job then waits idle, holding the
# slot, and the co-run check and GPU smoke may run as steps in it (srun --jobid=<this job> --overlap ...).
# Every runner waits inside the job until 24 Nov 12:00 UTC AND the gate file DATA/outputs/r5/RULE/test_pass_started.txt,
# then the first one builds the ONE shared task list (testpass_build_tasks.py: selection.json if frozen, else J2's
# fallback) and all processes of both slots pull from it in J2 order. J4: no task starts from 16:40 UTC; evaluations stop
# at 16:55 (the runner stops command tasks by process group); this job's backstop kills the runners at 16:57:00 UTC.
# --time 10:00 covers a start as early as 07:58 UTC.
set -u
SLOT=V
HOLD_UNTIL=""                          # slot V does not hold the allocation after the pass
CODE=/path/to/TURKIC_OCR_CODE
DATA=/path/to/TURKIC_OCR_DATA
S=$CODE/scripts/r5_vlma
CFG=$S/testpass_config.json
NFILE=$DATA/outputs/r5/vlma/testpass_nproc.txt
HARD=2026-11-24T16:57:00Z
export HF_HUB_OFFLINE=1 TOKENIZERS_PARALLELISM=false
unset HF_TOKEN HUGGING_FACE_HUB_TOKEN || true
echo "job $SLURM_JOB_ID slot $SLOT on $(hostname) start $(date -u +%FT%TZ); N file $NFILE now: $(head -c 200 $NFILE 2>/dev/null | head -1) (worker 1 re-reads it when the pass opens); backstop $HARD"
nvidia-smi --query-gpu=name,driver_version,memory.total --format=csv
END=$(date -u -d $HARD +%s)
LEFT=$(( END - $(date -u +%s) ))
if [ $LEFT -gt 60 ]; then
  for w in 0 1; do
    timeout -k 60 $LEFT $CODE/.venv_vlm/bin/python -I $S/testpass_runner.py --config $CFG --slot $SLOT --worker $w --nfile $NFILE &
    sleep 3
  done
  wait
else
  echo "past the backstop $HARD: no runner started"
fi
echo "[r5_testpass_$SLOT] runners ended $(date -u +%FT%TZ)"
if [ -n "$HOLD_UNTIL" ]; then
  REL=$DATA/outputs/r5/testpass/release_$SLOT
  HE=$(date -u -d $HOLD_UNTIL +%s)
  echo "holding this allocation for score.py --test-pass as a job step (J8) until $HOLD_UNTIL or until $REL exists; no GPU work runs"
  while [ $(date -u +%s) -lt $HE ] && [ ! -f $REL ]; do sleep 30; done
fi
echo "[r5_testpass_$SLOT] end $(date -u +%FT%TZ)"