File size: 1,910 Bytes
adabee1 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 | #!/usr/bin/env bash
# Host helper for 2026-11-27 (AGENTS.md, "Frontend v4"), next to scripts/v4_host.sh:
# a. when the compact G2P (work/g2p-nst-v1-ar-small, 256 x 3, GPU 0) exits, score it on the
# same held-out NST words -> checks/g2p-nst-v1-ar-small-eval.json (report only, no package);
# b. when the control voice (container tiny-voca-dk-t3b) has exported
# models/v3trim-tex1k-s220000.pt, start scripts/t3b_sm9.sh on GPU 1 and score
# tex1k220k-vocCT3bsm9 when its vocoder lands.
# cd ~/stacks/tiny-voca-dk && setsid nohup bash scripts/day1127_host.sh > /srv/tiny-voca-dk/checks/day1127-host.log 2>&1 < /dev/null &
set -uo pipefail
D=/srv/tiny-voca-dk
cd ~/stacks/tiny-voca-dk
stamp() { echo "== $1 $(date -u +%FT%TZ)"; }
(
until grep -q "^exit=" "$D/checks/g2p-nst-v1-ar-small.log" 2>/dev/null; do sleep 60; done
stamp "g2p small $(grep '^exit=' $D/checks/g2p-nst-v1-ar-small.log)"
grep -q "^exit=0" "$D/checks/g2p-nst-v1-ar-small.log" && \
docker compose --profile tools run --rm -T -e CUDA_VISIBLE_DEVICES= g2p \
python scripts/g2p_package.py --run work/g2p-nst-v1-ar-small --report checks/g2p-nst-v1-ar-small-eval.json 2>&1 | grep '"wer"'
stamp "g2p small scored"
) &
(
until [[ -f "$D/models/v3trim-tex1k-s220000.pt" ]] && \
[[ "$(docker inspect -f '{{.State.Running}}' tiny-voca-dk-t3b 2>/dev/null)" != "true" ]]; do sleep 60; done
FREE=$(df --output=avail -B1G "$D" | tail -1)
[[ $FREE -ge 10 ]] || { echo "exit=1 t3b-sm9: only ${FREE} GB free"; exit 1; }
stamp "start t3b-sm9 (${FREE} GB free)"
docker compose run -d --name tiny-voca-dk-t3b-sm9 -e GPU=1 kit-v3 \
bash -c "bash scripts/t3b_sm9.sh > checks/t3b-sm9.log 2>&1" 2>&1 | grep -v orphan
bash "$D/work/eval_when.sh" tex1k220k-vocCT3bsm9 models/v3trim-tex1k-s220000.pt models/vocoder-r22-CT3b-sm9-s152000.pt
stamp "t3b-sm9 scored"
) &
wait
echo "exit=0 $(date -u +%FT%TZ)"
|