#!/bin/bash #SBATCH --job-name=rel2_d5_check #SBATCH --partition=ZEN4 #SBATCH --qos=nu-zen4 #SBATCH --gres=none #SBATCH --cpus-per-task=16 #SBATCH --mem=64G #SBATCH --time=01:00:00 #SBATCH --output=/path/to/TURKIC_OCR_DATA/logs/%x_%j.out # RELEASE2 D5 finish, step 2: facts about the retrained detector (yolo_s2_d5) and the page-pipeline end-to-end check with its weights, # before they go into the package (rel2_d5_check.py docstring). One ZEN4 CPU job; the release folders are only read; validation data only. # Work folder DATA/tmp/release2/d5_finish (the rc1 baseline in DATA/tmp/rc1_check is only read). Nothing is uploaded. set -u CODE=/path/to/TURKIC_OCR_CODE D=/path/to/TURKIC_OCR_DATA R=$D/release/rc1 W=$D/tmp/release2/d5_finish unset HF_TOKEN HUGGING_FACE_HUB_TOKEN echo "job $SLURM_JOB_ID host $(hostname) start $(date -u +%FT%TZ)" mkdir -p $W/run $W/hf_home $W/yolo_cfg rm -f $W/d5_check_results.json touch $W/start_marker export PYTHONDONTWRITEBYTECODE=1 HF_HOME=$W/hf_home HF_HUB_OFFLINE=1 TRANSFORMERS_OFFLINE=1 YOLO_OFFLINE=1 YOLO_CONFIG_DIR=$W/yolo_cfg OMP_NUM_THREADS=16 MKL_NUM_THREADS=16 cd $W/run $CODE/.venv_kraken/bin/python -B -I $CODE/scripts/release2/rel2_d5_check.py echo "check exit $?" echo "package sums after the check (the packages must be unchanged):" cd $R/turkic-line-detector-yolo11s && sha256sum -c --quiet SHA256SUMS && echo "sums_ok turkic-line-detector-yolo11s" cd $R/page-pipeline && sha256sum -c --quiet SHA256SUMS && echo "sums_ok page-pipeline" cd $R/turkic-ocr-paddleocr-vl-1.6 && sha256sum -c --quiet SHA256SUMS && echo "sums_ok turkic-ocr-paddleocr-vl-1.6" echo "files in rc1 changed during this job (must be none):" find $R -newer $W/start_marker | head -n 20 echo "__pycache__ in rc1 (must be none):" find $R -name __pycache__ | head -n 5 echo "end $(date -u +%FT%TZ)"