mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
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#2763
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/683
Author: @hireymage
Created: 10/3/2026
Status: ❌ Closed
Base:
main← Head:fix-setup-config-preserve📝 Commits (2)
cd74b39setup: a re-run of setup carries over the hand-edited config blocks (#629)a5f9a90docs: say that a re-run of setup keeps hand-edited blocks (#629)📊 Changes
3 files changed (+159 additions, -0 deletions)
View changed files
📝
docs/DETAILS.md(+4 -0)📝
setup.py(+60 -0)📝
tools/test_setup_choices.py(+95 -0)📄 Description
What was broken (#629)
A fresh re-run of setup —
START-HERE.bat --yes --family qwen --model IQ3_S --gpus 0,1 --context 131072, or answering the setup questions again to change the context length or the size — regeneratedstrata-<model>.jsonfrom scratch and quietly dropped everything the generator does not write itself:sampling,mcp_serversandmcpblocks that DETAILS.md documents in the same file;vision(cuda_devicefrom the #408 workflow) and insideenv(theSTRATA_*values from DETAILS.md's table).The install was fine afterwards: the engine ran. What was lost was visible only later — MCP tools gone, sampling back to defaults, and no message anywhere explaining the loss.
What it does now
setup.pyregenerates the config the same way, then reads the earlierstrata-<model>.json(whole-or-nothing, atomic-write semantics per #459) and carries over:[ok] carried over from the earlier strata-q2_0.json: mcp; mcp_servers; sampling;envandvision, only the hand keys survive:cuda_device,backend,STRATA_SPLIT_OWNand friends; what setup recomputes per install (exe,mmproj,max_tokens, the HIPBLASLt tuning table,STRATA_RESIDENT_PIN) is regenerated;host,api_key,backend, the engine args — because this run's choices decide those (and secrets are never carried over);[!] this run's engine args do not carry the earlier config's flags: --my-tuning (add them back by hand if you meant them). A flags list is not merged by hand; a re-run that drops--vram-reserve-mibor--my-flagsays so instead of inventing an argument order;--visionthat leaves an oldvisionblock behind prints[!] this run drops the earlier config's vision block ....An unreadable or missing earlier file means a plain fresh install, exactly as before.
Tests
tools/test_setup_choices.pygainsConfigPreserve(8 tests,python -m unittest tools.test_setup_choices), riding the goldeninstall()harness (no GPU, no network, mocked PC) so the realsetup.main()path is covered, including the seededstrata-q2_0.jsonbefore the re-run:cuda_device/backend/STRATA_SPLIT_OWNsurvive; the generator's own keys are regenerated (max_tokens, its own env values);host/api_key/backendare never carried, and nothing hand-set lost → no warning;visionblock warned;Plus an end-to-end golden-harness run confirming the carried config, and one sentence in
docs/DETAILS.mdnext to themcp_serversdocumentation:Notes
write_configsite insetup.main()can wipe the file (every other site loads the config and mutates it), so the carry-over hooks in exactly one place — the onewrite_configcall that buildscfgfrom scratch.tools/test_setup_golden.json) is untouched: a first install (no earlier file) produces the same config as before. The golden tests fail identically on cleanupstream/mainwithout this change (46 failures, pre-existing onmain, unrelated).🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.