forked from openvinotoolkit/openvino_contrib
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup.py
61 lines (54 loc) · 1.89 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
# Copyright (C) 2018-2021 Intel Corporation
# SPDX-License-Identifier: Apache-2.0
import re
import os
from setuptools import find_namespace_packages, setup
# Ensure we match the version set in src/optimum/version.py
try:
filepath = "optimum/version.py"
with open(filepath) as version_file:
(__version__,) = re.findall('__version__ = "(.*)"', version_file.read())
except Exception as error:
raise Exception(f"Error: Could not open '{filepath}' due {error}\n")
install_requires = [
"transformers",
"openvino",
]
nncf_deps = [
"openvino-dev[onnx]",
"nncf",
"transformers<4.16.0",
"datasets",
]
# Add patches as data
folder = "optimum/intel/nncf/patches"
data = [os.path.join(folder, name) for name in os.listdir(folder)]
setup(
name="openvino-optimum",
version=__version__,
description="Intel OpenVINO extension for Hugging Face Transformers",
long_description=open("README.md", "r", encoding="utf-8").read(),
long_description_content_type="text/markdown",
classifiers=[
"Development Status :: 3 - Alpha",
"License :: OSI Approved :: Apache Software License",
"Intended Audience :: Developers",
"Intended Audience :: Education",
"Intended Audience :: Science/Research",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3",
"Topic :: Scientific/Engineering :: Artificial Intelligence",
],
keywords="transformers, quantization, pruning, training, intel, openvino",
url="https://github.com/openvinotoolkit/openvino_contrib/",
author="Intel Corporation",
author_email="[email protected]",
license="Apache",
packages=find_namespace_packages(include=["optimum.*"]),
install_requires=install_requires,
extras_require={
"nncf": nncf_deps,
"all": nncf_deps,
},
data_files=[("../../optimum/intel/nncf/patches", data)],
)