Skip to main content

Zero-Downtime Spot GPU Failover Guard & AI Acceleration Utility for Vast.ai & RunPod

Project description

โšก SpotWarp: Zero-Downtime Spot GPU Failover Guard & Auto-Resumer

PyPI Version License: MIT Security: Audited

SpotWarp is a lightweight, 100% local Python daemon that protects your AI inference & PyTorch model training workloads on cheap Spot GPUs (Vast.ai, RunPod, AWS Spot) by converting unstable, interruptible instances into highly reliable, auto-resuming, stateful infrastructure.

Save up to 70% on GPU compute bills without worrying about sudden evictions or data loss.


๐Ÿ†š Spot GPU Eviction: Standard vs. SpotWarp

Feature Standard Spot Instance With SpotWarp (v3.0)
Eviction Consequence Workload dies, checkpoints are deleted, money is wasted. Zero Data Loss. Local daemon migrates work instantly.
Recovery Process Manual console log-in, search for a new GPU, manual setup. 100% Autopilot. Automatic rental & connection handover.
Workload Continuation Restart training from epoch 0. Auto-Resume. Script continues running via nohup over SSH.
Security Risk Requires placing S3/GitHub keys on unstable rented hosts. Zero Key Leakage. All API keys remain on your local machine.

๐Ÿ’Ž Core Commercial Features

  • ๐Ÿ’ธ CFO-Approved GPU Savings: Safely exploit cheap Spot pricing on Vast.ai and RunPod. SpotWarp gives you the reliability of a Dedicated On-Demand GPU for the price of a Spot instance.
  • ๐Ÿ”„ Stateful Workload Migration: Runs high-speed rsync incremental backups in the background of your local client machine. When eviction strikes, it restores your workspace files to the replacement container before verification.
  • ๐Ÿ”’ Zero-Trust Security (100% Local): Your cloud provider API keys (VAST_API_KEY, RUNPOD_API_KEY) stay on your local PC. Rented containers never see your cloud credentials.
  • ๐Ÿ“ฆ Zero-Configuration: No need to install daemons, cron jobs, or synchronization tools inside the remote container. If rsync is missing on Windows, SpotWarp automatically installs a portable binary in 1 second.
  • โšก Training Auto-Resumer: Automatically restarts your training scripts (--resume-cmd) in the background of the new container, pointing directly to your restored training checkpoints.

๐Ÿš€ Quick Start in 2 Minutes

1. Installation (Local PC)

Install the official package via Pip:

pip install spotwarp

2. Export API Key & Set Up Local Environment

Set your Vast.ai API key on your local machine:

# On Linux/macOS
export VAST_API_KEY="your_vast_api_key"

# On Windows (PowerShell)
$env:VAST_API_KEY="your_vast_api_key"

3. Start the Guard (With Auto-Sync & Training Resume)

Run the guard daemon on your local PC. Point it to your license key and define how your training should resume:

spotwarp start --license-key YOUR_SPOTWARP_KEY --resume-cmd "python /workspace/train.py --resume"

โš™๏ธ How It Works (The Warping Cycle)

[Rented GPU Host]                     [Local PC (Client)]                    [New GPU Host]
  (Active Workload)
         โ”‚                                     โ”‚                                    โ”‚
         โ”‚ โ”€โ”€โ”€ (30s Sync: rsync delta) โ”€โ”€โ”€โ”€โ”€โ”€> โ”‚ (Cached Workspace)                 โ”‚
         โ”‚                                     โ”‚                                    โ”‚
    [๐Ÿšจ Evicted!]                              โ”‚                                    โ”‚
         โŒ โ”€โ”€โ”€ (API Eviction Warning) โ”€โ”€โ”€โ”€โ”€โ”€> โ”‚                                    โ”‚
                                               โ”‚ โ”€โ”€โ”€ (Rent Alternative GPU) โ”€โ”€โ”€โ”€โ”€โ”€> โ”‚
                                               โ”‚                                    โ”‚
                                               โ”‚ โ”€โ”€โ”€ (Rsync Restore Workspace) โ”€โ”€โ”€> โ”‚
                                               โ”‚                                    โ”‚
                                               โ”‚ โ”€โ”€โ”€ (Nohup Resume Command) โ”€โ”€โ”€โ”€โ”€โ”€> [Run Workload]
                                                                                      (Continuing!)
  1. Eviction Detection: SpotWarp polls the cloud API every 10 seconds. If an eviction warning is triggered, it executes a Final Gasp Sync to save the latest files.
  2. Alternative Host Search: SpotWarp scans the marketplace for the cheapest matching GPU (e.g. RTX 3090) on a different host machine and rents it instantly.
  3. Delta Sync Restoration: SpotWarp transfers the cached workspace folder to the new container.
  4. Nohup Handover: SpotWarp connects via SSH to trigger the --resume-cmd in the background and verifies the Jupyter API connection.

๐Ÿ“„ License & Security Audits

SpotWarp is distributed under the MIT License. The code executes 100% locally in user space on your local computer, ensuring full transparency and compliance.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

spotwarp-3.0.7.tar.gz (14.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

spotwarp-3.0.7-py3-none-any.whl (12.3 kB view details)

Uploaded Python 3

File details

Details for the file spotwarp-3.0.7.tar.gz.

File metadata

  • Download URL: spotwarp-3.0.7.tar.gz
  • Upload date:
  • Size: 14.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.13.13

File hashes

Hashes for spotwarp-3.0.7.tar.gz
Algorithm Hash digest
SHA256 b6ed2400f7aa379b31dd7ff146958c3d1bbeaff0c5dd0b16eb3768a89fc39376
MD5 b63d1333aea63eb1da2947ba40535aa5
BLAKE2b-256 0aff688428843812612cc692ea0fabe718d17182e1816fe9298afaf44f13145c

See more details on using hashes here.

File details

Details for the file spotwarp-3.0.7-py3-none-any.whl.

File metadata

  • Download URL: spotwarp-3.0.7-py3-none-any.whl
  • Upload date:
  • Size: 12.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.13.13

File hashes

Hashes for spotwarp-3.0.7-py3-none-any.whl
Algorithm Hash digest
SHA256 fa844c633a9124c13e3689324a870d27774809ce8a7ab7e506f921e6146c701a
MD5 98d119b62992dd9568da6d093a3289c6
BLAKE2b-256 e2e91d78aff469d7d154994c888171419af468248db95573246eb8543aebb2e4

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page