Skip to content

Commit c321a4c

Browse files
authored
A few Python fixes (#1471)
1 parent c48c7f8 commit c321a4c

File tree

4 files changed

+101
-3
lines changed

4 files changed

+101
-3
lines changed

pgml-extension/Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pgml-extension/requirements.py312.txt

Lines changed: 97 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,97 @@
1+
accelerate==0.30.1
2+
aiohttp==3.9.5
3+
aiosignal==1.3.1
4+
annotated-types==0.6.0
5+
attrs==23.2.0
6+
certifi==2024.2.2
7+
charset-normalizer==3.3.2
8+
colorama==0.4.6
9+
dataclasses-json==0.6.6
10+
datasets==2.19.1
11+
dill==0.3.8
12+
docstring_parser==0.16
13+
evaluate==0.4.2
14+
filelock==3.14.0
15+
frozenlist==1.4.1
16+
fsspec==2024.3.1
17+
greenlet==3.0.3
18+
huggingface-hub==0.23.0
19+
idna==3.7
20+
Jinja2==3.1.4
21+
joblib==1.4.2
22+
jsonpatch==1.33
23+
jsonpointer==2.4
24+
langchain==0.1.20
25+
langchain-community==0.0.38
26+
langchain-core==0.1.52
27+
langchain-text-splitters==0.0.2
28+
langsmith==0.1.59
29+
lightgbm==4.3.0
30+
lxml==5.2.2
31+
markdown-it-py==3.0.0
32+
MarkupSafe==2.1.5
33+
marshmallow==3.21.2
34+
mdurl==0.1.2
35+
mpmath==1.3.0
36+
multidict==6.0.5
37+
multiprocess==0.70.16
38+
mypy-extensions==1.0.0
39+
networkx==3.3
40+
numpy==1.26.4
41+
nvidia-cublas-cu12==12.1.3.1
42+
nvidia-cuda-cupti-cu12==12.1.105
43+
nvidia-cuda-nvrtc-cu12==12.1.105
44+
nvidia-cuda-runtime-cu12==12.1.105
45+
nvidia-cudnn-cu12==8.9.2.26
46+
nvidia-cufft-cu12==11.0.2.54
47+
nvidia-curand-cu12==10.3.2.106
48+
nvidia-cusolver-cu12==11.4.5.107
49+
nvidia-cusparse-cu12==12.1.0.106
50+
nvidia-nccl-cu12==2.20.5
51+
nvidia-nvjitlink-cu12==12.4.127
52+
nvidia-nvtx-cu12==12.1.105
53+
orjson==3.10.3
54+
packaging==23.2
55+
pandas==2.2.2
56+
peft==0.11.0
57+
pillow==10.3.0
58+
portalocker==2.8.2
59+
psutil==5.9.8
60+
pyarrow==16.1.0
61+
pyarrow-hotfix==0.6
62+
pydantic==2.7.1
63+
pydantic_core==2.18.2
64+
Pygments==2.18.0
65+
python-dateutil==2.9.0.post0
66+
pytz==2024.1
67+
PyYAML==6.0.1
68+
regex==2024.5.15
69+
requests==2.31.0
70+
rich==13.7.1
71+
rouge==1.0.1
72+
sacrebleu==2.4.2
73+
safetensors==0.4.3
74+
scikit-learn==1.4.2
75+
scipy==1.13.0
76+
sentence-transformers==2.7.0
77+
setuptools==69.5.1
78+
shtab==1.7.1
79+
six==1.16.0
80+
SQLAlchemy==2.0.30
81+
sympy==1.12
82+
tabulate==0.9.0
83+
tenacity==8.3.0
84+
threadpoolctl==3.5.0
85+
tokenizers==0.19.1
86+
torch==2.3.0
87+
tqdm==4.66.4
88+
transformers==4.40.2
89+
trl==0.8.6
90+
typing-inspect==0.9.0
91+
typing_extensions==4.11.0
92+
tyro==0.8.4
93+
tzdata==2024.1
94+
urllib3==2.2.1
95+
xgboost==2.0.3
96+
xxhash==3.4.1
97+
yarl==1.9.4

pgml-extension/src/bindings/python/mod.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,9 @@ pub fn pip_freeze() -> Result<TableIterator<'static, (name!(package, String),)>>
4141
pub fn validate_dependencies() -> Result<bool> {
4242
Python::with_gil(|py| {
4343
let sys = PyModule::import(py, "sys").unwrap();
44+
let executable: String = sys.getattr("executable").unwrap().extract().unwrap();
4445
let version: String = sys.getattr("version").unwrap().extract().unwrap();
45-
info!("Python version: {version}");
46+
info!("Python version: {version}, executable: {}", executable);
4647
for module in ["xgboost", "lightgbm", "numpy", "sklearn"] {
4748
match py.import(module) {
4849
Ok(_) => (),

pgml-extension/src/bindings/python/python.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ def activate_venv(venv):
2121
__venv = venv
2222
return True
2323
else:
24-
print("Virtualenv not found: %s" % venv)
24+
print("virtualenv not found: %s" % venv, file=sys.stderr)
2525
return False
2626

2727

0 commit comments

Comments
 (0)