Download scripts/r5_linedet/r2_cmdtest.sh from treoa/turkic-ocr-code: direct link, hf CLI and curl.
- Browser
- Download file 1.42 kB
-
https://huggingface.co/treoa/turkic-ocr-code/resolve/main/scripts/r5_linedet/r2_cmdtest.sh
- Command line
-
hf download hf://treoa/turkic-ocr-code/scripts/r5_linedet/r2_cmdtest.sh
-
curl -L -o r2_cmdtest.sh https://huggingface.co/treoa/turkic-ocr-code/resolve/main/scripts/r5_linedet/r2_cmdtest.sh
1.42 kB
| # Validation-only test of the edited R2 prediction command (22 Nov): the new ref_ppocr_predict.py.new with --weights <train_dir>/model/latest, 200 crops of a validation set, | |
| # predictions written to a scratch folder (--pred_root), never to preds/. No locked set is named. | |
| C=/path/to/TURKIC_OCR_CODE | |
| D=/path/to/TURKIC_OCR_DATA | |
| S=$C/scripts/r5_ref | |
| M=$D/data/processed/r5/manifests | |
| unset HF_TOKEN HUGGING_FACE_HUB_TOKEN | |
| export FLAGS_allocator_strategy=auto_growth OMP_NUM_THREADS=2 | |
| rm -rf $D/tmp/r2_cmdtest | |
| $C/.venv_ref_paddle/bin/python -I $S/ref_ppocr_predict.py.new --run i --sets "kohtd_val=$M/kohtd_val.tsv" --weights $D/checkpoints/r5/ref/R2_i/model/latest --pred_root $D/tmp/r2_cmdtest --limit 200 --threads 2 2>&1 | grep -a -v "Warning\|WARNING\|ccache\|OMP\|PLEASE\|^W1" | tail -3 | |
| $C/.venv_ref_paddle/bin/python -I $S/ref_ppocr_predict.py.new --run ii --sets "kohtd_rand_val=$M/kohtd_rand_val.tsv" --weights $D/checkpoints/r5/ref/R2_ii/model/latest --pred_root $D/tmp/r2_cmdtest --limit 200 --threads 2 2>&1 | grep -a -v "Warning\|WARNING\|ccache\|OMP\|PLEASE\|^W1" | tail -3 | |
| for r in ours rand; do echo "== $r"; grep -a '"samples_seen"\|"epochs_done"\|"counts_from"\|"train_summary_samples_seen"\|"weights"\|"checkpoint"\|"rows"' $D/tmp/r2_cmdtest/R2/$r/meta.json | cut -c1-260; done | |
| ls $D/tmp/r2_cmdtest/R2/* | |
| cat $D/checkpoints/r5/ref/R2_i/progress.json $D/checkpoints/r5/ref/R2_ii/progress.json; echo | |