Skip to content

strata_pack.py build --force: unmake the old pack before writing, so a build that stops part-way is an unfinished build, not a pack (#634 follow-up) - #1176

Closed
Avicennasis wants to merge 1 commit into
Niko1221:mainfrom
Avicennasis:fix/pack-force-clears-markers
Closed

Avicennasis wants to merge 1 commit into
Niko1221:mainfrom
Avicennasis:fix/pack-force-clears-markers

Conversation

@Avicennasis

Copy link
Copy Markdown
Contributor

Follow-up to #634 and 4f4c923's --force, a small one.

--force builds into a directory that already holds a pack, and setup passes it when a pack lost its index.txt or experts.bin. The old pack's files stay until the build overwrites each one, so a forced build that stops part-way (a pack that had lost experts.bin, the rebuild interrupted inside the new one) leaves the old index.txt and manifest.json over a partial experts.bin. setup's "index.txt and experts.bin are there" check accepts that directory and does not build it again.

Now --force removes the pack's markers (manifest.json, index.txt, native_experts.txt) after the mkdir and before the GGUF is opened, so a forced build that stops part-way leaves experts.bin without a manifest.json: an unfinished build, which the next build or setup makes again (your test_unfinished_build_is_rebuilt). The data files are left to the build, which opens each one "wb". A complete forced build ends in the same files as before: manifest.json last, index.txt from pack_index.py after it. tools/test_shards.py passes as a whole; the new test fails on main with the markers still there.

…a build that stops part-way is an unfinished build, not a pack (Niko1221#634 follow-up)

--force builds into a directory that already holds a pack, and setup passes it when a pack lost its index.txt or
experts.bin.  The old pack's files stayed where they were until the build overwrote each one, so a forced build
that stopped part-way - a pack that had lost experts.bin, the rebuild interrupted inside the new one - left the
old index.txt and manifest.json over a partial experts.bin.  setup's "index.txt and experts.bin are there"
check accepts that directory and does not build it again.

Now --force removes the pack's markers (manifest.json, index.txt, native_experts.txt) after the mkdir and before
the GGUF is opened: a forced build that stops part-way leaves experts.bin without a manifest.json - an unfinished
build, which the next build or setup makes again.  The data files are left to the build, which opens each one
"wb" and rewrites it.  A complete forced build ends in the same files as before: manifest.json last, index.txt
from pack_index.py after it.
Niko1221 pushed a commit that referenced this pull request Oct 7, 2026
…a build that stops part-way is an unfinished build, not a pack (#1176)

--force now removes the old pack's markers (index.txt, manifest.json) before the build writes a byte. A forced build
that stops part-way leaves experts.bin without a manifest, which the next build or setup makes again, instead of the
old markers over partly new experts.
@Niko1221

Niko1221 commented Oct 7, 2026

Copy link
Copy Markdown
Owner

Thank you, Avicennasis. strata_pack.py build --force now unmakes the old pack first. It is in 0.1.40.2 with your authorship kept.

@Niko1221 Niko1221 closed this Oct 7, 2026
0xrjman pushed a commit to 0xrjman/Strata that referenced this pull request Oct 7, 2026
…a build that stops part-way is an unfinished build, not a pack (Niko1221#1176)

--force now removes the old pack's markers (index.txt, manifest.json) before the build writes a byte. A forced build
that stops part-way leaves experts.bin without a manifest, which the next build or setup makes again, instead of the
old markers over partly new experts.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants