mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[PR #1093] [CLOSED] Monitor: Load/Unload split button + idle-unload slider, load busy guard, honest unload #3020
Labels
No labels
needs-format
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Niko1221/Strata#3020
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/Niko1221/Strata/pull/1093
Author: @miskahm
Created: 10/6/2026
Status: ❌ Closed
Base:
main← Head:monitor-load-unload-ui📝 Commits (2)
00cfa1dlocal: unload/load split button + idle-unload TTL slider, load busy guard, honest unload, piecewise slider scale, slider-hold reset fix, chevron-only button3daaffcMonitor: drop the idle-popup help paragraph📊 Changes
10 files changed (+502 additions, -55 deletions)
View changed files
📝
README.md(+3 -1)📝
docs/DETAILS.md(+35 -10)📝
serve/runconfig.py(+13 -6)📝
serve/server.py(+92 -20)📝
serve/test_runconfig.py(+50 -1)📝
serve/test_server.py(+147 -8)📝
serve/web/app.css(+25 -0)📝
serve/web/app.js(+110 -6)📝
serve/web/components.css(+5 -1)📝
serve/web/index.html(+22 -2)📄 Description
The Monitor tab gains one Load/Unload split button for the model: the main segment follows the model's state (Load when unloaded, Unload when loaded →
POST /load,/unload), and the caret opens a dropdown with an idle-unload slider (idle_unload_s,POST /config). The endpoints and the key already existed; the page had no controls for them, and a change toidle_unload_sneeded a restart.Load busy guard.
POST /loadanswers 409busywhile a request runs or waits, like/unloadalready did. The guard comes before the "already loaded" answer: with the engine up and generating, the old fast path returned 200loadedand looked like it had acted while a request was running.test_load_refused_while_busy_even_when_the_engine_is_already_upcovers it.Honest unload. Unloading frees the VRAM (the engine process exits), but
self.infowas never cleared, so/metricskept serving the last session'sexpert_slots,expert_cache_mib,arena_mib,vram_free_mib— the Monitor's "Experts in VRAM" read 13,440 / 18.0 GB with a 75% bar while the card was at 1.5%.StrataEngine.LIVE_INFOlists the keys that only mean something while the process runs;unload()pops them. The row now saysmodel unloaded · 36 MiB in use(fromhw.gpu_mem_used)./v1/modelsserved the same fiction.The idle slider's scale. A plain 0..120 minute scale puts "never" one pixel from "1 min" and gives the common 5..20 minute range a sixth of the track. The input is now a position (0..1000) and the minutes are a piecewise curve over it: 25 steps/min to 20 min, 10/min to 45 min, 3⅓/min above. Round-trip is exact for every whole minute and monotonic over all 1001 positions. The 2 h cap is enforced server-side (
("num", 7200)inrunconfig.EDITABLE), so About cannot round-trip past the slider.Slider-hold reset fix.
renderIdleruns on every 1 s poll and unconditionally reset the displayed value to the last savedidle_set, clobbering the live drag display — so sliding and holding snapped the number back to the saved value each tick. Adraggingflag (set ononinput, cleared ononchangeandpointerup) makesrenderIdlereturn early mid-drag. Verified in headless Chromium: a poll tick mid-drag holds the display; with the guard off the same poll resets it.Chevron-only button. The caret segment shows only the chevron (the TTL value is in the popup and the button's
titletooltip), so it is narrow (27px vs the 73px Load/Unload segment).Tests:
serve/test_server.py(+155) andserve/test_runconfig.py(+51) cover the busy guard, the honest unload, the 2 h cap, and the page's fields. Fullservesuite: 433 tests, 6 errors / 10 skipped — identical to the purev0.1.40baseline (the 6 are environmental: 3HeapBpe, 3regex-module). The commit adds 13 tests, all passing.Live verification (7900 XTX, gfx1100/ROCm 10.0.0):
Reply with exactly: OK→OK/stop; with a request generating,POST /loadandPOST /unloadreturn 409busyand leave the engine loaded; the chevron-only button renders at 27px; a real 1 s poll mid-drag holds the slider display.Screenshots
The Model state card with the Load/Unload split button (model loaded →
Unload; the chevron opens the idle popup):The idle popup: the slider (
idle_unload_s) at 30 min, ticksnever / 15 min / 45 min / 2 h, no help paragraph:The full Monitor view with the popup open:
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.