File size: 2,517 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 | #!/bin/bash
#SBATCH --job-name=tp2_a1lf
#SBATCH --partition=ZEN4
#SBATCH --cpus-per-task=16
#SBATCH --mem=64G
#SBATCH --time=12:00:00
#SBATCH --output=/path/to/TURKIC_OCR_DATA/logs/%x_%j.out
# Test pass 2, amendment 3: M2 (A1) with label-free batching (release infer.py, --sort width --batch-pad 256), greedy and gated LM.
# Smoke first on the validation set V1 (must reproduce the release report's 6.48% / 4.82% within 0.1 point), then each of the 8 locked
# crop sets once. Each set its own prediction root preds/m2lf_<set>.
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
F=$D/data/processed/r5/frozen_eval_v1
PY="$CODE/.venv_kraken/bin/python -I $CODE/scripts/r5_testpass2/tp2_a1_labelfree.py"
export OMP_NUM_THREADS=16 MKL_NUM_THREADS=16
hostname; date -u
if [ ! -f $T/plan_amendment3_copied.txt ]; then echo "REFUSED: amendment 3 not copied"; exit 3; fi
$PY --manifest $M/kohtd_screen_v1.tsv --set V1 --out-root $T/smoke/a1lf_V1 --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
$PY --manifest $M/az_localdoc_test.tsv --set az_localdoc_test --out-root $T/preds/m2lf_az_localdoc_test --gate-file $T/GATE_testpass2_started.txt; echo "=== az exit $? $(date -u)"
$PY --manifest $M/chd_test.tsv --set chd_test --out-root $T/preds/m2lf_chd_test --gate-file $T/GATE_testpass2_started.txt; echo "=== chd exit $? $(date -u)"
$PY --manifest $M/hkr_test1.tsv --set hkr_test1 --out-root $T/preds/m2lf_hkr_test1 --gate-file $T/GATE_testpass2_started.txt; echo "=== hkr1 exit $? $(date -u)"
$PY --manifest $M/hkr_test2.tsv --set hkr_test2 --out-root $T/preds/m2lf_hkr_test2 --gate-file $T/GATE_testpass2_started.txt; echo "=== hkr2 exit $? $(date -u)"
$PY --manifest $F/synth_typed_test.tsv --set synth_typed_test --out-root $T/preds/m2lf_synth_typed_test --gate-file $T/GATE_testpass2_started.txt; echo "=== typed exit $? $(date -u)"
$PY --manifest $F/synth_hand_test.tsv --set synth_hand_test --out-root $T/preds/m2lf_synth_hand_test --gate-file $T/GATE_testpass2_started.txt; echo "=== hand exit $? $(date -u)"
$PY --manifest $M/rukopys_test.tsv --set rukopys_test --out-root $T/preds/m2lf_rukopys_test --gate-file $T/GATE_testpass2_started.txt; echo "=== rukopys exit $? $(date -u)"
$PY --manifest $M/school_test.tsv --set school_test --out-root $T/preds/m2lf_school_test --gate-file $T/GATE_testpass2_started.txt; echo "=== school exit $? $(date -u)"
|