File size: 1,430 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 | #!/bin/bash
#SBATCH --job-name=om_score
#SBATCH --partition=ZEN4
#SBATCH --qos=nu-zen4
#SBATCH --gres=none
#SBATCH --cpus-per-task=8
#SBATCH --mem=32G
#SBATCH --time=01:00:00
#SBATCH --output=/path/to/TURKIC_OCR_DATA/logs/%x_%j.out
# ONEMODEL pilot (records/R5/ONEMODEL/design.json): CPU re-scoring. Validation outputs only.
# sbatch om_score.sbatch baseline_cpu score the CPU baseline run alone (early estimate)
# sbatch om_score.sbatch baseline_gpu score the H100 baseline run alone
# sbatch om_score.sbatch seed1_final [seed1_ck_...] R5 scorer on the crop predictions, then page scores and gates of each name
# (run_gpu.sh does all of this itself; this file is only for a CPU re-score)
set -uo pipefail
C=/path/to/TURKIC_OCR_CODE
D=/path/to/TURKIC_OCR_DATA
S=$C/scripts/r5_onemodel
PK=$C/.venv_kraken/bin/python
O=$D/outputs/r6_onemodel
WHAT=${1:?usage: om_score.sbatch baseline_cpu | baseline_gpu | seed1_final [seed1_ck_...]}
case $WHAT in
baseline_cpu) $PK -I $S/om_score.py --baseline-only --baseline-dir $O/baseline/cpu; exit $? ;;
baseline_gpu) $PK -I $S/om_score.py --baseline-only --baseline-dir $O/baseline/gpu; exit $? ;;
esac
$PK -I $C/scripts/r5eval/score.py --preds $O/preds --registry $D/data/processed/r5/evalsets.json --out $O/scores --workers 8 \
--page-preds "" --settle 0
echo "r5 scorer rc $?"
for name in "$@"; do $PK -I $S/om_score.py --name $name; echo "om_score $name rc $?"; done
|