mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[PR #3992] [CLOSED] [GUI] show the MTP draft acceptance per request (MTP ACC column) #4868
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#4868
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/3992
Author: @thisisspartan
Created: 10/24/2026
Status: ❌ Closed
Base:
main← Head:monitor/mtp-acc📝 Commits (1)
6743eecmonitor: show the MTP draft acceptance per request (MTP ACC column)📊 Changes
4 files changed (+54 additions, -6 deletions)
View changed files
📝
serve/server.py(+5 -1)📝
serve/test_monitor.py(+42 -1)📝
serve/web/app.js(+5 -2)📝
serve/web/index.html(+2 -2)📄 Description
Problem and result
The engine already reports accepted and offered speculative drafts for each request (the DONE line;
drafts_acceptedanddrafts_offeredare stored since #457). The Recent requests table does not show the acceptance rate.Before: no figure. After: an "MTP ACC" column with accepted / offered as a percentage; the tooltip gives the two counts. A dash when the engine reported no drafts, so an unused draft path is never shown as 0%.
Related discussion
none (additive column and field; no default changed)
Approach
serve/server.py:mtp_accis computed once per request fromdrafts_accepted / drafts_offered * 100, rounded to one decimal. It isNoneunless offered > 0 and the engine reported accepted. It is stored in the history record, which/metricsalready returns, so the field appears in/metricsrequeststoo.serve/web/app.js: one cell between Output and Prefill t/s; the empty-rowcolspangoes from 9 to 10.serve/web/index.html: the header cell; the empty-rowcolspangoes from 9 to 10./metricsrequest records. Existing keys are unchanged.Validation
Passed:
python3 -m unittest serve.test_monitoron a branch built from upstream main7dd5cf18: 12 tests OK (the 10 existing plus 2 new:MtpAcceptance.test_accepted_share_of_offered_drafts, where 218 of 280 gives 77.9; andMtpAcceptance.test_no_drafts_is_a_dash_not_zero).git amto a fresh clone ofNiko1221/Strata(no other patch):test_monitor12 OK.node --check serve/web/app.js: exit 0.serve/server.pyparses.Failed:
KeyError: 'mtp_acc'.python3 -m unittest discover -s serve -p 'test_*.py', 1036 tests): the failing set changes between runs and includes timing-sensitive tests (test_keepawake,test_lifeline,test_responsesNoLeakedSampler,test_queue_wait_and_loading_are_attributed_separately,test_parallel_yield). The same kind of run on clean upstream also failed (test_lifeline,test_queue_wait_…,test_an_admission_…).test_queue_wait_and_loading_are_attributed_separatelyalso fails intermittently on clean upstream: 1 failing run in 8 on7dd5cf18, 1 in 8 on the patched branch. When run alone,test_keepawakepassed 3 of 3 runs on both trees;test_lifelineandtest_responsesNoLeakedSampler fail alone on clean upstream too.Not run: rendering of the column in a browser; native builds (CUDA, HIP, SYCL, Metal). The change touches only Python and web files.
Limits
Shows the acceptance the engine reports. The figure exists only when the engine reports drafts (#457).
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.