Skip to content

Commit e0e44d5

Browse files
committed
✨ update library dependencies/ GPU&CPU installation
1 parent 0445926 commit e0e44d5

File tree

2 files changed

+41
-27
lines changed

2 files changed

+41
-27
lines changed

pyproject.toml

Lines changed: 35 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "OntoLearner"
3-
version = "0.0.0" # placeholder, will be replaced automatically
3+
version = "0.0.0"
44
description = "OntoLearner: A Modular Python Library for Ontology Learning with LLMs."
55
authors = ["Hamed Babaei Giglou <[email protected]>", "Andrei C. Aioanei <[email protected]>"]
66
license = "MIT License"
@@ -10,25 +10,35 @@ repository = "https://github.com/sciknoworg/OntoLearner/"
1010
include = ["images/logo.png"]
1111

1212
[tool.poetry.dependencies]
13-
python=">=3.10,<3.14.0"
14-
rdflib="7.1.1"
15-
networkx ="3.2.1"
16-
seaborn="*"
17-
numpy="*"
18-
pandas="*"
19-
openpyxl="*"
20-
matplotlib="*"
21-
tqdm="*"
22-
pydantic="2.11.3"
23-
pathlib="1.0.1"
24-
dspy="2.6.14"
25-
python-dotenv="*"
26-
huggingface-hub="0.34.4"
27-
transformers="4.56.0"
28-
torch="2.8.0"
29-
sentence-transformers="5.1.0"
30-
scikit-learn="1.6.1"
31-
bitsandbytes="0.45.1"
13+
python = ">=3.10,<3.14.0"
14+
15+
# Core deps
16+
rdflib = "7.1.1"
17+
networkx = "3.2.1"
18+
numpy = "*"
19+
pandas = "*"
20+
openpyxl = "*"
21+
tqdm = "*"
22+
pydantic = "2.11.3"
23+
pathlib = "1.0.1"
24+
python-dotenv = "*"
25+
matplotlib = "*"
26+
seaborn = "*"
27+
scikit-learn = "1.6.1"
28+
huggingface-hub = "0.34.4"
29+
30+
# LLM stack (CPU by default)
31+
torch = { version = "^2.8.0", source = "pytorch-cpu" }
32+
transformers = "^4.56.0"
33+
sentence-transformers = "^5.1.0"
34+
dspy = "^2.6.14"
35+
36+
[tool.poetry.extras]
37+
# GPU-only extras
38+
gpu = [
39+
"torch==^2.8.0", # GPU wheel (auto CUDA)
40+
"bitsandbytes=^0.45.1" # allow minor/patch updates
41+
]
3242

3343
[tool.poetry.dev-dependencies]
3444
ruff = "*"
@@ -47,3 +57,8 @@ attr = "ontolearner.__version__"
4757
[build-system]
4858
requires = ["poetry-core>=1.0.0", "poetry-dynamic-versioning>=1.4.0"]
4959
build-backend = "poetry_dynamic_versioning.backend"
60+
61+
[[tool.poetry.source]]
62+
name = "pytorch-cpu"
63+
url = "https://download.pytorch.org/whl/cpu"
64+
secondary = true

setup.py

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -26,13 +26,12 @@
2626
"networkx==3.2.1",
2727
"pydantic==2.11.3",
2828
"pathlib==1.0.1",
29-
"dspy==2.6.14",
30-
"huggingface-hub==0.34.4",
31-
"transformers==4.56.0",
32-
"torch==2.8.0",
33-
"sentence-transformers==5.1.0",
34-
"scikit-learn==1.6.1",
35-
"bitsandbytes==0.45.1",
29+
"dspy>=2.6.14,<3.0.0",
30+
"huggingface-hub>=0.34.4,<1.0.0",
31+
"transformers>=4.56.0,<5.0.0",
32+
"sentence-transformers>=5.1.0,<6.0.0",
33+
"scikit-learn>=1.6.1,<2.0.0",
34+
"bitsandbytes>=0.45.1,<1.0.0"
3635
],
3736
classifiers=[
3837
"Development Status :: 5 - Production/Stable",

0 commit comments

Comments
 (0)