Download scripts/r5_testpass2/tp2_a1lf_kohtd.sbatch from treoa/turkic-ocr-code: direct link, hf CLI and curl.
- Browser
- Download file 2.13 kB
-
https://huggingface.co/treoa/turkic-ocr-code/resolve/main/scripts/r5_testpass2/tp2_a1lf_kohtd.sbatch
- Command line
-
hf download hf://treoa/turkic-ocr-code/scripts/r5_testpass2/tp2_a1lf_kohtd.sbatch
-
curl -L -o tp2_a1lf_kohtd.sbatch https://huggingface.co/treoa/turkic-ocr-code/resolve/main/scripts/r5_testpass2/tp2_a1lf_kohtd.sbatch
2.13 kB
| #!/bin/bash | |
| #SBATCH --job-name=tp2_a1lf_kohtd | |
| #SBATCH --partition=ZEN4 | |
| #SBATCH --cpus-per-task=16 | |
| #SBATCH --mem=64G | |
| #SBATCH --time=06:00:00 | |
| #SBATCH --output=/path/to/TURKIC_OCR_DATA/logs/%x_%j.out | |
| # Test pass 2, amendment 4 (owner-authorized): M2 (A1) label-free re-score on the KOHTD sealed test. V1 gate first (as job 55280), then | |
| # kohtd_test (18,615 crops) once, then the R5 scorer and the paired comparison with M1's existing 24 Nov kohtd_test predictions. | |
| set -u | |
| CODE=/path/to/TURKIC_OCR_CODE | |
| D=/path/to/TURKIC_OCR_DATA | |
| T=$D/outputs/r5/testpass2 | |
| M=$D/data/processed/r5/manifests | |
| G=$T/GATE_testpass2_started.txt | |
| S=$CODE/scripts/r5_testpass2 | |
| export OMP_NUM_THREADS=16 MKL_NUM_THREADS=16 | |
| hostname; date -u | |
| if [ ! -f $T/plan_amendment4_copied.txt ]; then echo "REFUSED: amendment 4 not copied"; exit 3; fi | |
| $CODE/.venv_kraken/bin/python -I $S/tp2_a1_labelfree.py --manifest $M/kohtd_screen_v1.tsv --set V1 --out-root $T/smoke/a1lf_V1_kohtdjob --smoke | |
| rc=$?; echo "=== smoke exit $rc $(date -u)" | |
| if [ $rc -ne 0 ]; then echo "STOP: smoke did not reproduce the release figures"; exit 6; fi | |
| $CODE/.venv_kraken/bin/python -I $S/tp2_a1_labelfree.py --manifest $M/kohtd_test.tsv --set kohtd_test --out-root $T/preds/m2lf_kohtd_test --gate-file $G | |
| echo "=== kohtd_test exit $? $(date -u)" | |
| mkdir -p $T/no_page_preds $T/kohtd | |
| export OMP_NUM_THREADS=1 | |
| $CODE/.venv_kraken/bin/python -I $CODE/scripts/r5eval/score.py --preds $T/preds/m2lf_kohtd_test --registry $D/data/processed/r5/evalsets.json \ | |
| --out $T/scores/m2lf_kohtd_test --workers 2 --test-pass --gate-file $G --page-preds $T/no_page_preds | |
| echo "=== score exit $? $(date -u)" | |
| $CODE/.venv_kraken/bin/python -I $S/tp2_kohtd_compare.py --m2lf-greedy $T/scores/m2lf_kohtd_test/A1/long2x_labelfree/kohtd_test.json \ | |
| --m2lf-lm $T/scores/m2lf_kohtd_test/A1/long2x_labelfree_lm_gated/kohtd_test.json --m1 $D/outputs/r5/scores/paddleocr_vl_1_6/leader/kohtd_test.json \ | |
| --m2ll-greedy $D/outputs/r5/scores/A1/long2x/kohtd_test.json --m2ll-lm $D/outputs/r5/scores/A1/long2x_lm_gated/kohtd_test.json \ | |
| --gate-file $G --out $T/kohtd/kohtd_compare.json | |
| echo "=== compare exit $? $(date -u)" | |