turkic-ocr-code / scripts /r5_vlmb /curve_test_cpu.sbatch
treoa's picture
Release 1
24aaa76
Raw History Blame Contribute Delete
1.48 kB
#!/bin/bash
#SBATCH --job-name=r5_vlmb_curvetest
#SBATCH --partition=ZEN4
#SBATCH --qos=nu-zen4
#SBATCH --gres=none
#SBATCH --cpus-per-task=8
#SBATCH --mem=32G
#SBATCH --time=00:40:00
#SBATCH --output=/path/to/TURKIC_OCR_DATA/logs/%x_%j.out
# VLMB: plumbing test of the learning-curve evaluations in vlmb_train_vlm.py (phase short, 2 steps of 4 KOHTD train
# rows, curve set = the KOHTD-train smoke list, output to a TEST preds root, not the real one). Falcon's decode is
# GPU-only, so on CPU every curve batch fails and is logged; the files, timing and resume fields are what is tested.
set -u
CODE=/path/to/TURKIC_OCR_CODE
DATA=/path/to/TURKIC_OCR_DATA
S=$CODE/scripts/r5_vlmb
unset HF_TOKEN HUGGING_FACE_HUB_TOKEN || true
export HF_HOME=$DATA/hf_cache/r5_vlmb_home HF_HUB_OFFLINE=1 TRANSFORMERS_OFFLINE=1 PYTHONDONTWRITEBYTECODE=1
export HF_MODULES_CACHE=$DATA/tmp/r5_vlmb_hf_modules/falcon_ocr
SEQ=$DATA/outputs/r5/vlma/smoke_seq_kohtd_train.tsv
O=$DATA/outputs/r5/vlmb/curve_test
rm -rf $O; mkdir -p $O
$CODE/.venv_vlm_falcon_ocr/bin/python -I $S/vlmb_train_vlm.py --short falcon_ocr --arm curvetest_falcon --registry $S/models_r5_vlmb.tsv --models-dir $DATA/hf_cache/r5_vlmb_models --seq $SEQ --ckpt-root $O/ck --out-root $O/runs --phase short --n-samples 8 --eff-batch 4 --micro-batch 2 --device cpu --threads 8 --workers 1 --curve-manifest $SEQ --preds-root $O/preds --no-export
echo "rc=$?"
ls -R $O/preds | head -20
cat $O/preds/curvetest_falcon/curve_8/meta.json