Download scripts/r5_select_verdict.sbatch from treoa/turkic-ocr-code: direct link, hf CLI and curl.
- Browser
- Download file 3.24 kB
-
https://huggingface.co/treoa/turkic-ocr-code/resolve/main/scripts/r5_select_verdict.sbatch
- Command line
-
hf download hf://treoa/turkic-ocr-code/scripts/r5_select_verdict.sbatch
-
curl -L -o r5_select_verdict.sbatch https://huggingface.co/treoa/turkic-ocr-code/resolve/main/scripts/r5_select_verdict.sbatch
3.24 kB
| #SBATCH --job-name=r5_select_verdict | |
| #SBATCH --partition=ZEN4 | |
| #SBATCH --qos=nu-zen4 | |
| #SBATCH --gres=none | |
| #SBATCH --cpus-per-task=4 | |
| #SBATCH --mem=48G | |
| #SBATCH --time=01:00:00 | |
| #SBATCH --output=/path/to/TURKIC_OCR_DATA/logs/%x_%j.out | |
| # R5 EVALCODE, steps selected by the first argument: | |
| # sbatch r5_select_verdict.sbatch leaders the leader rule of amendment 3.4 E2 on the P_short validation scores -> DATA/outputs/r5/leaders_selection.json (+ .sha256); | |
| # it never writes leaders.json (it is written separately) | |
| # sbatch r5_select_verdict.sbatch select [--allow-short-b1] B1 and B2 (amendment 3.4 E4: from the final checkpoints at leader length) from VALIDATION scores | |
| # -> DATA/outputs/r5/selection.json (+ .sha256). Freeze before the test pass. --allow-short-b1 is a provisional dry run. | |
| # sbatch r5_select_verdict.sbatch verdict [--synthetic ...] decision rule v3 + amendments 3.2, 3.3, 3.4 on the test-pass scores -> DATA/outputs/r5/verdict.json | |
| # verdict reads locked score files only when DATA/outputs/r5/RULE/test_pass_started.txt exists. It needs DATA/outputs/r5/endpoints.json (confirmed copy of | |
| # CODE/config_r5eval/endpoints_proposal.json) and, for the comparison with the published methods, CODE/config_r5eval/sota_checklist.json and optionally DATA/outputs/r5/sota_attestations.json. | |
| # The VLM allow-list is the arms of the models tables of VLMA (models_r5.tsv) and VLMB and VLMC (models_r5_vlmb.tsv), plus VLM_EXTRA (comma list) and the arms_info.json | |
| # entries with role vlm. Unique parameters come from arms_info.json, else from the tables. Run r5_score.sbatch before leaders or select: an arm without a V1 score is not ranked. | |
| # R5_STAGE (optional): a staged copy of the code (folders src/ and scripts/) to try before a deploy. | |
| C=/path/to/TURKIC_OCR_CODE | |
| D=/path/to/TURKIC_OCR_DATA | |
| S=${R5_STAGE:-$C} | |
| PY=$C/.venv_kraken/bin/python | |
| step=$1 | |
| shift | |
| TSV=$C/scripts/r5_vlma/models_r5.tsv,$C/scripts/r5_vlmb/models_r5_vlmb.tsv | |
| AI="" | |
| if [ -f $D/outputs/r5/arms_info.json ]; then AI="--arms-info $D/outputs/r5/arms_info.json"; fi | |
| if [ "$step" = "leaders" ]; then | |
| O=$D/outputs/r5/leaders_selection.json | |
| if [ -n "$R5_STAGE" ]; then O=$D/tmp/evalcode_leaders_stage.json; fi | |
| $PY -I $S/scripts/r5eval/select_leaders.py --scores $D/outputs/r5/scores --preds $D/outputs/r5/preds --out $O --models-tsv $TSV --vlm-arms "${VLM_EXTRA:-}" $AI "$@" | |
| elif [ "$step" = "select" ]; then | |
| $PY -I $S/scripts/r5eval/select_b1b2.py --scores $D/outputs/r5/scores --preds $D/outputs/r5/preds --out $D/outputs/r5/selection.json --models-tsv $TSV \ | |
| --vlm-arms "${VLM_EXTRA:-}" $AI "$@" | |
| elif [ "$step" = "verdict" ]; then | |
| AT="" | |
| if [ -f $D/outputs/r5/sota_attestations.json ]; then AT="--sota-attestations $D/outputs/r5/sota_attestations.json"; fi | |
| $PY -I $S/scripts/r5eval/verdict.py --scores $D/outputs/r5/scores --selection $D/outputs/r5/selection.json --endpoints $D/outputs/r5/endpoints.json \ | |
| --out $D/outputs/r5/verdict.json --sota-checklist $C/config_r5eval/sota_checklist.json $AT "$@" | |
| else | |
| echo "first argument must be leaders, select or verdict" | |
| exit 2 | |
| fi | |