turkic-ocr-code / scripts /r5_vlma /check_mix.sbatch
treoa's picture
Release 1
24aaa76
Raw History Blame Contribute Delete
1.04 kB
#!/bin/bash
#SBATCH --job-name=r5_check_mix
#SBATCH --partition=ZEN4
#SBATCH --qos=nu-zen4
#SBATCH --gres=none
#SBATCH --cpus-per-task=4
#SBATCH --mem=32G
#SBATCH --time=00:30:00
#SBATCH --output=/path/to/TURKIC_OCR_DATA/logs/%x_%j.out
# R5: dry check of a mix yaml with the REAL sequence builder (build_sequence.py), 200,000 rows into a scratch folder.
# Run it on the yaml BEFORE freezing it: the slot V job builds the real sequence from the frozen file automatically.
# usage: sbatch check_mix.sbatch /path/to/mix_v1.yaml
# Prints "OK ..." with per-stratum shares and passes, or "FAIL ..." with every problem (sha256, split, shares, paths).
set -u
CODE=/path/to/TURKIC_OCR_CODE
DATA=/path/to/TURKIC_OCR_DATA
Y=$1
O=$DATA/outputs/r5/vlma/check_mix
rm -rf $O; mkdir -p $O
$CODE/.venv_vlm/bin/python -I $CODE/scripts/r5_vlma/build_sequence.py $Y $O/trial_seq.tsv --rows 200000
echo "exit $?"
[ -f $O/trial_seq.tsv.summary.json ] && head -c 4000 $O/trial_seq.tsv.summary.json
rm -f $O/trial_seq.tsv $O/trial_seq.tsv.tmp
echo "[check_mix] done"