[PR #570] [CLOSED] setup: a read-only --gguf-dir no longer stops setup when marking checked shards #2698

Closed
opened 2026-11-04 02:02:27 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Niko1221/Strata/pull/570
Author: @gputier
Created: 10/3/2026
Status: ❌ Closed

Base: main ← Head: pr/gguf-readonly-0.1.37


📝 Commits (10+)

  • 872af82 Low-RAM mode, resident variant: the experts the GPU does not hold stay in RAM (--resident-experts), chosen by setup
  • 483953f Merge f-84 into rel-0.1.30
  • 7e4ee54 setup: the resident low-RAM variant keeps its RAM copy pageable on ROCm (STRATA_RESIDENT_PIN=0 in the config's env)
  • 1afdd47 Merge f-coupled into rel-0.1.30
  • 0704e7d HIP: enable RDNA4 gfx1201 (RX 9070 / AI PRO R9700)
  • 8616c60 generate: the option parser's else-if chain in two statements (MSVC C1061: more than 128 nested blocks after the new options); the same order and effects
  • 538a0df Merge f-resram into rel-0.1.30
  • 703ef30 Merge f-189 (PR #189, the conversation snapshot core and RAM cache) into rel-0.1.30
  • e46ccca Conversation snapshots and checkpoints follow the session carve (#216): a session saves and restores only the layers it owns
  • 9907379 HIP: RDNA4 gfx1201 beside gfx1100; the startup check compares the card with the compiled archs; setup picks ROCm and the hipBLASLt table per arch

📊 Changes

2 files changed (+30 additions, -1 deletions)

View changed files

📝 setup.py (+4 -1)
📝 tools/test_setup_choices.py (+26 -0)

📄 Description

With --gguf-dir pointing at a folder setup cannot write to (a share, a read-only mount), shards that are whole but have no .done mark reach mark() in the loop at setup.py:3319-3321. mark() writes <shard>.done, the write raises an OSError, and setup stops with a traceback, although the files are fine and have_model already accepts a --gguf-dir shard without a mark (done(s) or a.gguf_dir).

The mark is now written inside a try, and an OSError becomes a warning: <shard> is whole but its finish mark cannot be written (<error>). Setup goes on.

Test: ReadOnlyGgufDir in tools/test_setup_choices.py runs setup.main() through the existing install() helper with two empty shard files in a --gguf-dir, whole_shard forced to True and mark raising PermissionError for paths under that folder. On v0.1.37 the PermissionError comes out of setup. With the change, setup exits 0 and prints the warning. The read-only folder is simulated with the mock, not a real read-only mount.

Python suite in a python:3.12-slim container: 416 passed, 47 failed, the same 47 as on a clean v0.1.37 (on Linux setup.EXE is "strata", which breaks tools/test_setup_golden.py's normalize() and test_prebuilt_hip_zip). With EXE forced to "strata.exe": 417 passed, none failed.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/Niko1221/Strata/pull/570 **Author:** [@gputier](https://github.com/gputier) **Created:** 10/3/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `pr/gguf-readonly-0.1.37` --- ### 📝 Commits (10+) - [`872af82`](https://github.com/Niko1221/Strata/commit/872af82983d53de7c754ead79f4599606d3a40e8) Low-RAM mode, resident variant: the experts the GPU does not hold stay in RAM (--resident-experts), chosen by setup - [`483953f`](https://github.com/Niko1221/Strata/commit/483953fdc15ed86808d714573b87634f43c3f1ea) Merge f-84 into rel-0.1.30 - [`7e4ee54`](https://github.com/Niko1221/Strata/commit/7e4ee54288051d3a71e403df4e8db455f64d38dc) setup: the resident low-RAM variant keeps its RAM copy pageable on ROCm (STRATA_RESIDENT_PIN=0 in the config's env) - [`1afdd47`](https://github.com/Niko1221/Strata/commit/1afdd47161726eb013c4533fc0a83c1cd9e58297) Merge f-coupled into rel-0.1.30 - [`0704e7d`](https://github.com/Niko1221/Strata/commit/0704e7dc85084761c5ca20008d226a99279a9805) HIP: enable RDNA4 gfx1201 (RX 9070 / AI PRO R9700) - [`8616c60`](https://github.com/Niko1221/Strata/commit/8616c60974d6cae71c8af582255cde15506ed19c) generate: the option parser's else-if chain in two statements (MSVC C1061: more than 128 nested blocks after the new options); the same order and effects - [`538a0df`](https://github.com/Niko1221/Strata/commit/538a0dfa4bd974e9687df6a5514250675369942c) Merge f-resram into rel-0.1.30 - [`703ef30`](https://github.com/Niko1221/Strata/commit/703ef3044e67a0adbd26f3a264f90ae83c801524) Merge f-189 (PR #189, the conversation snapshot core and RAM cache) into rel-0.1.30 - [`e46ccca`](https://github.com/Niko1221/Strata/commit/e46ccca49c89fb725f521ff6671a6b12e8d7d7b9) Conversation snapshots and checkpoints follow the session carve (#216): a session saves and restores only the layers it owns - [`9907379`](https://github.com/Niko1221/Strata/commit/99073795e377c6eb52ad5cce8fd6d70d7937f52d) HIP: RDNA4 gfx1201 beside gfx1100; the startup check compares the card with the compiled archs; setup picks ROCm and the hipBLASLt table per arch ### 📊 Changes **2 files changed** (+30 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `setup.py` (+4 -1) 📝 `tools/test_setup_choices.py` (+26 -0) </details> ### 📄 Description With `--gguf-dir` pointing at a folder setup cannot write to (a share, a read-only mount), shards that are whole but have no `.done` mark reach `mark()` in the loop at setup.py:3319-3321. `mark()` writes `<shard>.done`, the write raises an OSError, and setup stops with a traceback, although the files are fine and `have_model` already accepts a `--gguf-dir` shard without a mark (`done(s) or a.gguf_dir`). The mark is now written inside a try, and an OSError becomes a warning: `<shard> is whole but its finish mark cannot be written (<error>)`. Setup goes on. Test: `ReadOnlyGgufDir` in tools/test_setup_choices.py runs setup.main() through the existing `install()` helper with two empty shard files in a `--gguf-dir`, `whole_shard` forced to True and `mark` raising PermissionError for paths under that folder. On v0.1.37 the PermissionError comes out of setup. With the change, setup exits 0 and prints the warning. The read-only folder is simulated with the mock, not a real read-only mount. Python suite in a python:3.12-slim container: 416 passed, 47 failed, the same 47 as on a clean v0.1.37 (on Linux `setup.EXE` is "strata", which breaks tools/test_setup_golden.py's `normalize()` and `test_prebuilt_hip_zip`). With `EXE` forced to "strata.exe": 417 passed, none failed. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-04 02:02:27 +07:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Niko1221/Strata#2698
No description provided.