mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[PR #3285] [CLOSED] [Other] Honor STRATA_INSTALL_DIR when locating gguf-py #4545
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#4545
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/3285
Author: @hulkbig
Created: 10/19/2026
Status: ❌ Closed
Base:
main← Head:fix/gguf-install-dir-3269📝 Commits (1)
4abf1daHonor STRATA_INSTALL_DIR when locating gguf-py📊 Changes
2 files changed (+100 additions, -3 deletions)
View changed files
📝
tools/_paths.py(+6 -3)➕
tools/test_paths.py(+94 -0)📄 Description
Problem and result
When
STRATA_INSTALL_DIRpoints to an existing Control installation, standalone tools still fail to find itsthird_party/llama.cpp/gguf-pydirectory unlessSTRATA_GGUF_PYis also set. Control-mode setup writes that dependency beneath its install home, but_paths.pyonly checks the explicit GGUF override, source tree and development tree.The helper now checks the configured install directory. An isolated reproduction using empty temporary directories goes from the reported missing-gguf-py
SystemExitto returning the installed path.Related discussion
Refs #3269. This implements the report's suggestion to check
$STRATA_INSTALL_DIR/third_party/llama.cpp/gguf-py.Approach
Keep
STRATA_GGUF_PYfirst, then checkSTRATA_INSTALL_DIR, followed by the existing source/development fallbacks. A candidate still needs aggufdirectory. WithSTRATA_INSTALL_DIRunset or empty, the existing lookup order is unchanged.The new stdlib-only tests load
_paths.pydirectly and use temporary directory trees and process-local environment patches. They require no gguf package or model files.Validation
Linux x86_64, Python 3.12.14. Base:
e88ee39d1d6be6e3364183af3b39b62a7ed6f211. Tested candidate tree:20c39f7e709d092363fb5918e70695ab1b5b8eac.Passed:
python3 -I -S -B tools/test_paths.py -v: 10/10 on the candidate.python3 -I -S -B -m unittest discover -s tools -p test_paths.py -v: 10/10 on the candidate.git diff --cached --check: clean.Failed:
python3 -I -S -B tools/test_paths.py -v: 7 passed, 1 assertion failure and 2SystemExiterrors. All three failures concern the configured install directory: finding it alone, selecting it before source/development copies, and falling back to it from an absent explicit GGUF path.Not run:
iq_pack.py, setup, actual gguf imports, model conversion, packaged-Control integration or the full repository suite.Limits
STRATA_INSTALL_DIRmust be set. This does not automatically discover a default per-user installation when the variable is absent, so it does not claim to fix every unpacked-package case in #3269. Setup already suppliesSTRATA_GGUF_PYto its preparation subprocesses; this change concerns standalone discovery.AI-assisted implementation and test preparation.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.