Download scripts/r5_selftest.sbatch from treoa/turkic-ocr-code: direct link, hf CLI and curl.
- Browser
- Download file 1.26 kB
-
https://huggingface.co/treoa/turkic-ocr-code/resolve/main/scripts/r5_selftest.sbatch
- Command line
-
hf download hf://treoa/turkic-ocr-code/scripts/r5_selftest.sbatch
-
curl -L -o r5_selftest.sbatch https://huggingface.co/treoa/turkic-ocr-code/resolve/main/scripts/r5_selftest.sbatch
1.26 kB
| #SBATCH --job-name=r5_selftest | |
| #SBATCH --partition=ZEN4 | |
| #SBATCH --qos=nu-zen4 | |
| #SBATCH --gres=none | |
| #SBATCH --cpus-per-task=4 | |
| #SBATCH --mem=16G | |
| #SBATCH --time=00:30:00 | |
| #SBATCH --output=/path/to/TURKIC_OCR_DATA/logs/%x_%j.out | |
| # R5 EVALCODE: runs every unit test of r5eval on a compute node (synthetic data only; scratch under DATA/tmp/evalcode_selftest). | |
| C=/path/to/TURKIC_OCR_CODE | |
| D=/path/to/TURKIC_OCR_DATA | |
| PY=$C/.venv_kraken/bin/python | |
| # R5_STAGE (optional): a staged copy (folders src/, scripts/, tests/) to test before a deploy: sbatch --export=ALL,R5_STAGE=$C/_stage_check r5_selftest.sbatch | |
| if [ -n "$R5_STAGE" ]; then S=$R5_STAGE; T=$S/tests; W=$D/tmp/evalcode_selftest_stage; else S=$C; T=$C/tests_r5eval; W=$D/tmp/evalcode_selftest; fi | |
| echo "code under test: $S" | |
| mkdir -p $W | |
| rc=0 | |
| cd $T | |
| $PY -I test_scorelib_j2_unchanged.py $S/src/r5eval/frozen/scorelib_j2.py || rc=1 | |
| for t in test_core test_pages test_ktrain test_curve; do $PY -I $t.py || rc=1; done | |
| $PY -I test_cli.py $W/cli || rc=1 | |
| $PY -I test_verdict.py $W/verdict || rc=1 | |
| if [ -f $T/test_report_cards.py ]; then $PY -I test_report_cards.py $W/cards || rc=1; fi | |
| if [ -f $T/test_leaders.py ]; then $PY -I test_leaders.py $W/leaders || rc=1; fi | |
| echo "selftest exit code $rc" | |
| exit $rc | |