-
Notifications
You must be signed in to change notification settings - Fork 29
/
setup.py
71 lines (59 loc) · 1.7 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
from setuptools import setup, find_packages
from setuptools.command.install import install
class DownloadNLTK(install):
def run(self):
self.do_egg_install()
import nltk
nltk.download('punkt')
REQUIRES = """
transformers
accelerate
datasets>=2.7.1
evaluate>=0.3.0
faiss_gpu>=1.7.2
nltk>=3.8
numpy>=1.23.4
openai>=0.27.1
rank_bm25>=0.2.2
requests>=2.28.1
scikit_learn>=1.2.1
sentence_transformers>=2.2.2
torch>=1.13.1
tqdm>=4.64.1
"""
def get_install_requires():
reqs = [req for req in REQUIRES.split("\n") if len(req) > 0]
return reqs
with open("README.md") as f:
readme = f.read()
def do_setup():
setup(
name="openicl",
version='0.1.7',
description="An open source framework for in-context learning.",
url="https://github.com/Shark-NLP/OpenICL",
author='Zhenyu Wu, Yaoxiang Wang, Zhiyong Wu, Jiacheng Ye',
long_description=readme,
long_description_content_type="text/markdown",
cmdclass={'download_nltk': DownloadNLTK},
install_requires=get_install_requires(),
setup_requires=['nltk==3.8'],
python_requires=">=3.8.0",
packages=find_packages(
exclude=[
"test*",
"paper_test*"
]
),
keywords=["AI", "NLP", "in-context learning"],
classifiers=[
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Intended Audience :: Developers",
"Intended Audience :: Education",
"Intended Audience :: Science/Research",
]
)
if __name__ == "__main__":
do_setup()