The most expensive failure in machine learning infrastructure is not a crash. A crash throws an exception, halts the container, and stops the billing meter.
The most expensive failure is a job that succeeds at doing the wrong thing.
Before building ComputeFence I ran eight structured research sessions with ML engineers running fine-tuning workloads on rented GPU compute RunPod, Vast.ai, Lambda Labs. I asked what had gone wrong, what it cost, and whether they saw an error message.
The pattern was consistent enough that I stopped being surprised after the third session.
1. Checkpoints lost to ephemeral storage
The majority of engineers I spoke to had lost model weights because their checkpoint output directory was writing to container storage instead of a persistent volume.
On providers like RunPod and Vast.ai, storage is partitioned:
Ephemeral container root (/root, /tmp) is wiped the moment a pod terminates
Persistent network storage lives on dedicated paths like /workspace
Default training scripts routinely dump checkpoints to ./output or ~/.cache. The job runs for eight hours, logs a clean exit, terminates the pod. The weights are gone.
The fix is one line set --output_dir /workspace/checkpoints but training harnesses assume the filesystem is permanent, and nothing tells you otherwise.
2. Silent garbage and false convergence
Most had also run a job that finished without errors but produced a model that scored at random chance or far below expectations.
The causes varied:
Duplicate rows poisoning low-rank adapter updates.
Conflicting labels introducing contradictory supervision.
Class weight misconfiguration causing binary classification loss to collapse to 0.693 immediately the exact value of ln(2), which is what you get when a model predicts the majority class for every example.
From the outside, the terminal logged steady iterations, GPU utilisation sat at 98%, and loss ticked down slightly. The failure only revealed itself during post-training evaluation after the compute was spent.
3. No error message for any of it
This was the consistent thread across every session. The expensive failures were not loud crashes. They were silent completions that only revealed themselves when the model was evaluated.
One engineer described it as: “The job succeeded at doing the wrong thing.”
Training frameworks assume the local environment has been provisioned correctly. The cloud GPU host assumes the developer knows what they are doing. Between them sits an unmonitored gap and that gap is where the money goes.
The enterprise version of the same problem
One session stood out. An engineer at a major industrial company described how their ML team maintains a five to six part manual bash script that they run before every GPU job. Environment checks, storage checks, dependency checks all hand-rolled and maintained internally.
The reason: no standardised tool exists for this. Every team either builds its own pre-flight script or skips it and pays the cost when something fails silently.
What the sessions changed about ComputeFence
Before the research I was focused on CUDA CPU fallback the failure I had hit personally. 24 seconds per iteration instead of 0.4. Training on CPU for hours at full GPU rates. No warning.
After eight sessions I understood that the most common failure was not the GPU check. It was storage.
HF_HOME pointing to ephemeral disk. Checkpoint directory writing to container storage. Disk filling up during export. These failures are quieter than a CUDA mismatch and more expensive because they surface at the end of a long run, not the beginning.
The storage checks became the first thing ComputeFence runs. GPU visibility is second.
The 30-second pre-flight check
uvx computefence doctor
In order of how commonly the failures appeared across the eight sessions:
HuggingFace cache path: Flags if HF_HOME is unset or pointing to ephemeral storage.
Checkpoint output directory: Flags output paths under known ephemeral prefixes.
Disk headroom: Warns below 20GB, blocks below 5GB.
GPU and CUDA visibility: Fails if torch.cuda.is_available() returns False.
Accelerate configuration: Flags mismatches between configured process count and visible GPUs.
Dataset integrity: Optional scan for duplicates and conflicting labels with --dataset.
Every warning prints the exact fix command. The check takes under 30 seconds.
The rule of cloud compute
A job that crashes on line one is cheap fix the error and rerun.
A job that crashes after six hours because the disk filled up on checkpoint four is expensive.
A job that runs for twelve hours, reports exit code 0, and saves its weights to ephemeral storage is the most expensive of all.
Pre-flight checks cannot verify model quality or guarantee convergence. They catch the entirely preventable configuration errors that are visible before python train.py. That is a narrower claim than “prevent all failures” but it is an honest one.
GitHub: github.com/Francisco-Booth/ComputeFence
Install: pip install computefence