mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[PR #3228] [CLOSED] [Other] setup: install the FP4-Local converter's packages before a prepare #4509
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#4509
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/3228
Author: @Yunado
Created: 10/19/2026
Status: ❌ Closed
Base:
main← Head:fix/nvfp4-local-converter-deps📝 Commits (1)
29514b2setup: install the FP4-Local converter's packages before a prepare📊 Changes
3 files changed (+19 additions, -1 deletions)
View changed files
➕
requirements-nvfp4-local.txt(+7 -0)📝
setup.py(+4 -0)📝
tools/nvfp4_local_pack.py(+8 -1)📄 Description
Fixes #3227
The problem and the result. A fresh source install that picks NVIDIA's FP4-Local model dies at step 6 of SETUP with
ModuleNotFoundError: No module named 'transformers', after ~20 minutes of the 102 GB checkpoint has already been read by the PLE step:nvfp4_local_pack.py prepareimports llama.cpp's converter, which needs torch, transformers and safetensors, but setup.py's package step only installs the eight runtime packages of requirements.txt. With this change the same setup completes without the user ever opening a terminal: the packages are installed through the existingpip_install(same pinned-requirements, stamp-skip behavior as requirements-build.txt) immediately before a prepare that actually runs, and the tool run by hand now names the missing package and points at the requirements file instead of a raw traceback.The approach. Three files, mirroring the
BUILD_REQUIREMENTSprecedent:requirements-nvfp4-local.txt(new): the three packages pinned to the versions this PC converted with (torch 2.14.1, transformers 5.20.2, safetensors 0.8.0).setup.py:pip_install(requirement_lines(NVFP4_LOCAL_REQUIREMENTS) ...)inside theprepared and not prepared_donebranch, so a prepared pack, a ready-made model and every other model never touch the venv.tools/nvfp4_local_pack.py: the lazy converter import catchesModuleNotFoundErrorfor exactly those three names and exits with the fix-it command; any other missing module propagates unchanged.Validation.
py_compileon both edited files; both branches of the tool message checked by importing the module with an injected stub that raisesModuleNotFoundErrorfortransformers(human-readable SystemExit) and for an unrelated name (propagates); the whole setup suitetools/test_setup_*.py, 51 of 54 files OK on this PC.test_setup_download.py,test_setup_engine_hash.pyandtest_setup_golden.pyfail identically on the untouched checkout of the same revision on this host (they assert against a pristine temp tree; this clone has a realengine\install), confirmed by a stash baseline run..venvend-to-end FP4-Local install on a clean machine (this PC's pack is built and serving). The original crash of #3227 is the exact scenario this opens up; the packages it installs are the ones that completed the conversion here.Limits. The pins follow today's conversion environment; a future torch/transformers bump needs the same care the other requirements files take. On Linux pip's default torch wheel carries CUDA libraries (~2 GB); the conversion itself runs on the CPU. No engine or serving code is touched; the default path (any model other than FP4-Local) is byte-identical.
Environment: tested at
e88ee39d(v0.2.0-beta-12), Windows 11 Pro, Python 3.12.0 venv, RTX 5090 + RTX 3070, 96 GB RAM.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.