#!/bin/bash # R5 LINEDET: test-set predictions of the line arms, to be run on a compute node ONLY in the scoring pass. NO CAP of any kind (clarification H10): # every crop of every locked set, greedy and then the character-LM beam search (alpha and beta taken from each checkpoint's validation tuning) and its gated copy. # # Order of use: # 1. copy records/R5/RULE/test_pass_started.txt to the cluster as /path/to/TURKIC_OCR_DATA/outputs/r5/linedet/test_pass_started.txt # (predict.py and lm_decode.py REFUSE the test pass while that file does not exist, and refuse --limit and --max_lines). # 2. run this script in a job, for example (GPU for the predictions; the LM decoding uses CPU workers): # sbatch --partition=H100 --qos=nu-h100 --gres=gpu:h100:1 --cpus-per-task=32 --mem=96G --time=03:00:00 --job-name=r5_ld_testpass \ # --output=/path/to/TURKIC_OCR_DATA/logs/%x_%j.out --wrap "bash /path/to/TURKIC_OCR_CODE/scripts/r5_linedet/test_pass_commands.sh" # (LINEDET_DEVICE=cpu runs it on CPU.) # Writes DATA/outputs/r5/preds/