File size: 1,582 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 | #!/bin/bash
#SBATCH --job-name=tp2_azlatin
#SBATCH --partition=ZEN4
#SBATCH --cpus-per-task=32
#SBATCH --mem=64G
#SBATCH --time=00:40:00
#SBATCH --output=/path/to/TURKIC_OCR_DATA/logs/%x_%j.out
# Test pass 2, amendment 6 of 26 Nov (plan entry n 7): M1 with Latin-only decoding on all 442 az_localdoc_test lines (CPU), then the R5
# scorer and the script/edit-type measures; descriptive.
set -u
CODE=/path/to/TURKIC_OCR_CODE
D=/path/to/TURKIC_OCR_DATA
T=$D/outputs/r5/testpass2
S=$CODE/scripts/r5_testpass2
G=$T/GATE_testpass2_started.txt
R=$T/preds/m1latin_az_localdoc_test
export HF_HUB_OFFLINE=1 TRANSFORMERS_OFFLINE=1 OMP_NUM_THREADS=32 MKL_NUM_THREADS=32 TOKENIZERS_PARALLELISM=false
hostname; date -u
if [ ! -f $T/plan_amendment7_copied.txt ]; then echo "REFUSED: amendment not copied"; exit 3; fi
$CODE/.venv_vlm/bin/python -I $S/tp2_az_latin.py --model-dir $D/checkpoints/r5/paddleocr_vl_1_6/leader --preds-root $R --gate-file $G --threads 32
echo "=== predict exit $? $(date -u +%FT%TZ)"
export OMP_NUM_THREADS=1
$CODE/.venv_kraken/bin/python -I $CODE/scripts/r5eval/score.py --preds $R --registry $D/data/processed/r5/evalsets.json --out $T/scores/m1latin_az_localdoc_test \
--workers 2 --test-pass --gate-file $G --page-preds $T/no_page_preds --settle 0
echo "=== score exit $? $(date -u +%FT%TZ)"
$CODE/.venv_kraken/bin/python -I $S/tp2_qwen_az_script.py --pred $R/paddleocr_vl_1_6/leader_latin_only/az_localdoc_test.tsv --out $T/m1latin_az_script.json \
--model "M1 PaddleOCR-VL 1.6 leader, Latin-only decoding"
echo "=== script measures exit $? $(date -u +%FT%TZ)"
|