-
Notifications
You must be signed in to change notification settings - Fork 80
/
setup.py
60 lines (55 loc) · 1.53 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
"""
IndicoAPI setup
"""
import os
import warnings
import subprocess
from sys import version_info, argv
from setuptools import setup, find_packages
from setuptools.command.build_ext import build_ext
REQUIREMENTS = [
"pandas>=0.23.1",
"tqdm>=4.0.0",
"numpy>=1.18.4,<1.24.0",
"scipy>=1.1.0",
"scikit-learn>=1.0.2",
"ftfy>=4.4.0",
"spacy>=3.0.0",
"h5py>=2.8.0",
"joblib>=0.12.0",
"bs4>=0.0.1",
"nltk>=3.2.4",
"regex>=2019.03.12",
"lxml>=4.3.3",
"sentencepiece>=0.1.83",
"tabulate>=0.8.6,<0.9.0",
"tensorflow-addons==0.23.0",
"tensorflow-estimator==2.15.0",
"tqdl==0.0.4",
"psutil==5.7.0",
"transformers==4.36.2",
]
class OpsBuild(build_ext):
def run(self):
script = os.path.join(
os.path.dirname(__file__), "finetune", "custom_ops", "build.sh"
)
if subprocess.run(["sh", script]).returncode != 0:
warnings.warn(
"Failed to build the finetune memory management ops required for use of Scheduler. "
"If you don't intend to use Scheduler you can safely ignore this message. "
"To build the ops later execute {}".format(script)
)
setup(
name="finetune",
packages=find_packages(exclude=["tests", "tests.*"]),
version="0.10.1",
install_requires=REQUIREMENTS,
extras_require={
"tf": ["tensorflow==2.11.0"],
"tf_gpu": ["tensorflow-gpu==2.11.0"],
},
zip_safe=False,
cmdclass={"build_ext": OpsBuild},
include_package_data=True
)