Repository navigation
fix: require torch>=2.6 and torchvision>=0.21 so pip installs upgrade them - #949
Open
cristian-tamblay wants to merge 1 commit into
Open
cristian-tamblay wants to merge 1 commit into
cristian-tamblay wants to merge 1 commit into
Conversation
… them transformers 5.20 disables torch below 2.6 at import time, and pyproject declared torch and torchvision without a minimum. Installs that resolve from pyproject (pip install -e ., uv pip install -e ., pip install --upgrade dashai) kept an already installed torch 2.4.1, so the app booted but no HuggingFace model could run. uv sync was unaffected: the lock pins a compatible pair.
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Installs that resolve dependencies from
pyproject.toml(pip install -e .anduv pip install -e ., which is whatupdate-server.shruns, andpip install --upgrade dashaifrom PyPI) silently lose every HuggingFace model when the environment already has an older torch.transformers>=5.0.0has been required since e093c54 (2026-08-24, SAM 3) and shipped in 0.10.0, buttorchandtorchvisionhad no minimum. On an environment with torch 2.4.1 already installed, the installer upgrades transformers to the current 5.20 and keeps torch, because a baretorchis satisfied. transformers 5.20 then refuses that torch at import time:The app boots and answers normally; text, translation, embedding and image models just cannot run. This is what a server updated with
update-server.shon 2026-10-23 hit.uv syncwas never affected: the lock pins torch 2.11.0+cu128 / 2.13.0 with transformers 5.15.1, a compatible pair. Neither were the PyInstaller bundles or the AppImage, which build from a fresh environment.Type of Change
Check all that apply like this [x]:
Changes (by file)
pyproject.toml:torch>=2.6andtorchvision>=0.21(the torchvision release paired with torch 2.6), with a comment on why the minimum exists.uv.lock: only the twospecifierentries of the project's own requirements. No resolved version changes;uv lock --checkpasses.Testing
Dry runs of
uv pip install --dry-run -e .in a venv where torch 2.4.1 and torchvision 0.19.1 appear as installed (stub.dist-infometadata, the same thing the resolver reads on the server):torch 2.4.1 -> 2.14.1andtorchvision 0.19.1 -> 0.29.1are upgraded.Notes
pip install dashaiwill now fail to resolve instead of installing a torch that transformers 5 disables anyway. The README already states there is no Intel build and the publish job for it iscontinue-on-error.