Download scripts/r5_linedet/smoke_cpu.sbatch from treoa/turkic-ocr-code: direct link, hf CLI and curl.
- Browser
- Download file 1.44 kB
-
https://huggingface.co/treoa/turkic-ocr-code/resolve/main/scripts/r5_linedet/smoke_cpu.sbatch
- Command line
-
hf download hf://treoa/turkic-ocr-code/scripts/r5_linedet/smoke_cpu.sbatch
-
curl -L -o smoke_cpu.sbatch https://huggingface.co/treoa/turkic-ocr-code/resolve/main/scripts/r5_linedet/smoke_cpu.sbatch
1.44 kB
| #SBATCH --job-name=r5_ld_smoke | |
| #SBATCH --partition=ZEN4 | |
| #SBATCH --qos=nu-zen4 | |
| #SBATCH --gres=none | |
| #SBATCH --cpus-per-task=16 | |
| #SBATCH --mem=48G | |
| #SBATCH --time=01:30:00 | |
| #SBATCH --output=/path/to/TURKIC_OCR_DATA/logs/%x_%j.out | |
| # Smoke test on CPU: every arm trains a few steps on KOHTD train crops (kohtd_split_v1), saves, resumes-free predict on 64 validation crops. | |
| CODE=/path/to/TURKIC_OCR_CODE | |
| DATA=/path/to/TURKIC_OCR_DATA | |
| unset HF_TOKEN HUGGING_FACE_HUB_TOKEN | |
| PY=$CODE/.venv_kraken/bin/python | |
| SITE=$CODE/.venv_kraken/lib/python3.12/site-packages | |
| echo $CODE/src > $SITE/linedet.pth | |
| export OMP_NUM_THREADS=14 MKL_NUM_THREADS=14 | |
| SM=$DATA/data/processed/r5_linedet_smoke | |
| SO=$DATA/outputs/r5/linedet/smoke | |
| mkdir -p $SO | |
| $PY -I -m linedet.make_smoke | |
| $PY -I -m linedet.make_codec --mix $SM/smoke_mix.yaml --out $SO/codec_union.json | |
| for ARM in A3 A2 A1 A1s A4; do | |
| echo "=== $ARM $(date)" | |
| PS=384; PL=768; if [ $ARM = A4 ]; then PS=128; PL=256; fi | |
| $PY -I -m linedet.train_arm --arm $ARM --mix $SM/smoke_mix.yaml --codec $SO/codec_union.json --p_short $PS --p_long $PL \ | |
| --workers 4 --device cpu --ckpt_dir $SO/ckpt --log_dir $SO/logs --log_every 1 --seed 1 | |
| for CK in short long; do | |
| $PY -I -m linedet.predict --arm $ARM --ckpt $CK --ckpt_dir $SO/ckpt --evalsets $SM/evalsets_smoke.json --limit 64 --bs 16 --workers 4 \ | |
| --device cpu --pred_dir $SO/preds --logit_dir $SO/topk | |
| done | |
| done | |
| echo "=== done $(date)" | |