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.2.tar.gz (13.9 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.2-py3-none-any.whl (19.3 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for keepalive_club-0.2.2.tar.gz
Algorithm Hash digest
SHA256 7afa4e7f47c791cf4808bca0f1831a3defb713d5f4b7d948db15adab844c4532
MD5 0b647e75e4681c81a55b32c067bf1279
BLAKE2b-256 99515dc4de4bebbd7eb611b0902f28c1a8420b06754360dac065544ee26a2c95

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for keepalive_club-0.2.2-py3-none-any.whl
Algorithm Hash digest
SHA256 884962db6ab9c41d6435a65d5d10568ab61891c70b608b26063013c33c62e0af
MD5 0954410f4106f4fd841a774043222383
BLAKE2b-256 c26d8263d2c2524bf953353497176bdbcfdc781ae50bbd179cb3153fa5d7002a

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