mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[PR #3528] [Engine] launcher: resolve the data folder past repeated models dirs #4670
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#4670
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/3528
Author: @woodsonl
Created: 10/21/2026
Status: 🔄 Open
Base:
main← Head:fix/nested-models-dir-resolution📝 Commits (1)
be55ec3fix discovery: resolve the data folder past repeated models dirs📊 Changes
2 files changed (+62 additions, -4 deletions)
View changed files
📝
strata_control/discovery.py(+12 -4)📝
tests/terminal/test_discovery.py(+50 -0)📄 Description
[Engine] launcher: resolve the data folder past repeated models dirs
Problem and result: On the reporting machine the data folder nested one
modelslevel per newly installed model variant, reachingStrata-data/models/models/models/…about 200 levels deep (path excerpt below). With the layout nested,data_dir_of()andprepared_beside()resolved the innermodelsdir as the data folder, so every preset launch of a buried model failed with "The model could not be installed",strata models listreported every variantmissing_or_invalid, and new installs downloaded one level deeper still. After the fix, both functions climb to the outer data folder: the nest stops growing, buried models validate again, and flat layouts resolve exactly as before.Environment: Strata 0.2.0-beta, Terminal build 0.1.45.3 (engine 0.1.45.3-linux-x86_64-cuda-cuda13, python 3.12.15); Ubuntu, kernel 7.0.0-38-generic; NVIDIA GeForce RTX 4080 SUPER 16 GB; models Qwen3.8-Flash-Next NVFP4 (Maximilian228 repo) and Coder IQ1_M (GSQ-RCO, 2-file GGUF); LAN access mode; variants installed over several sessions: IQ1_M 128K, IQ1_M 128K (second), IQ1_M 256K, NVFP4 128K, NVFP4 256K.
Observed evidence (verbatim, paths trimmed at the repeated segment):
/home/<user>/.local/share/strata/Strata-data/models/models/models/…/coder-IQ1_M/Qwen3.8-Flash-Next-GSQ-RCO-IQ1_M-00001-of-00002.gguf— thefindover the data folder counted the chain at ~200modelslevels; the serving config for one profile pointed at…/Strata-data/models/Maximilian228--Qwen3.8-Flash-Next-NVIDIA-NVFP4-Strata/pack, which no longer existed at that path.strata models listprinted all three variantsmissing_or_invalid. Each new-variant install added exactly one level (five installs over two sessions).Reproduce: Not reproduced from clean. Attempts with an isolated
--data-dirand--model-pathpointing at existing files did not nest: two consecutivestrata launch --model-path <dir> --data-dir /tmp/t --access lan --port 8090 --api-key K --yes --no-tuiruns from different working directories produced a singlemodelslevel both times (commands verbatim above in this session). What is unit-proven on the attached tests: once one duplicate level exists, the olddata_dir_of()returns the innermodelsdir as the data folder (NestedModelsDirs::test_data_dir_of_resolves_to_the_outer_data_folderfails on the old code, passes on the new), and the next install then downloads one level deeper. The first duplicate's origin is unconfirmed; suspected in the installer's data-folder resolution when a previous install's weights sit nested.Expected: the data folder for an installed model is the folder holding the outermost
modelsdir; installs reuse it.Actual (old code): the innermost
modelsdir is returned as the data folder; installs nest one level per new variant; buried presets fail install validation.Approach: in
data_dir_of()andprepared_beside(), climb past consecutivemodels-named ancestors before returningparent.parent.prepared_besideadditionally searches everymodelsdir of the chain formmproj*.ggufso existing nested installs keep finding the picture reader. Flat layouts resolve exactly as before; no caller changes.Recovery applied on the reporting machine (all verified):
mv <deep>/coder-IQ1_M <data>/coder-IQ1_M(same filesystem, instant), remove the now-empty nest,strata models listflips topresent, relaunch with the preset, serve verified end to end.Validation:
Passed:
python3.11 -m pytest tests/terminal/test_discovery.py -q→ 23 passed (4 new: nested and flat fordata_dir_ofandprepared_beside), revisionbe55ec3, macOS 15, Python 3.11.17, no GPU needed (pure path logic).Passed (live): after recovery and on the deployed patch (installed Terminal 0.1.45.3 on the reporting machine, Linux/CUDA),
strata models list→coder-iq1_m present, server restart serves with the configured API key, one chat completion verified end to end.Failed: 2 pre-existing failures in the same file on clean HEAD (
GuiLayout::test_an_own_setting_beats_the_apps_folder,GuiLayout::test_a_remembered_older_install_and_the_app_install_are_both_listed). Reproduced with the change stashed; unrelated to this fix (own-setting resolution ordering in the test environment).Not run: CUDA/HIP/SYCL builds (no engine or C++ change; strata_control/serve Python only). Re-download of the NVFP4 files deleted during manual cleanup (the preset resumes it).
Limits: a pathological chain made only of
modelsdirs up to the filesystem root now resolves to/; every real install chain terminates at aStrata-datafolder. The first duplicate level's origin is unconfirmed (see Reproduce).🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.