Thin client watchdog for GPU training runs: detects failures and reports metrics/events to keepalive.club, which diagnoses and opens fix PRs.
Project description
keepalive
A thin client watchdog for GPU training runs. It detects hard failures (NaN loss, divergence, stalls, OOM), reports your metrics and events to keepalive.club, and gets out of the way. The server scores your run against a plain-English monitoring prompt, and when something goes wrong it diagnoses the failure and opens fix PRs on your repo — fully traced in W&B Weave.
Quickstart
pip install keepalive-club # installs as `keepalive-club`, imports as `keepalive`
keepalive login # prompts for your ka_live_ key, stores ~/.config/keepalive/config.json
Wrap your training loop:
import keepalive
with keepalive.watchdog(
run, # your wandb run
prompt="Flag if val/loss diverges from train/loss or grad_norm spikes.",
threshold=0.6,
max_agents=3,
checkpoint_dir="ckpts/", # informational
demo_mode=False,
):
train()
The watchdog hooks run.log(), batches metrics/events to
POST {api_url}/api/v1/events, and emits incident.detected on a hard failure —
then keeps going. The server handles diagnosis, fixing, and PRs.
Or supervise an unmodified script (survives hard crashes like CUDA OOM):
keepalive run -- python train.py --batch-size 64
Configuration
| Setting | Env var | Default |
|---|---|---|
| API key | KEEPALIVE_API_KEY |
— (or keepalive login) |
| API URL | KEEPALIVE_API_URL |
https://keepalive.club |
| Demo mode | KEEPALIVE_DEMO |
off |
Precedence is explicit kwargs > environment variables > ~/.config/keepalive/config.json.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file keepalive_club-0.2.0.tar.gz.
File metadata
- Download URL: keepalive_club-0.2.0.tar.gz
- Upload date:
- Size: 13.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.6.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d5545bc74b999ad3a721ace0701e55a63d83fccd41b579b69a5992c19cf510fa
|
|
| MD5 |
86cb945fe8796a7020f8fcd0941fd605
|
|
| BLAKE2b-256 |
0e5fc552f9ea88a668dca7e5253a4da41526c5f84f1989c369371ec9accef70f
|
File details
Details for the file keepalive_club-0.2.0-py3-none-any.whl.
File metadata
- Download URL: keepalive_club-0.2.0-py3-none-any.whl
- Upload date:
- Size: 19.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.6.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8b2ae6740e697026618163ecfa0ab052240938718929efbd6aee21b294f5595e
|
|
| MD5 |
749aa064fc07a1470afa1b3c7e06df81
|
|
| BLAKE2b-256 |
71494eed47a68d7b39deb314fbfd4e08c8f25086726f2be86680ddc461e0fda7
|