mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[PR #324] [CLOSED] fix(setup): install the engine, model files and packages the checkout was tested with #2577
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#2577
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/324
Author: @alphastorm
Created: 10/1/2026
Status: ❌ Closed
Base:
main← Head:fix/214-reproducible-setup📝 Commits (1)
4cc288ffix(setup): install the engine, model files and packages the checkout was tested with📊 Changes
5 files changed (+227 additions, -32 deletions)
View changed files
📝
Dockerfile(+1 -2)➕
requirements.txt(+21 -0)📝
setup.py(+47 -28)📝
tools/mtp_fetch.py(+12 -2)➕
tools/test_setup_sources.py(+146 -0)📄 Description
Fixes #214.
Setup installed whatever was newest when it ran: the engine from
releases/latest, the model files, vision encoder and MTP tensors from each Hugging Face repo'smain, and the Python packages without versions. With this change a checkout installs the same components on every run.Change
get_prebuilt): by default the ready-made engine comes from the release matching the checkout,releases/download/v<CMakeLists.txt version>/. Setup falls back toreleases/latest/download/only on a 404 there, meaning there is no such release or no asset for this system. Any other error (no internet, a rate limit, a 5xx) is handled as before: compile, or keep the installed engine when updating.--prebuilt/STRATA_PREBUILT_URLis used as given, without a fallback, and--prebuilt ""still means no ready-made engine.PREBUILT_URLbecomesRELEASES.engine/<asset>is deleted as soon as it is unpacked, including when setup refuses it. Before, a refused archive (older thanMIN_ENGINE, or without code for the GPU) stayed behind with its.donemark, and every later run reused it instead of downloading again. So the update path's advice to "run this again in a few minutes" (#58) could not work until the zip was deleted by hand, and with two candidate URLs one release's archive would be reused for the other.hf/mmproj_hfURL inFAMILIES, andREPOintools/mtp_fetch.py, names a commit instead ofmain. The commits are the four repos' current heads, unchanged since 2026-09-29 or earlier: Qwen GGUFed59f92, Swiftb22d729, Coder5348543and the BF16 checkpointde4b8e4. The files are therefore the ones setup downloads today. The unusedHFconstant is removed.mtp_fetch.fetchreusesmtp-inventory.jsononly if it was read from the pinnedREPO. Otherwise it reads the inventory again and dropstensors/, because resuming a tensor by its size could join bytes from two commits. Setup runs it only untilmtp/rt/experts.binexists, so finished installs are not affected.requirements.txtpins the ten packages and their dependencies (16 in all) to exact versions.setup.pyinstalls it withpip install -r, and the Dockerfile installs the same file.pip_installcompares the file's lines with.strata-pip.json, so a changed pin installs again. An existing venv, whose stamp lists the bare names, installs the pins once on its next setup run.--require-hasheswould need every platform's wheel hashes for each package.Behavior changes
Tests (
python -m unittest tools.test_setup_sources, no network)Engine: the checkout's release; the newest release after a 404; a 503 compiles instead of taking another release;--prebuiltis taken as given, as is--prebuilt ""; a refused archive is not reused.Requirements: every line is an exact version; a changed pin installs again.HuggingFace: every URL names a 40-hex commit. An MTP inventory from the pinned commit is reused; one from another commit is read again, and its tensors are dropped.On
30ec18e(0.1.30) the new module fails to import (setup.RELEASES). With the change it passes (10 tests). Every existing Python test module gives the same result as on30ec18e: 158 tests, 5 skipped, withSTRATA_GGUF_PYset fortools.test_iq_pack. This was on Python 3.13.15, macOS arm64. ruff and pyright report nothing new in the changed files.Also checked
get_prebuiltanddownloadran over a local--prebuiltfolder that first held a 0.1.0 engine and then a 0.1.30 one. On 0.1.30 the second run prints "Strata engine already downloaded" and refuses the 0.1.0 archive again. With the change it installs 0.1.30.download/v0.1.30/strata-windows-x64.zip;download/v0.1.27/…;latest/download/…;Content-Lengthequal to the size in the repo's file tree). So do the BF16 checkpoint's index and an MTP shard. At these commits the Qwen and Coder shard 2 files are identical (same SHA-256), and so are their vision encoders. The shard-2 hardlink and the shared encoder path still hold.pip install --dry-run --only-binary=:all:installs exactly the pinned set. It ran with each Python's own pip in a fresh venv (3.10 to 3.14, pip 23.0.1 to 26.2.1), forwin_amd64and for manylinux up to glibc 2.28.uv pip compilewith each target's markers gives the same set, so no dependency is left unpinned.setup.pip_install(REQUIREMENTS)installs exactly the pins and skips the second call.ubuntu:24.04amd64 (the CUDA image's Ubuntu and Python 3.12) installs the file, and the imports work.Not run: a GPU, a real engine or model download,
START-HERE.baton Windows, or a fulldocker build.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.