| #!/bin/bash |
| |
| |
| |
| |
| exec >> /root/queue_real.log 2>&1 |
| echo "########## file ponctuation REELLE demarree $(date -u '+%d/%m %H:%M UTC') ##########" |
|
|
| V=/root/venv/bin/python |
|
|
| echo "attente de la transcription shona..." |
| while pgrep -f "[r]eal_asr_punct" > /dev/null; do sleep 30; done |
| sleep 10 |
| echo "transcriptions terminees $(date -u '+%H:%M')" |
| wc -l /scratch/real_lin.jsonl /scratch/real_sna.jsonl 2>/dev/null |
|
|
| |
| |
| $V /root/train_punct.py \ |
| --out /scratch/runs/punct_real --base Davlan/afro-xlmr-base \ |
| --real /scratch/real_lin.jsonl /scratch/real_sna.jsonl \ |
| --lr 3e-5 --epochs 4 --bs 16 \ |
| || echo "!! entrainement reel echoue" |
|
|
| if [ -d /scratch/runs/punct_real/best ]; then |
| $V -c " |
| from huggingface_hub import HfApi |
| HfApi(token=open('/root/.cache/huggingface/token').read().strip()).upload_folder( |
| folder_path='/scratch/runs/punct_real/best', path_in_repo='punct/real_best', |
| repo_id='Pricile/waxal2026-backup', repo_type='model') |
| print('PONCT_REELLE_PUBLIEE')" || echo "!! publication echouee (depot HF plein ?)" |
| |
| echo "copie directe vers A" |
| scp -r -o StrictHostKeyChecking=no -o BatchMode=yes /scratch/runs/punct_real/best \ |
| root@151.115.78.57:/scratch/punct_real_best 2>/dev/null \ |
| && echo COPIE_A_OK || echo "(pas de cle B->A, utiliser HF ou tirer depuis A)" |
| fi |
| echo "FILE_REELLE_TERMINEE $(date -u '+%H:%M')" |
|
|