[PR #4989] [Other] Measure free space on the drive that receives the files #5279

Open
opened 2026-11-07 16:34:01 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Niko1221/Strata/pull/4989
Author: @zapabob
Created: 11/2/2026
Status: 🔄 Open

Base: main ← Head: fix/gguf-dir-disk-on-data-dir


📝 Commits (2)

  • 9cf1802 Setup: measure free space on the drive that receives the files.
  • c02303b Merge upstream/main into fix/gguf-dir-disk-on-data-dir

📊 Changes

5 files changed (+549 additions, -53 deletions)

View changed files

📝 setup.py (+129 -49)
➕ tools/test_setup_disk_destinations.py (+411 -0)
📝 tools/test_setup_dsv41.py (+4 -1)
📝 tools/test_setup_qwen36.py (+3 -1)
📝 tools/test_setup_unsloth.py (+2 -2)

📄 Description

Problem and result

Setup judged free disk space on the folder named by --gguf-dir, even when that folder was only the source of files already in hand and the bytes still to be written belonged on --data-dir / --models-dir.

After this update:

  • Free-space checks follow the volumes that will actually receive writes, grouped by filesystem (same_drive()).
  • Existing GGUF remains an input; missing owned files are reported before capacity errors. Setup does not download into --gguf-dir.
  • Partial downloads count completed chunk ranges only; sparse holes are not treated as downloaded space.
  • Picture reuse tries every sibling hardlink candidate before checking copy capacity. Picture-disabled engines still skip unused picture files.
  • Main's DeepSeek DSV41_CONTEXT / 128K warning is preserved (the old 64K/4K/8K text is not restored).

Approach

Merge current upstream main (ffa80d73) into fix/gguf-dir-disk-on-data-dir, resolve the setup.py conflict by keeping main's context warning and integrating destination-based capacity accounting, and add focused regression coverage. No force-push.

Validation

Passed (this update, Windows 11 / Python 3.12):

  • py -3 -m unittest tools.test_setup_disk_destinations — 32 passed
  • py -3 -m unittest discover -s tests/terminal -p test_download_dedup.py — 12 passed
  • py -3 -m compileall on changed Python files — ok
  • Candidate file SHA-256 matched the reviewed package hashes

Earlier Linux package evidence (not re-run here): target suite 246 passed / same 4 known failures as baseline; adjacent suite 124 passed / same 4 known failures.

Author's earlier Windows report on old head: 198 passed / 5 failed (engine-feed availability). Separate from this update.

Not run: Windows junctions/UNC live volumes, live model download/resume, GPU inference, full backend builds.

Limits

Capacity checks are preflight estimates, not a full reservation of every setup write. Windows native volume edge cases remain a follow-up gate.


🔄 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/4989 **Author:** [@zapabob](https://github.com/zapabob) **Created:** 11/2/2026 **Status:** 🔄 Open **Base:** `main` ← **Head:** `fix/gguf-dir-disk-on-data-dir` --- ### 📝 Commits (2) - [`9cf1802`](https://github.com/Niko1221/Strata/commit/9cf18021b840c1d7c2335a99f8444aa16be49396) Setup: measure free space on the drive that receives the files. - [`c02303b`](https://github.com/Niko1221/Strata/commit/c02303b4d31b7062289dc7595b736c8465112157) Merge upstream/main into fix/gguf-dir-disk-on-data-dir ### 📊 Changes **5 files changed** (+549 additions, -53 deletions) <details> <summary>View changed files</summary> 📝 `setup.py` (+129 -49) ➕ `tools/test_setup_disk_destinations.py` (+411 -0) 📝 `tools/test_setup_dsv41.py` (+4 -1) 📝 `tools/test_setup_qwen36.py` (+3 -1) 📝 `tools/test_setup_unsloth.py` (+2 -2) </details> ### 📄 Description ## Problem and result Setup judged free disk space on the folder named by `--gguf-dir`, even when that folder was only the source of files already in hand and the bytes still to be written belonged on `--data-dir` / `--models-dir`. After this update: - Free-space checks follow the volumes that will actually receive writes, grouped by filesystem (`same_drive()`). - Existing GGUF remains an input; missing owned files are reported before capacity errors. Setup does not download into `--gguf-dir`. - Partial downloads count completed chunk ranges only; sparse holes are not treated as downloaded space. - Picture reuse tries every sibling hardlink candidate before checking copy capacity. Picture-disabled engines still skip unused picture files. - Main's DeepSeek `DSV41_CONTEXT` / 128K warning is preserved (the old 64K/4K/8K text is not restored). ## Approach Merge current upstream `main` (`ffa80d73`) into `fix/gguf-dir-disk-on-data-dir`, resolve the `setup.py` conflict by keeping main's context warning and integrating destination-based capacity accounting, and add focused regression coverage. No force-push. ## Validation **Passed (this update, Windows 11 / Python 3.12):** - `py -3 -m unittest tools.test_setup_disk_destinations` — 32 passed - `py -3 -m unittest discover -s tests/terminal -p test_download_dedup.py` — 12 passed - `py -3 -m compileall` on changed Python files — ok - Candidate file SHA-256 matched the reviewed package hashes **Earlier Linux package evidence (not re-run here):** target suite 246 passed / same 4 known failures as baseline; adjacent suite 124 passed / same 4 known failures. **Author's earlier Windows report on old head:** 198 passed / 5 failed (engine-feed availability). Separate from this update. **Not run:** Windows junctions/UNC live volumes, live model download/resume, GPU inference, full backend builds. ## Limits Capacity checks are preflight estimates, not a full reservation of every setup write. Windows native volume edge cases remain a follow-up gate. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
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#5279
No description provided.