When you rent cheap spot GPUs, a host dying mid-run is the obvious failure, and everyone
eventually writes an external supervisor for it: watch the instance, rent a replacement,
restore the checkpoint. I built one of those too. Then I asked the less comfortable
question: if the tool rents machines on your own cloud account, what happens when the
supervisor itself dies — while the GPU instance keeps running and billing you with no
spending limits and no one watching?
Disclosure up front: I hit both of these problems while building a small spot-GPU watchdog
service (NomadGPU). Here are the two mechanisms we ended up with — and where their limits are.
1. Who replaces the supervisor: a dead-man's switch inside the container
The agent inside the GPU container doesn't just send heartbeats out. It also watches the
opposite direction: how long ago it received a fresh temporary storage key from the
supervisor. Task credentials are short-lived and get re-issued while the supervisor is
alive. If the supervisor disappears and no new key arrives within a safety window, the
agent concludes it's on its own — and stops the training job and the machine from the
inside, rather than letting an orphaned instance bill by the hour forever.
I tested this live on Vast with the window shortened to a few minutes: I stopped the
supervisor, and 7.5 minutes after renting, the agent stopped the job and the machine. From
then on Vast billed only for disk — $0.036 an hour instead of $0.44. When the supervisor
came back, it saw the stop and moved the job to a new machine.
Two honest caveats. In production the window is 2.5–3.5 hours, and I have not run a test
of that length. And in that shortened test the job died before its first checkpoint, so it
restarted from zero — the switch protects your wallet first of all; your checkpoints are
what protect your progress.
2. Silent GPU hangs without false positives
A reader of my previous write-up asked the right question: how do you tell a genuinely
stalled job from a phase where the GPU legitimately idles — a long evaluation, a heavy
checkpoint write, dataset tokenization? A naive "GPU < 5% for N minutes → kill" rule
would misfire on exactly those phases, and every false positive costs you a 4.5–8.5 minute
billed cold start on a fresh host.
So we ended up with two separate detection loops:
- GPU lost (5 minutes).
nvidia-smianswered before and then stops answering at all — the card fell off the bus or the driver died. This is a real thing on bargain hosts, the process often stays "alive," and the rental keeps running. Five minutes of silence → move to another machine. - Quiet stall (30 minutes by default, per-job configurable). Only fires when all of these hold for the whole window: every GPU at ≤ 2% utilization, no new log output, no progress-file updates, and no checkpoint-directory changes. A healthy evaluation or checkpoint write keeps touching at least one of those signals, so the timer keeps resetting. We deliberately watch mtimes instead of parsing step counts or loss values — the supervisor shouldn't need to understand each framework's log format.
And a circuit breaker: if the same stall reappears on a different host, we stop the job
instead of migrating again. Same symptom on fresh hardware means the bug is in your code or
data (an OOM, a deadlocked DataLoader), and renting a third machine would just burn money
on repeated cold starts. One relocation, then a human gets an alert.
3. Why the checkpoint agent lives outside the training loop
Uploading to S3/R2 straight from the Python training loop corrupts checkpoints exactly when
it matters: a segfault or a network drop mid-upload leaves a half-written object you can't
resume from. So a small background process in the container watches the checkpoint
directory and uploads a folder only after the training script drops a .done marker into
it. It uses a temporary key scoped to that single job's folder — the credentials sit on a
rented host, after all.
That watcher, plus the host filter that prices in traffic (the trap that turned a $0.19 run
into a $0.81 one), is published as a standalone MIT tool: vast-spot-toolkit
(github.com/gismo212/vast-spot-toolkit). Use it without anything else in this article.
4. Limits, live numbers, and a question
What this architecture does not solve: the host can see your data while the job runs
(non-confidential work only); every restart costs a billed 4.5–8.5 minute cold start; one
GPU per job, for now.
Live numbers from our own test jobs (22 November snapshot): over the last 30 days, 9 of 9
interrupted runs resumed automatically — median ~1 minute back on a machine, p90 ≈ 8
minutes. Open telemetry: status.nomadgpu.com/s/status.
I'd rather learn from your setups than pitch: how do you distinguish a legitimate
eval/checkpoint pause from a deadlocked DataLoader in your own training? And if you run a
spot orchestrator on top of Vast/RunPod — what's your failsafe for when the control plane
itself goes down?
Disclosure: I packaged this into NomadGPU — it runs on your own Vast.ai account with a
restricted 5-permission API key, zero markup on compute, 14 days free. Before trusting a
long run, nomadgpu dry-run (~$0.10–$0.50 in Vast compute) spins up a machine, writes a
checkpoint, kills the instance on purpose, and verifies resumed=true. If you want to test
it on your Axolotl/Unsloth/PyTorch command, email ops@nomadgpu.com and I'll wrap the spec
the same business day.