diff --git a/README.md b/README.md index de138178..bd360572 100644 --- a/README.md +++ b/README.md @@ -1136,7 +1136,7 @@ question you had when you opened the page. | **Image** | Qwen-Image 2.1 or MiniMax-H3-Image, the image lane that serves: generation, editing with up to ten references, native RGBA (Qwen-Image 2.1), up to 16.9 megapixels (MiniMax-H3-Image) | Generate and edit at the model's defaults (**Reset**), start from the sample prompts, follow each stage of a request, copy the matching curl | | **Video** | MiniMax-H3, when it is the serving lane: text to video with joint video-and-audio, first/last-frame conditioning | Generate at the cookbook's defaults (**Reset**), follow the request to completed, play and download the MP4, copy the matching curl | | **Transcription** | NVIDIA Nemotron Transcribe, when it is the serving lane: speech to text from a file or the microphone, through the cockpit's relay with the box's key | Drop or record a wav, mp3 or flac (the formats the lane reads), pick the language or let it detect, copy the transcript or download the `.txt`, copy the matching curl | -| **Logs** | Live logs, the last 30 events, recent jobs | Tail or follow a service's log, read what each recent job printed | +| **Logs** | Live logs, the last 40 events, recent jobs | Tail or follow a service's log, read what each recent job printed | | **Settings** | The repo itself, opencode integration, whether a newer release is out, a link to the release notes, the cockpit's own settings | Fit opencode's limits to the engine that serves; copy the command that updates the stack, which runs in a terminal because the installer needs an interactive sudo | The other screenshots, what each panel does that a terminal does not, how it behaves on a diff --git a/dashboard/CAPABILITIES.md b/dashboard/CAPABILITIES.md index 5df09c75..a041e314 100644 --- a/dashboard/CAPABILITIES.md +++ b/dashboard/CAPABILITIES.md @@ -20,17 +20,17 @@ Nothing shells out free-form; every action is a fixed argv template. |---|---|---| | Which lane serves | `systemctl start/stop qwen38-sglang / qwen38-flash / qwen38-image` | Load and Stop on each lane's card in the Lanes view, Load from the rack in Now; the server refuses a second engine while one runs, and every action is confirmed first | | Boot enablement | `systemctl enable/disable` | Each lane's card says whether it starts at boot. "Start at boot" runs its switch alone (it enables the target's unit and disables the others, and nothing stops), "Do not start at boot" disables the boot lane's unit, after which no lane starts with the box | -| Keepalive proxy | `systemctl ... qwen38-keepalive` | Its row in the Lanes view: state, whether it starts at boot, the running version and whether it is the repo's copy, Start/Stop | +| Keepalive proxy | `systemctl ... qwen38-keepalive` | Its panel in the Lanes view: state, the running version and whether it is the repo's copy, Start/Stop | | Switch target model | `./switch-model.sh ` | Switch, a step of a Load when the boot is not on that target yet or the lane lacks a file it needs (a Load that only applies an update to the lane that serves restarts it, with no switch): the confirmation shows the exact command, the job's live output shows what it changes. It writes the target's unit or launcher and never starts, stops or restarts an engine: the Load's next steps do | -| Model revisions served | `--revision` in unit/launcher | Revision on the lane card; the Library view's Recipes compare it with the pin, and its Upstream watch compares each pin with Hugging Face's `main` | +| Model revisions served | `--revision` in unit/launcher | Revision among the Lanes view's engine facts; the Library view's Recipes compare it with the pin, and its Upstream watch compares each pin with Hugging Face's `main` | | Kill a stuck generation | proxy auto-abort / restart service | "Abort all", confirmed first, on every text lane: through the proxy's `POST /proxy/stop` since v1.40.3 (on vLLM and llama.cpp the proxy closes each connection it relays, and a generation sent to the engine straight goes on until the lane stops), which stops each generation and cuts its client, so an agent retries the request instead of keeping a cut answer for a whole one (to end an agent's turn, stop it in the agent); `POST /abort_request` with `abort_all` to the engine when the proxy does not take it | ## Observability | capability | shell today | UI | |---|---|---| | Server state | `systemctl status`, `journalctl`, `docker logs` | Logs view: the last 120 lines of an engine container's log or of a unit's journal, re-read every 3 s with follow ticked, with a line filter and Copy (no download) | -| Engine internals | `/server_info`, `/v1/loads`, `/health` | Lanes view (model, revision, quantization, window, KV pool, speculative, attention, radix cache, engine version, image) and the Now view's Activity (running, waiting, tokens in KV, accept length) | -| Decode telemetry | docker log scheduler lines | Traffic view: KV pool held, KV usage from the engine log, Mamba state slots, accept length | +| Engine internals | `/server_info`, `/v1/loads`, `/health` | Lanes view (model, revision, quantization, window, KV pool, speculative, attention, radix cache, engine version, image) and the Now view's Activity (running, waiting, tokens in KV) | +| Decode telemetry | docker log scheduler lines | Traffic view: KV pool held, KV usage from the engine log, accept length; the flash lane's Mamba state slots, on the Machine view's pool guard | | Engine counters | `/metrics` (SGLang's Prometheus counters, `--enable-metrics` on its lanes, and vLLM's on the vLLM lanes) | Traffic view, last 5 minutes: requests finished, the share of prompt tokens found in the cache, prefill and decode speed per request, tokens accepted per drafter step (the window's, not the gauge's boot average), queue and first-token waits, tokens per second for all clients, idle share, accepted abandons, and the peaks of pool, running and waiting; on SGLang each request counted once, the cockpit's canary taken out. On the vLLM lanes the same rows but the idle share and the abandons, which vLLM does not count, tokens and latencies counted at every step, and no canary to take out | | Requests through proxy | keepalive proxy request lines | Requests table: start, client, path, bytes, duration, outcome | | Machine | nvidia-smi (power/temp/procs), /proc, df | Machine view: unified memory, page cache and swap, free disk at home and under Docker, GPU power, temperature and processes, CPU load, the safety belts | @@ -55,7 +55,7 @@ Nothing shells out free-form; every action is a fixed argv template. | Server state | `systemctl status opencode-web`, `journalctl -u opencode-web` | chip (ready, starting, stopped, relay waiting), served version, installed binary if newer, Logs view source | | Restart after `opencode upgrade` | `sudo systemctl restart opencode-web` | Restart server button (exact-argv sudoers lines, confirmed like every action) | | Reach it on its own | none | Open in a tab (same relay, same session); Fullscreen inside the cockpit (corner button or Escape to come back, remembered) | -| Autonomy (no approval clicks, and opencode's defaults already run shell commands unasked, [agents-and-network](../docs/agents-and-network.md)) | `oc` runs with `--yolo` | `AGENT_AUTO=1` at install (unit sets `OPENCODE_PERMISSION`, this repo's deny rules after its `*`); the view shows the mode the running server applies | +| Autonomy (no approval clicks, and opencode's defaults already run shell commands unasked, [agents-and-network](../docs/agents-and-network.md)) | `oc` runs with `--auto` (OpenCode 2; `--yolo` with `./install.sh --opencode 1`) | `AGENT_AUTO=1` at install (unit sets `OPENCODE_PERMISSION`, this repo's deny rules after its `*`); the view shows the mode the running server applies | ## Explicitly out of scope now (groundwork only) Clusters of more than two boxes, multi-GPU: the collector/action registries carry diff --git a/dashboard/cockpit.py b/dashboard/cockpit.py index 81842ef9..7dd2eda7 100644 --- a/dashboard/cockpit.py +++ b/dashboard/cockpit.py @@ -248,7 +248,8 @@ UNITS = ("qwen38-sglang.service", "qwen38-flash.service", "qwen38-image.service" # none of the engines that take the GPU in turn (lifecycle.ENGINE_UNITS, UNITS above): no Load, no boot to # follow, no restart owed by an engine's inputs. The page shows it since v1.58.0 and starts or stops its unit. SPEECH_UNIT = "qwen38-speech.service" -JOURNAL_UNITS = UNITS + (AGENT_UNIT, SPEECH_UNIT) # what the Logs tab may read (UNITS carries the image, video, Kolibri and Nemotron lanes) +COCKPIT_UNIT = "qwen38-dashboard.service" # this cockpit's own, whose journal Settings sends to +JOURNAL_UNITS = UNITS + (AGENT_UNIT, SPEECH_UNIT, COCKPIT_UNIT) # what the Logs tab may read (UNITS carries the image, video, Kolibri and Nemotron lanes) # The SGLang text engines' containers: what their scheduler lines and their abort contract # are read from (the Liquid AI LFM2.5 24B-A2B lane's too, SGLang on the 27B's image, and the Inkling 2 Mini lane's, # SGLang on its own). The Kolibri and Nemotron lanes' vLLM writes neither, so they are only in CONTAINERS, the list the @@ -672,7 +673,10 @@ def gpu_clock_run(cap: str): out = run(GPU_CLOCK_ARGV[cap], timeout=GPU_CLOCK_TIMEOUT_S, merge_err=True, errors="replace") lines = [ln.rstrip() for ln in str(out).splitlines() if ln.strip()] rc = getattr(out, "rc", None) - if answered(out): + # nvidia-smi can refuse and exit 0: "Setting locked GPU clocks is not supported for GPU ...", then "Treating as warning + # and moving on." (both in its 595 binary; it fails on a warning with -eow alone), which read as a cap that holds + refused = next((ln for ln in lines if "is not supported" in ln), None) + if answered(out) and not refused: return True, None, ("GPU clock cap lifted: the GPU runs at its own clocks" if cap == "none" else f"GPU clock capped at {gpu_clock_mhz(cap)}"), lines, rc if lines and lines[-1].startswith("sudo:"): @@ -682,7 +686,7 @@ def gpu_clock_run(cap: str): if lines: # its reason, not the warning it adds after it (after every -lgc on the reference box, 2026-11-11: # "Warning: persistence mode is disabled on device ...") - said = next((ln for ln in reversed(lines) if not ln.startswith("Warning:")), lines[-1]) + said = refused or next((ln for ln in reversed(lines) if not ln.startswith("Warning:")), lines[-1]) return False, "failed", f"nvidia-smi refused: {said[:200]}", lines, rc # nothing said: the deadline (no exit code), or a call that could not even start, or one that ended silent if rc is None and time.monotonic() - t0 >= GPU_CLOCK_TIMEOUT_S * 0.9: @@ -1679,8 +1683,8 @@ def transcribe_call(payload: dict) -> tuple[int, dict]: if not raw: return 400, {"error": "the audio file is empty"} if len(raw) > TRANSCRIBE_MAX_AUDIO: - return 400, {"error": f"the audio file is {len(raw)} bytes ({len(raw) / 1e6:.1f} MB) and the cap is " - f"{TRANSCRIBE_MAX_AUDIO} bytes ({TRANSCRIBE_MAX_AUDIO / 1e6:.0f} MB, about 33 minutes " + return 400, {"error": f"the audio file is {len(raw)} bytes ({len(raw) / 2 ** 20:.1f} MiB) and the cap is " + f"{TRANSCRIBE_MAX_AUDIO} bytes ({TRANSCRIBE_MAX_AUDIO / 2 ** 20:.0f} MiB, about 33 minutes " "at the 16 kHz mono the page records); cut it or convert it first, " "the lane reads wav, mp3 and flac"} language = payload.get("language", "") @@ -2652,7 +2656,7 @@ def collect_opencode(): launcher = Path.home() / ".local/bin/oc" out = {"node_id": "local", "enabled": not off.exists(), "off_note": off.read_text(errors="replace").strip()[:100] if off.exists() else None, - "launcher": {"present": launcher.exists(), "ours": False, "cap": None}, + "launcher": {"present": launcher.exists(), "ours": False, "cap": None, "major": None}, "real": {"present": real.exists(), "default": None, "limits": {}}, "artifact": {"present": art.exists(), "default": None}} if launcher.exists(): @@ -2660,6 +2664,8 @@ def collect_opencode(): out["launcher"]["ours"] = "dgx-spark-qwen38" in txt m = re.search(r"OUTPUT_TOKEN_MAX[^0-9]*?(\d{4,7})", txt) out["launcher"]["cap"] = int(m.group(1)) if m else None + # OpenCode 2's launcher (the default since v1.56.0) lifts no cap and says so: the page read "output cap ?" + out["launcher"]["major"] = 2 if "starts OpenCode 2" in txt else 1 for key, path in (("real", real), ("artifact", art)): if not path.exists(): continue @@ -4039,7 +4045,8 @@ def collect_lifecycle(): "image": (containers_now().get(cont) or {}).get("image")}) return {"node_id": "local", "engines": engines, "orphans": orphans, "keepalive": states.get("qwen38-keepalive.service", "stopped"), - "pool_guard": {"enabled": POOL_GUARD, "threshold": POOL_GUARD_THRESHOLD, **POOL_GUARD_STATE}, + "pool_guard": {"enabled": POOL_GUARD, "threshold": POOL_GUARD_THRESHOLD, + "mamba_threshold": MAMBA_GUARD_THRESHOLD, **POOL_GUARD_STATE}, "blocked": blocked, "events": ev} diff --git a/dashboard/static/index.html b/dashboard/static/index.html index 1a43e6ae..8381a768 100644 --- a/dashboard/static/index.html +++ b/dashboard/static/index.html @@ -78,7 +78,7 @@
-

Every action asks first and shows the exact command it will run. One at a time, from any view or browser.

+

Every action asks first and shows the exact command it runs, when it runs one. One at a time, from any view or browser.

@@ -373,7 +373,7 @@
Clock read
…
Cap in effect
…
-

The clock nvidia-smi reads can lag behind a change of cap (still the old one 2 s after it on the reference box), then follows the cap within a minute, the GPU idle included: a reading above the cap just after it is set is not a cap that failed.

+

The clock nvidia-smi reads can lag behind a change of cap, up to a minute (still the old one 2 s after it on the reference box), and a GPU at rest can read its own idle clock whatever the cap (208 MHz under driver 595.99): a reading above the cap just after it is set is not a cap that failed, and one that stays above it is said.

@@ -585,7 +585,7 @@
-
Your video appears hereA 4 s clip at 480p takes about ten minutes on this box.
+
Your video appears hereA 4 s clip at 480p takes 10 to 13 minutes on this box.