-
Notifications
You must be signed in to change notification settings - Fork 9
/
setup.py
68 lines (63 loc) · 1.97 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
import shutil
import subprocess
import re
from pathlib import Path
from setuptools import setup, find_packages
def _check_java():
version = subprocess.check_output(['java', '-version'], stderr=subprocess.STDOUT).decode('utf-8')
version = re.findall('"([^"]*)"', version)[0]
version = version.split('.')[:2]
if not version or not version == ['1', '8']:
return False
else:
return True
def _get_requirements():
"""
Here we check the local Java version for compatibility with pyspark/spark-nlp.
If incompatible, we skip the pyspark/spark-nlp installs, which deactivates
entity-aware features at runtime.
"""
java_compat = _check_java()
installs = [
'config',
'nltk',
'numpy>=1.14.0,<1.18.0',
'stop-words',
'torch>=1.5.1',
'transformers==3.1.0',
'prefect==0.13.4',
'pendulum==2.0.5',
'dataclasses==0.6;python_version<"3.7"',
]
if java_compat:
installs += [
'pyspark==2.4.0',
'spark-nlp==2.5.2',
]
return installs
setup(
name='kitanaqa',
url='https://github.com/searchableai/KitanaQA',
author='Senzeyu Zhang, Mostafa Mirshekari, Aaron Sisto',
author_email='aaron@searchable.ai',
version='0.1.0',
package_dir={"":"src"},
python_requires=">=3.6.0",
packages=find_packages("src"),
install_requires=_get_requirements(),
extras_require={
'dev': [
'pytest',
'pytest-pep8',
'pytest-cov',
]
},
description='Adversarial Training and Data Augmentation for Neural Question-Answering Models',
long_description=open("README.md", "r", encoding="utf-8").read(),
long_description_content_type="text/markdown",
keywords="NLP BERT adversarial training data augmentation deep learning pytorch google",
license="Apache",
package_data={
'kitanaqa':['support/*.txt', 'support/*.zip','support/*.json']
},
)