From a68031a4a94d547864c2b1a63108735d87a271c9 Mon Sep 17 00:00:00 2001 From: Lev Kokotov Date: Fri, 17 May 2024 01:12:25 -0700 Subject: [PATCH 1/3] A few fixes --- pgml-extension/Cargo.lock | 2 +- pgml-extension/requirements.py312.txt | 80 ++++++++++++++++++++ pgml-extension/src/bindings/python/mod.rs | 3 +- pgml-extension/src/bindings/python/python.py | 2 +- 4 files changed, 84 insertions(+), 3 deletions(-) create mode 100644 pgml-extension/requirements.py312.txt diff --git a/pgml-extension/Cargo.lock b/pgml-extension/Cargo.lock index 8dbfba0f1..17d8b8a3a 100644 --- a/pgml-extension/Cargo.lock +++ b/pgml-extension/Cargo.lock @@ -1746,7 +1746,7 @@ dependencies = [ [[package]] name = "pgml" -version = "2.8.4" +version = "2.8.5" dependencies = [ "anyhow", "blas", diff --git a/pgml-extension/requirements.py312.txt b/pgml-extension/requirements.py312.txt new file mode 100644 index 000000000..acfbd5511 --- /dev/null +++ b/pgml-extension/requirements.py312.txt @@ -0,0 +1,80 @@ +accelerate==0.30.1 +aiohttp==3.9.5 +aiosignal==1.3.1 +attrs==23.2.0 +certifi==2024.2.2 +charset-normalizer==3.3.2 +colorama==0.4.6 +datasets==2.19.1 +dill==0.3.8 +docstring_parser==0.16 +evaluate==0.4.2 +filelock==3.14.0 +frozenlist==1.4.1 +fsspec==2024.3.1 +huggingface-hub==0.23.0 +idna==3.7 +Jinja2==3.1.4 +joblib==1.4.2 +lightgbm==4.3.0 +lxml==5.2.2 +markdown-it-py==3.0.0 +MarkupSafe==2.1.5 +mdurl==0.1.2 +mpmath==1.3.0 +multidict==6.0.5 +multiprocess==0.70.16 +networkx==3.3 +numpy==1.26.4 +nvidia-cublas-cu12==12.1.3.1 +nvidia-cuda-cupti-cu12==12.1.105 +nvidia-cuda-nvrtc-cu12==12.1.105 +nvidia-cuda-runtime-cu12==12.1.105 +nvidia-cudnn-cu12==8.9.2.26 +nvidia-cufft-cu12==11.0.2.54 +nvidia-curand-cu12==10.3.2.106 +nvidia-cusolver-cu12==11.4.5.107 +nvidia-cusparse-cu12==12.1.0.106 +nvidia-nccl-cu12==2.20.5 +nvidia-nvjitlink-cu12==12.4.127 +nvidia-nvtx-cu12==12.1.105 +orjson==3.10.3 +packaging==24.0 +pandas==2.2.2 +peft==0.11.0 +pillow==10.3.0 +portalocker==2.8.2 +psutil==5.9.8 +pyarrow==16.1.0 +pyarrow-hotfix==0.6 +Pygments==2.18.0 +python-dateutil==2.9.0.post0 +pytz==2024.1 +PyYAML==6.0.1 +regex==2024.5.15 +requests==2.31.0 +rich==13.7.1 +rouge==1.0.1 +sacrebleu==2.4.2 +safetensors==0.4.3 +scikit-learn==1.4.2 +scipy==1.13.0 +sentence-transformers==2.7.0 +setuptools==69.5.1 +shtab==1.7.1 +six==1.16.0 +sympy==1.12 +tabulate==0.9.0 +threadpoolctl==3.5.0 +tokenizers==0.19.1 +torch==2.3.0 +tqdm==4.66.4 +transformers==4.40.2 +trl==0.8.6 +typing_extensions==4.11.0 +tyro==0.8.4 +tzdata==2024.1 +urllib3==2.2.1 +xgboost==2.0.3 +xxhash==3.4.1 +yarl==1.9.4 diff --git a/pgml-extension/src/bindings/python/mod.rs b/pgml-extension/src/bindings/python/mod.rs index f00de2c7f..ea63e4711 100644 --- a/pgml-extension/src/bindings/python/mod.rs +++ b/pgml-extension/src/bindings/python/mod.rs @@ -41,8 +41,9 @@ pub fn pip_freeze() -> Result> pub fn validate_dependencies() -> Result { Python::with_gil(|py| { let sys = PyModule::import(py, "sys").unwrap(); + let executable: String = sys.getattr("executable").unwrap().extract().unwrap(); let version: String = sys.getattr("version").unwrap().extract().unwrap(); - info!("Python version: {version}"); + info!("Python version: {version}, executable: {}", executable); for module in ["xgboost", "lightgbm", "numpy", "sklearn"] { match py.import(module) { Ok(_) => (), diff --git a/pgml-extension/src/bindings/python/python.py b/pgml-extension/src/bindings/python/python.py index 81a341388..e6093f3d7 100644 --- a/pgml-extension/src/bindings/python/python.py +++ b/pgml-extension/src/bindings/python/python.py @@ -21,7 +21,7 @@ def activate_venv(venv): __venv = venv return True else: - print("Virtualenv not found: %s" % venv) + print("virutalenv not found: %s" % venv, file=sys.stderr) return False From e334e4e27878f9448f611bf8728cdff6bf95df4d Mon Sep 17 00:00:00 2001 From: Lev Kokotov Date: Fri, 17 May 2024 07:04:10 -0700 Subject: [PATCH 2/3] added langchain --- pgml-extension/requirements.py312.txt | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/pgml-extension/requirements.py312.txt b/pgml-extension/requirements.py312.txt index acfbd5511..36f5bf0eb 100644 --- a/pgml-extension/requirements.py312.txt +++ b/pgml-extension/requirements.py312.txt @@ -1,10 +1,12 @@ accelerate==0.30.1 aiohttp==3.9.5 aiosignal==1.3.1 +annotated-types==0.6.0 attrs==23.2.0 certifi==2024.2.2 charset-normalizer==3.3.2 colorama==0.4.6 +dataclasses-json==0.6.6 datasets==2.19.1 dill==0.3.8 docstring_parser==0.16 @@ -12,18 +14,28 @@ evaluate==0.4.2 filelock==3.14.0 frozenlist==1.4.1 fsspec==2024.3.1 +greenlet==3.0.3 huggingface-hub==0.23.0 idna==3.7 Jinja2==3.1.4 joblib==1.4.2 +jsonpatch==1.33 +jsonpointer==2.4 +langchain==0.1.20 +langchain-community==0.0.38 +langchain-core==0.1.52 +langchain-text-splitters==0.0.2 +langsmith==0.1.59 lightgbm==4.3.0 lxml==5.2.2 markdown-it-py==3.0.0 MarkupSafe==2.1.5 +marshmallow==3.21.2 mdurl==0.1.2 mpmath==1.3.0 multidict==6.0.5 multiprocess==0.70.16 +mypy-extensions==1.0.0 networkx==3.3 numpy==1.26.4 nvidia-cublas-cu12==12.1.3.1 @@ -39,7 +51,7 @@ nvidia-nccl-cu12==2.20.5 nvidia-nvjitlink-cu12==12.4.127 nvidia-nvtx-cu12==12.1.105 orjson==3.10.3 -packaging==24.0 +packaging==23.2 pandas==2.2.2 peft==0.11.0 pillow==10.3.0 @@ -47,6 +59,8 @@ portalocker==2.8.2 psutil==5.9.8 pyarrow==16.1.0 pyarrow-hotfix==0.6 +pydantic==2.7.1 +pydantic_core==2.18.2 Pygments==2.18.0 python-dateutil==2.9.0.post0 pytz==2024.1 @@ -63,14 +77,17 @@ sentence-transformers==2.7.0 setuptools==69.5.1 shtab==1.7.1 six==1.16.0 +SQLAlchemy==2.0.30 sympy==1.12 tabulate==0.9.0 +tenacity==8.3.0 threadpoolctl==3.5.0 tokenizers==0.19.1 torch==2.3.0 tqdm==4.66.4 transformers==4.40.2 trl==0.8.6 +typing-inspect==0.9.0 typing_extensions==4.11.0 tyro==0.8.4 tzdata==2024.1 From 669e44f485af3a4a8819606bdb4190f6e588a462 Mon Sep 17 00:00:00 2001 From: Lev Kokotov Date: Fri, 17 May 2024 10:20:52 -0700 Subject: [PATCH 3/3] fix typo --- pgml-extension/src/bindings/python/python.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pgml-extension/src/bindings/python/python.py b/pgml-extension/src/bindings/python/python.py index e6093f3d7..52e66106f 100644 --- a/pgml-extension/src/bindings/python/python.py +++ b/pgml-extension/src/bindings/python/python.py @@ -21,7 +21,7 @@ def activate_venv(venv): __venv = venv return True else: - print("virutalenv not found: %s" % venv, file=sys.stderr) + print("virtualenv not found: %s" % venv, file=sys.stderr) return False