-
Notifications
You must be signed in to change notification settings - Fork 14
/
Copy pathsetup.py
74 lines (64 loc) · 2.17 KB
/
setup.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
import re
from setuptools import setup, find_packages
# Min version :pip3 install -e .
# Dev version :pip3 install -e .["dev"]
_deps = [
"torch>=2.5.1",
"lightning>=2.1.3",
"pandas>=2.1.0",
"numpy==1.26.4",
"polars==1.9.0",
"scikit-learn>=1.2.2",
"pyarrow>=11.0.0",
"pykeen>=1.10.2",
"zstandard>=0.21.0",
"pytest>=7.2.2",
"psutil>=5.9.4",
"ruff>=0.0.284",
"gradio>=3.23.0",
"rdflib>=7.0.0",
"tiktoken>=0.5.1",
"matplotlib>=3.8.2"
]
# some of the values are versioned whereas others aren't.
deps = {b: a for a, b in (re.findall(r"^(([^!=<>~ ]+)(?:[!=<>~ ].*)?$)", x)[0] for x in _deps)}
def deps_list(*pkgs):
return [deps[pkg] for pkg in pkgs]
extras = dict()
extras["min"] = deps_list(
"pandas",
"polars", "pyarrow", "rdflib", # Loading KG
"torch", "lightning", # Training KGE
"tiktoken", # used for BPE
"psutil", # Memory tracking: maybe remove later ?
"matplotlib", # Unclear why it is needed
"pykeen", # additional kge models
"numpy"
)
# TODO: Remove polars, rdflib, tiktoken, psutil, matplotlib from min
extras["dev"] = (extras["min"] + deps_list("ruff", "pytest",
"polars", "pyarrow",
"scikit-learn"))
install_requires = [extras["min"]]
with open('README.md', 'r') as fh:
long_description = fh.read()
setup(
name="dicee",
description="Dice embedding is an hardware-agnostic framework for large-scale knowledge graph embedding applications",
version="0.1.5",
packages=find_packages(),
extras_require=extras,
install_requires=list(install_requires),
author='Caglar Demir',
author_email='caglardemir8@gmail.com',
url='https://github.com/dice-group/dice-embeddings',
classifiers=[
"Programming Language :: Python :: 3.10",
"License :: OSI Approved :: MIT License"],
python_requires='>=3.10',
entry_points={"console_scripts":
["dicee=dicee.scripts.run:main",
"dicee_vector_db=dicee.scripts.index_serve:main"]},
long_description=long_description,
long_description_content_type="text/markdown",
)