forked from isi-nlp/rtg
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup.py
75 lines (71 loc) · 2.69 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
75
import setuptools
from pathlib import Path
import re
long_description = Path('README.md').read_text(encoding='utf-8', errors='ignore')
vpat = re.compile(r"""__version__\s*=\s*['"]([^'"]*)['"]""")
__version__ = None
for line in Path('rtg/__init__.py').read_text().splitlines():
line = line.strip()
if vpat.match(line):
__version__ = vpat.match(line)[1]
print(f"Going to install rtg {__version__}")
assert __version__, 'Could not find __version__ in __init__.py'
setuptools.setup(
name='rtg',
version=__version__,
author="Thamme Gowda",
author_email="[email protected]",
description="Reader Translator Generator(RTG), a Neural Machine Translator(NMT) toolkit based on Pytorch",
long_description=long_description,
long_description_content_type='text/markdown',
url="https://isi-nlp.github.io/rtg/",
packages=setuptools.find_packages(),
classifiers=[
"Programming Language :: Python :: 3.7",
'License :: OSI Approved :: Apache Software License',
"Operating System :: OS Independent",
'Intended Audience :: Science/Research',
'Topic :: Scientific/Engineering :: Artificial Intelligence',
],
platforms=['any'],
install_requires=[
'ruamel.yaml >= 0.17.10',
#'sacrebleu == 2.0.1', # them, didnt accept my PR :( https://github.com/mjpost/sacrebleu/pull/163
#'sacrebleu @ git+https://github.com/thammegowda/sacrebleu.git@7a8b0e5f', #2.0.1 # requires new pip
'sacrebleu_macrof == 2.0.1', # so I released my version
'sentencepiece >= 0.1.85',
'tensorboard >= 2.6.0',
'tqdm >= 4.45.0',
'nlcodec >= 0.5',
'torch >= 1.10', # AMP with bfloat16 came in 1.10
'sacremoses >= 0.0.45',
'portalocker >= 2.0.0',
'torchtext >= 0.10.0',
'pyspark >= 3.0.0',
#'utoken >= 0.1.3',
#'wildebeest @ git+https://github.com/uhermjakob/wildebeest.git@3bcf6f8', # 0.7.0
],
extra_requires={
'big': ['pyspark >= 3.0'],
'extras': ['scipy >= 1.4'],
'serve': ['flask >= 1.1.2'],
},
python_requires='>=3.7',
entry_points={
'console_scripts': [
'rtg-pipe=rtg.pipeline:main',
'rtg-decode=rtg.decode:main',
'rtg-decode-pro=rtg.decode_pro:main',
'rtg-export=rtg.export:main',
'rtg-prep=rtg.prep:main',
'rtg-train=rtg.train:main',
'rtg-fork=rtg.fork:main',
'rtg-serve=rtg.serve.app:main',
'rtg-syscomb=rtg.syscomb.__main__:main',
'rtg-launch=rtg.distrib.launch:main',
'rtg-params=rtg.tool.params:main',
],
},
include_package_data=True,
zip_safe=False,
)