turkic-ocr-code / scripts /j2 /smoke_cpu.sbatch
treoa's picture
Release 1
24aaa76
Raw History Blame Contribute Delete
1.04 kB
#!/bin/bash
#SBATCH --job-name=j2_smoke
#SBATCH --partition=ZEN4
#SBATCH --qos=nu-zen4
#SBATCH --gres=none
#SBATCH --cpus-per-task=16
#SBATCH --mem=64G
#SBATCH --time=03:00:00
#SBATCH --output=/path/to/TURKIC_OCR_DATA/logs/%x_%j.out
# J2 step 6: smoke test, 5 crops per model on ZEN4 CPU, offline. Output goes to a separate folder (not the production one).
# usage: sbatch smoke_cpu.sbatch short [short ...]
set -u
CODE=/path/to/TURKIC_OCR_CODE
DATA=/path/to/TURKIC_OCR_DATA
export HF_HUB_OFFLINE=1
unset HF_TOKEN HUGGING_FACE_HUB_TOKEN || true
OUT=$DATA/outputs/j11_smoke2
mkdir -p $OUT
for M in "$@"; do
echo "=== $M"
$CODE/.venv_vlm/bin/python -I $CODE/scripts/j2/run_screen.py $M $DATA/hf_cache/j2_models $CODE/scripts/j2/prompts.json \
$DATA/outputs/j11_stage1_kohtd/screen_set_v1.tsv $DATA/data/processed/kohtd_words_raw/KOHTD_dataset/HK_dataset/img $OUT \
--device cpu --threads 16 --batch-size 5 --scales 1 --limit 5 --check-batch-equal 2>&1 | grep -v -E "Loading weights|^\s*$" | tail -25
done
echo "[j2_smoke] done"