build(python): Relax pytorch version constraint

Nix has an older version
This commit is contained in:
ditsuke 2024-02-27 00:52:51 +05:30
parent ef2dae9249
commit d7b5776619
No known key found for this signature in database
GPG key ID: 71B6C31C8A5A9D21
5 changed files with 10 additions and 2 deletions

View file

@ -2,6 +2,8 @@
lib,
llamaVersion,
numpy,
tqdm,
sentencepiece,
poetry-core,
buildPythonPackage,
pytestCheckHook,
@ -12,7 +14,7 @@ buildPythonPackage {
version = llamaVersion;
pyproject = true;
nativeBuildInputs = [ poetry-core ];
propagatedBuildInputs = [ numpy ];
propagatedBuildInputs = [ numpy tqdm sentencepiece ];
src = lib.cleanSource ../../gguf-py;
pythonImportsCheck = [
"numpy"

View file

@ -17,6 +17,7 @@ let
protobuf
torchWithoutCuda
gguf-py
tqdm
];
in

View file

@ -9,6 +9,8 @@ let
pythonPackages = python3.pkgs;
buildPythonPackage = pythonPackages.buildPythonPackage;
numpy = pythonPackages.numpy;
tqdm = pythonPackages.tqdm;
sentencepiece = pythonPackages.sentencepiece;
poetry-core = pythonPackages.poetry-core;
pytestCheckHook = pythonPackages.pytestCheckHook;
in
@ -24,6 +26,8 @@ lib.makeScope newScope (self: {
inherit
buildPythonPackage
numpy
tqdm
sentencepiece
poetry-core
pytestCheckHook
;

View file

@ -23,6 +23,7 @@ python = ">=3.8"
numpy = ">=1.17"
tqdm = ">=4.27"
pyyaml = ">=5.1"
sentencepiece = ">=0.1.98,<=0.2.0"
[tool.poetry.dev-dependencies]
pytest = "^5.2"

View file

@ -17,7 +17,7 @@ classifiers = [
[tool.poetry.dependencies]
python = ">=3.9"
numpy = "^1.25.0"
sentencepiece = ">=0.1.98,<0.2.0"
sentencepiece = ">=0.1.98,<=0.2.0"
transformers = ">=4.35.2,<5.0.0"
protobuf = ">=4.21.0,<5.0.0"
gguf = { path = "./gguf-py" }