Install the full local foundation.
Get the SDK, CLI, failure capsules, and recovery —without the notebook extension or web UI.
pip install watcherml
WatcherML is the reliability and recovery layer for ML training. It captures evidence, diagnoses failures, proposes bounded interventions, reruns controlled trials, and proves which change actually worked.
Observed CUDA OOM at step 417.
Compared with nearest successful run.
Testing bf16 + gradient checkpointing.
Designed to work with the stack you already use
Metrics dashboards are useful after a clean run. WatcherML is built for the messy reality: CUDA OOMs, NaNs, stalled data loaders, poor GPU utilization, regressions, and experiments that need more than another chart.
Cause ranked
Sequence length increased 33%; activation memory exceeded available VRAM.
Baseline selected
Nearest successful run matched model, dataset, hardware, and Git ancestry.
Fix verified
Trial completed with 1.9 GB headroom and improved throughput.
OOM is the first proof point, but not the entire identity of WatcherML. It is common, reproducible, measurable, and constrained enough to build a recovery engine that users can trust.
Capture stack frames, tensor summaries, allocator state, recent metrics, Git changes, environment drift, and the last successful step.
capsule = watcher.capture(run)capsule.failure = "cuda_oom"capsule.peak_vram = 15.88capsule.last_step = 417capsule.freeze()A focused layer for PyTorch forensics and controlled experimentation—not another general-purpose dashboard.
Preserve the execution context around crashes, numerical instability, stalls, and regressions without collecting raw training data by default.
Find the closest successful run by model, data fingerprint, hardware, configuration, and Git ancestry—then rank the differences most likely to matter.
Use structured any-llm tool calls to produce hypotheses and experiment plans while keeping stack traces, metrics, and source changes on your machine.
Enforce trial, time, GPU, file-change, and parameter budgets. Require approval before code, dependency, or dataset changes.
Judge every intervention against explicit metrics and constraints. The LLM proposes; the evaluator verifies.
Build a graph of failure signatures, evidence, interventions, and measured outcomes so future campaigns start from verified experience.
Set a primary metric, operational constraints, permissions, and a hard budget. WatcherML stops when the goal is met, the budget is exhausted, or human approval is required.
objective:
metric: validation_f1
direction: maximize
acceptance:
validation_f1: 0.92
peak_vram_gb: 14.5
budget:
max_trials: 8
max_gpu_hours: 5
permissions:
config: automatic
code: approval_required
dataset: forbidden
Use WatcherML by itself for local experiments, or connect it to the tracking system your team already trusts.
WatcherML is your recovery layer powered even better with any LLM of your choice.
import watcherml as watcher
with watcher.run(
project="mistral-lora",
config=config,
export_to="mlflow",
) as run:
train(model, dataset, run=run)
# On failure: evidence is frozen automatically.
# Start a bounded recovery campaign.
watcher.autopilot(
run_id=run.id,
contract="campaign.yaml",
agent="ollama/qwen3",
)
# Initialize local metadata and artifacts
watcher init
# Find and investigate a failed run
watcher runs --project mistral-lora
watcher inspect run_7f21 --advise
# Compare evidence and export a reproduction capsule
watcher compare run_7f21 run_8a03 --advise
watcher export run_7f21 --format capsule --out recovery.zip
# Open the local interface
watcher ui --port 7331
Autonomy without guardrails is just expensive uncertainty. WatcherML constrains what can change, where code can run, and when a human must approve the next step.
Read the design principles →Have new ideas and want to contribute? Open a new pull request on Github!