forked from huggingface/setfit
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
65 lines (55 loc) · 2.33 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
# Lint as: python3
from pathlib import Path
from setuptools import find_packages, setup
README_TEXT = (Path(__file__).parent / "README.md").read_text(encoding="utf-8")
MAINTAINER = "Lewis Tunstall, Tom Aarsen"
MAINTAINER_EMAIL = "[email protected]"
INTEGRATIONS_REQUIRE = ["optuna"]
REQUIRED_PKGS = ["datasets>=2.3.0", "sentence-transformers>=2.2.1", "evaluate>=0.3.0"]
QUALITY_REQUIRE = ["black", "flake8", "isort", "tabulate"]
ONNX_REQUIRE = ["onnxruntime", "onnx", "skl2onnx"]
OPENVINO_REQUIRE = ["hummingbird-ml", "openvino>=2022.3"]
TESTS_REQUIRE = ["pytest", "pytest-cov"] + ONNX_REQUIRE + OPENVINO_REQUIRE
DOCS_REQUIRE = ["hf-doc-builder>=0.3.0"]
EXTRAS_REQUIRE = {
"optuna": INTEGRATIONS_REQUIRE,
"quality": QUALITY_REQUIRE,
"tests": TESTS_REQUIRE,
"onnx": ONNX_REQUIRE,
"openvino": ONNX_REQUIRE + OPENVINO_REQUIRE,
"docs": DOCS_REQUIRE,
}
def combine_requirements(base_keys):
return list(set(k for v in base_keys for k in EXTRAS_REQUIRE[v]))
EXTRAS_REQUIRE["dev"] = combine_requirements([k for k in EXTRAS_REQUIRE])
EXTRAS_REQUIRE["compat_tests"] = [requirement.replace(">=", "==") for requirement in REQUIRED_PKGS] + TESTS_REQUIRE
setup(
name="setfit",
version="0.7.0.dev0",
description="Efficient few-shot learning with Sentence Transformers",
long_description=README_TEXT,
long_description_content_type="text/markdown",
maintainer=MAINTAINER,
maintainer_email=MAINTAINER_EMAIL,
url="https://github.com/SetFit/setfit",
download_url="https://github.com/SetFit/setfit/tags",
license="Apache 2.0",
package_dir={"": "src"},
packages=find_packages("src"),
install_requires=REQUIRED_PKGS,
extras_require=EXTRAS_REQUIRE,
classifiers=[
"Development Status :: 1 - Planning",
"Intended Audience :: Developers",
"Intended Audience :: Education",
"Intended Audience :: Science/Research",
"License :: OSI Approved :: Apache Software License",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Topic :: Scientific/Engineering :: Artificial Intelligence",
],
keywords="nlp, machine learning, fewshot learning, transformers",
zip_safe=False, # Required for mypy to find the py.typed file
)