Pull requests / #1176

#1176 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)

closed · @Avicennasis · 0 评论 · 在 GitHub 查看

Setup & installModels & quants

描述

Follow-up to #634 and 4f4c923c'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.

站内延伸阅读

链到安装、模型与版本说明,便于 SEO/GEO,非官方 issue 正文。