Repository navigation
Add vigil watch headless hang watchdog - #1
Merged
Merged
Conversation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01TSy8nEHnUh6SLq6y8LB1nz
Runs without the TUI on an always-on machine and alerts when a training run stops producing output. GPU utilization and memory sampled over SSH distinguish a hung process (idle, memory held), an exited one (memory released, instance still billing), and a silent-but-busy one (long eval or NCCL deadlock). Alerts include what the silence has cost, repeat as reminders, and announce recovery and preempted/destroyed instances. Log replay on reconnect (`tail -n 100`) is ignored so it can't fake a recovery. Also: - ntfy webhook format for phone push without an account - instance start time from Vast.ai (start_date) and RunPod (uptime) - provider-neutral webhook titles (were "Vast.ai Alert" for RunPod) - --provider defaults to the config file's provider Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01TSy8nEHnUh6SLq6y8LB1nz
- Stream logs in chunks and split on \r as well as \n. tqdm-style bars that only redraw in place were invisible until the next newline, so `vigil watch` could report a healthy run as silent. Every redraw now counts as activity; at most one per 10s is logged and parsed. - Send the RunPod API key as an Authorization: Bearer header instead of ?api_key=, which httpx echoed into error messages shown in the TUI and written to watch logs. Redact API keys from displayed errors too. - Add watch_skip_labels and per-instance `watch: false` so dev boxes and servers without training logs don't page anyone. Instances that become excluded stop being watched without a false "gone" alert. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01TSy8nEHnUh6SLq6y8LB1nz
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Adds
vigil watch, a headless mode for always-on machines that alerts when a training run on a rented GPU stops producing output. It combines log silence withnvidia-smisampling over SSH to tell these cases apart:hangexited: finished or crashed, instance still billingbusy_silent: long eval, or an NCCL deadlocknvidia-smifailingunreachablerecoveredgoneEvery alert includes what the silence has cost. Unresolved alerts repeat with the updated cost. Alerts go to ntfy (new format, for phone push), Slack, Discord or raw webhooks, and
--test-alertchecks the setup.Also:
\ras well as\n. tqdm redraws count as activity (one per 10s is logged), so a bar-only run isn't mistaken for a silent one. The TUI also shows live progress now.Authorization: Bearerheader instead of?api_key=, which httpx echoed into error messages. Keys are also redacted from displayed errors.watch_skip_labelsand a per-instancewatch: falsesetting.start_date) and RunPod (uptimeInSeconds) and used for the total cost in alerts.--provider: defaults to the config file's provider.uv.locksynced to 0.2.0.Why
Crash and finish alerts already exist elsewhere (W&B, knockknock). Runs that hang without exiting don't trigger them, and on a rented GPU they bill until someone looks. The TUI's stall alerts only fire while it's open on a laptop, and GPU usage separates real hangs from long evals.
Testing
uv run pytestpasses (262 tests, up from 221); flake8 cleannvidia-smi:tail -n 100replay on reconnect\r-only progress outputuptimeInSecondsfield, Vast.aistart_date, and how Vast.ai's SSH proxy handles one GPU check connection per minute.🤖 Generated with Claude Code
https://claude.ai/code/session_01TSy8nEHnUh6SLq6y8LB1nz
Generated by Claude Code