mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[GH-ISSUE #1337] setup --calibrate loses the measurements it already has when a later engine start fails #540
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#540
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?
Originally created by @aly8246 on GitHub (Oct 7, 2026).
Original GitHub issue: https://github.com/Niko1221/Strata/issues/1337
tools/calibrate.pymeasures every candidate through one engine and then restarts it per value in step 4 for the CPU worker count. If one of those starts fails,start_engineraises,measure()never returns, andsetup --calibratereports a failed run while the config keeps its defaults. The winners the earlier steps already measured and printed are lost with it.That is what happened to the run in #1245. On an RTX 5090 Laptop the MTP draft head (212.9 MiB, CJK vocab) no longer fitted during the 23-worker restart, with 213-274 MiB free, so the run died there. The sweep winners printed before it (
PCIe 0.55, floor0.70) were applied by hand.It costs more than one setting when the sweep has found something worth keeping. On this machine (Core Ultra 9 290HX Plus, RTX 5090 Laptop, PCIe 5.0 x16) the PCIe share at 1.0 is worth 39% over the engine default of 0.55, 51.1 to 71.3 tok/s interleaved per request, and #1332 adds 1.0 to the sweep so that
--calibratecan find it. A run that aborts before the confirm step, or before the worker step, gives that away.The same shape can fire the other way: a candidate can fail to start for a reason that has nothing to do with the setting, for instance VRAM taken by something else at that moment, and the run then loses the candidates it had already measured.
Suggestion: treat a candidate whose engine does not start as a losing candidate rather than a failed run. Step 4 already has the loop for it, and it could record the value as a loss and carry on to
pick(), so the settings from steps 1-3 survive. If every restart fails the run is a failure as it is now.engine_error()already returns the failed start's own line, which could be named in the report so the reason is not lost.I am not attached to the shape of the fix. The point is that a run should not lose measurements it already has because a later start failed.
Adjacent, not the same thing: #1197 is about the calibration loading the model more than once and leaving the server running.
@Niko1221 commented on GitHub (Oct 8, 2026):
Fixed in 0.1.41: in
setup --calibrate, an engine start that fails in step 4 (the worker counts) or step 5 (the expert tier) now drops that candidate, says why (the engine did not start for 23 workers: ...) and goes on, so the settings the earlier steps chose are kept and written. A failure of the first start, before anything is measured, is still a failed run. The report lists the dropped candidates underfailed_starts. Tests: a restart that always fails keeps the PCIe/draft-floor winners, and one failing worker count only drops itself.STRATA_PATTN_SM60=1) #4844