<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Francisco Booth</title>
    <description>The latest articles on DEV Community by Francisco Booth (@franciscobooth).</description>
    <link>https://dev.to/franciscobooth</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4112135%2F6cf0defa-ee9f-417b-9c92-b614563226c8.jpg</url>
      <title>DEV Community: Francisco Booth</title>
      <link>https://dev.to/franciscobooth</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/franciscobooth"/>
    <language>en</language>
    <item>
      <title>24 seconds per iteration instead of 0.4. I paid for six hours of GPU compute and trained on CPU the entire time.</title>
      <dc:creator>Francisco Booth</dc:creator>
      <pubDate>Sun, 06 Sep 2026 10:22:30 +0000</pubDate>
      <link>https://dev.to/franciscobooth/24-seconds-per-iteration-instead-of-04-i-paid-for-six-hours-of-gpu-compute-and-trained-on-cpu-the-3p41</link>
      <guid>https://dev.to/franciscobooth/24-seconds-per-iteration-instead-of-04-i-paid-for-six-hours-of-gpu-compute-and-trained-on-cpu-the-3p41</guid>
      <description>&lt;p&gt;Failure 1 — CUDA silently fell back to CPU&lt;/p&gt;

&lt;p&gt;My training job launched on Vast.ai and ran to completion. Iteration time was 24 seconds instead of 0.4 seconds. CUDA had fallen back to CPU silently. PyTorch logged nothing. I had been billed for six hours of GPU compute while training on an unaccelerated CPU thread the entire time.&lt;/p&gt;

&lt;p&gt;Failure 2 — HF_HOME on ephemeral disk&lt;/p&gt;

&lt;p&gt;Every fresh pod re-downloaded base model weights to /root/.cache — the ephemeral container disk wiped on pod shutdown. Same download, same cost, every run. The fix is one line. I did not know it for weeks.&lt;/p&gt;

&lt;p&gt;export HF_HOME=/workspace/.cache/huggingface&lt;/p&gt;

&lt;p&gt;Failure 3 — Accelerate config mismatch&lt;/p&gt;

&lt;p&gt;My accelerate config had num_processes: 2. The pod had one GPU. Training launched, appeared to run, and produced garbage output. No error thrown. The configuration simply did not match the hardware.&lt;/p&gt;

&lt;p&gt;Failure 4 — Dirty dataset&lt;/p&gt;

&lt;p&gt;28,432 duplicate rows. 312 conflicting labels. Loss collapsed to 0.693 on step one — the exact cross-entropy value for random guessing on a binary classification problem. I spent three days debugging model architecture and learning rates before I scanned the dataset.&lt;/p&gt;

&lt;p&gt;The pattern&lt;/p&gt;

&lt;p&gt;None of these printed an exception. All of them were visible before python train.py if I had known what to check.&lt;/p&gt;

&lt;p&gt;I spoke to 13 ML engineers on RunPod, Vast.ai, and AWS. Nine had lost checkpoints to ephemeral disk. Eight had shipped silent garbage with no log error.&lt;/p&gt;

&lt;p&gt;An ML engineer at a major German industrial company told me his team maintains a five or six part manual bash script that they run before every GPU job because no standardised tool exists.&lt;/p&gt;

&lt;p&gt;When enterprise teams are hand-rolling bash scripts, the problem is real.&lt;/p&gt;

&lt;p&gt;So I built ComputeFence.&lt;/p&gt;

&lt;h1&gt;
  
  
  Standard install:
&lt;/h1&gt;

&lt;p&gt;pip install computefence&lt;br&gt;
computefence doctor&lt;/p&gt;

&lt;h1&gt;
  
  
  Zero install on a fresh pod:
&lt;/h1&gt;

&lt;p&gt;uvx computefence doctor&lt;/p&gt;

&lt;p&gt;30 seconds. Every warning prints the exact fix command.&lt;/p&gt;

&lt;p&gt;ComputeFence v0.2.5 — Pre-flight diagnostic&lt;br&gt;
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━&lt;br&gt;
2 WARNINGS  ·  0 BLOCKERS  ·  3 PASSED&lt;/p&gt;

&lt;p&gt;Storage&lt;br&gt;
  ⚠ HF_HOME is not set — model weights will cache to ephemeral disk&lt;br&gt;
    Fix: export HF_HOME=/workspace/.cache/huggingface&lt;br&gt;
  ⚠ Root disk (/) — 14.3 GB free (below 20 GB)&lt;br&gt;
    Fix: Free up disk or move checkpoints: df -h to check usage&lt;/p&gt;

&lt;p&gt;━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━&lt;br&gt;
2 warning(s) found. Review before launching.&lt;/p&gt;

&lt;p&gt;It checks GPU and CUDA visibility, HuggingFace cache path persistence, Accelerate GPU count versus what is actually on the instance, disk headroom for checkpoints, and checkpoint output directory persistence via --output-dir.&lt;/p&gt;

&lt;p&gt;It does not check training script correctness, learning rate safety, or anything that only fails during the run. HuggingFace cache and your checkpoint output directory are separate paths — fixing one does not fix the other. ComputeFence catches configuration mistakes before the GPU starts billing.&lt;/p&gt;

&lt;p&gt;Add it to your pod startup script. Exit code is 0 on warnings and 1 only on hard blockers so training will still launch on warnings:&lt;/p&gt;

&lt;p&gt;pip install computefence &amp;amp;&amp;amp; computefence doctor &amp;amp;&amp;amp; python train.py&lt;/p&gt;

&lt;p&gt;Does it catch anything real?&lt;/p&gt;

&lt;p&gt;Three operators have run it before paid training jobs on RunPod.&lt;/p&gt;

&lt;p&gt;One caught HF_HOME writing to ephemeral disk and an Accelerate config mismatch on a RunPod A100. He fixed both before launch.&lt;/p&gt;

&lt;p&gt;One confirmed the storage warning matched real pod behaviour and said he would not have caught it without the tool.&lt;/p&gt;

&lt;p&gt;Aaron, an ML engineer who ran ComputeFence on a RunPod A40, said the Accelerate warning would have made him stop and investigate before launching.&lt;/p&gt;

&lt;p&gt;Still very early.&lt;/p&gt;

&lt;p&gt;If you run it before your next paid job on RunPod, Vast.ai, Lambda Labs, or any bare metal instance — paste your computefence doctor output in the comments or open an issue on GitHub. I want to know which checks fire on real setups and which are noise.&lt;/p&gt;

&lt;p&gt;Free. MIT licensed. Works on any bare metal GPU provider.&lt;/p&gt;

&lt;p&gt;GitHub: github.com/Francisco-Booth/ComputeFence&lt;/p&gt;

</description>
      <category>machinelearning</category>
      <category>python</category>
      <category>opensource</category>
      <category>gpu</category>
    </item>
  </channel>
</rss>
