Skip to main content

Thin client watchdog for GPU training runs: detects failures and reports metrics/events to the keepalive dashboard, 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 the keepalive dashboard, 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://weavehacks-hackathon-dashboard.vercel.app
Demo mode KEEPALIVE_DEMO off

Precedence is explicit kwargs > environment variables > ~/.config/keepalive/config.json.

Docs: https://weavehacks-hackathon-dashboard.vercel.app/docs

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

keepalive_club-0.2.1.tar.gz (13.8 kB view details)

Uploaded Source

Built Distribution

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

keepalive_club-0.2.1-py3-none-any.whl (19.3 kB view details)

Uploaded Python 3

File details

Details for the file keepalive_club-0.2.1.tar.gz.

File metadata

  • Download URL: keepalive_club-0.2.1.tar.gz
  • Upload date:
  • Size: 13.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.6.1

File hashes

Hashes for keepalive_club-0.2.1.tar.gz
Algorithm Hash digest
SHA256 44b1cca9b67a924f539ed9e18fffc347fe4b21e0bd6635444091b60cd3fde097
MD5 5c704d0b60c33cc62d60f72f2a9c68b2
BLAKE2b-256 2367036e26a26af0f74e799553f960f8fd65c3b5c4b1f10cd9d735d0e97cfd94

See more details on using hashes here.

File details

Details for the file keepalive_club-0.2.1-py3-none-any.whl.

File metadata

File hashes

Hashes for keepalive_club-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 e498a1375b145d18e34080c4f46f26511cea70007efefe12643aa5a2aea0cca0
MD5 5560f8be1c2c0016e163757949feb783
BLAKE2b-256 623c80592e686132bc0a4d8f4231fd717ed11feaeb0d890cf4d3c40b96aab661

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