aien-train
AIEN training programme: language-model history, GB10 constraints and the route to training on the project engine. Plans and runnable checks are distinguished.
Brought by drakestapleton
aien-train / streams / math-training / run_retry.sh
| 1 | #!/bin/sh |
| 2 | # Rerun a GPU script when CUDA context creation fails on fragmented memory (cuDevicePrimaryCtxRetain OOM). |
| 3 | # Usage: run_retry.sh LOG cmd... Retries up to 30 times, 60 s apart, only for that specific startup failure. |
| 4 | log=$1; shift |
| 5 | i=0 |
| 6 | while [ $i -lt 30 ]; do |
| 7 | "$@" > "$log" 2>&1 && exit 0 |
| 8 | grep -q "cuDevicePrimaryCtxRetain" "$log" || exit 1 |
| 9 | i=$((i+1)); echo "ctx-retry $i $(date -u +%H:%M:%SZ)" >> "$log.retries"; sleep 60 |
| 10 | done |
| 11 | exit 1 |