| #!/bin/bash |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| exec >> /root/queue_punct2.log 2>&1 |
| echo "########## file 2e ponctuation demarree $(date -u '+%d/%m %H:%M UTC') ##########" |
|
|
| M=/scratch/prep/manifests |
| V=/root/venv/bin/python |
|
|
| echo "attente de la ponctuation large..." |
| while pgrep -f "[t]rain_punct" > /dev/null; do sleep 30; done |
| sleep 15 |
| echo "GPU libre $(date -u '+%H:%M')" |
|
|
| |
| if [ -d /scratch/runs/punct_large2/best ]; then |
| echo "publication du modele large sur HF" |
| $V -c " |
| from huggingface_hub import HfApi |
| HfApi(token=open('/root/.cache/huggingface/token').read().strip()).upload_folder( |
| folder_path='/scratch/runs/punct_large2/best', path_in_repo='punct/large2_best', |
| repo_id='Pricile/waxal2026-backup', repo_type='model') |
| print('PONCT_LARGE_PUBLIEE')" || echo "!! publication large echouee" |
| else |
| echo "!! pas de dossier best pour le large" |
| fi |
|
|
| echo "########## 2e modele : mdeberta-v3-base (architecture differente) ##########" |
| $V /root/train_punct.py \ |
| --out /scratch/runs/punct_mdeb --base microsoft/mdeberta-v3-base \ |
| --train $M/waxal_lin_train.jsonl $M/waxal_lin_validation.jsonl $M/waxal_lin_test.jsonl \ |
| $M/waxal_sna_train.jsonl $M/waxal_sna_validation.jsonl $M/waxal_sna_test.jsonl \ |
| --lr 2e-5 --epochs 3 --bs 16 --noise_copies 2 --noise_rate 0.35 \ |
| || echo "!! entrainement mdeberta echoue" |
|
|
| if [ -d /scratch/runs/punct_mdeb/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_mdeb/best', path_in_repo='punct/mdeb_best', |
| repo_id='Pricile/waxal2026-backup', repo_type='model') |
| print('PONCT_MDEB_PUBLIEE')" || echo "!! publication mdeberta echouee" |
| fi |
|
|
| echo "FILE_PONCT2_TERMINEE $(date -u '+%H:%M')" |
|
|