Integrations / PyTorch
Run PyTorch training on cloud GPUs
Send an existing training script to a cloud GPU with one command. Your code stays as it is.
The steps follow the tool's documented settings. No tested run is recorded for this page yet.
Why use Badgr for PyTorch
- Badgr interface
- Run
- Where PyTorch fits
- GPU runtime
- Why Badgr
- Training and inference
- Run your existing script as it is. You do not rewrite it for a new framework.
- A job bills only while it runs and stops when the script exits, with a maximum cost you set.
- Logs, output files and a receipt come back with the job.
What you can do
- Train a model you cannot fit on your own GPU
- Run a hyperparameter sweep as separate capped jobs
- Fine-tune a vision or text model and download the checkpoint
Quickstart: Run a training script
badgr run . --cmd "python train.py" --max-cost 5
How it works
- 1.You run one command
- 2.Badgr checks it and picks a GPU
- 3.Your code runs and logs stream back
- 4.Outputs are saved and billing stops
What you get
- Logs while it runs
- Output files, downloaded with badgr artifacts <id>
- A receipt with cost and duration
- Checkpoints your script writes to the output folder
Requirements
- The Badgr CLI installed and logged in (npm install -g badgr-cli)
- A funded Badgr balance
- A project folder with your script and a requirements.txt
- A script that saves checkpoints to a folder you can name as output
What it costs
- A job is billed for the time it runs and stops billing when your command exits.
- Pass --max-cost to set the most a job can spend. Badgr stops it if it reaches the cap.
- Badgr shows the rate for the GPU it picked before it starts. This page does not quote a fixed price.
See pricing for how billing works.
Proof
No tested run is recorded for this integration yet. A receipt and example output will be added here after a real run, not before.
Troubleshooting
CUDA version mismatch
Pin a PyTorch build that matches the CUDA version of the image you run on, or pass your own image with --image.
Checkpoints missing after the job
Write them to the output folder your job is configured to save. Files elsewhere are removed when the job ends.
Dataset is slow to load
Download it inside the script from storage you control, or include it in the project folder if it is small.
Not sure it will run
Run badgr check on your project first. It validates the setup without starting a paid job.
Developer reference
Ready to start with PyTorch?
Every run or service has a spending limit you set before it starts.