From d7b57766195fca342ca7d15a26038be8efc0cf48 Mon Sep 17 00:00:00 2001 From: ditsuke Date: Tue, 27 Feb 2024 00:52:51 +0530 Subject: [PATCH] build(python): Relax pytorch version constraint Nix has an older version --- .devops/nix/package-gguf-py.nix | 4 +++- .devops/nix/python-scripts.nix | 1 + .devops/nix/scope.nix | 4 ++++ gguf-py/pyproject.toml | 1 + pyproject.toml | 2 +- 5 files changed, 10 insertions(+), 2 deletions(-) diff --git a/.devops/nix/package-gguf-py.nix b/.devops/nix/package-gguf-py.nix index 24b42d446..dad2b41ab 100644 --- a/.devops/nix/package-gguf-py.nix +++ b/.devops/nix/package-gguf-py.nix @@ -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" diff --git a/.devops/nix/python-scripts.nix b/.devops/nix/python-scripts.nix index fa0d60654..119fee99b 100644 --- a/.devops/nix/python-scripts.nix +++ b/.devops/nix/python-scripts.nix @@ -17,6 +17,7 @@ let protobuf torchWithoutCuda gguf-py + tqdm ]; in diff --git a/.devops/nix/scope.nix b/.devops/nix/scope.nix index 6480fcaef..9d353f15d 100644 --- a/.devops/nix/scope.nix +++ b/.devops/nix/scope.nix @@ -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 ; diff --git a/gguf-py/pyproject.toml b/gguf-py/pyproject.toml index eea381e5a..33cfe26b7 100644 --- a/gguf-py/pyproject.toml +++ b/gguf-py/pyproject.toml @@ -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" diff --git a/pyproject.toml b/pyproject.toml index 25e2e20b2..84e71de6d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -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" }