-
Notifications
You must be signed in to change notification settings - Fork 33
/
setup.py
97 lines (87 loc) · 3.03 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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
# Copyright 2021 The HuggingFace Team. All rights reserved.
# Copyright (c) 2022 Graphcore Ltd. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
import re
from setuptools import find_namespace_packages, setup
# Ensure we match the version set in optimum/version.py
try:
filepath = "optimum/graphcore/version.py"
with open(filepath) as version_file:
(__version__,) = re.findall('__version__ = "(.*)"', version_file.read())
except Exception as error:
assert False, "Error: Could not open '%s' due %s\n" % (filepath, error)
INSTALL_REQUIRES = [
"transformers==4.29.2",
"optimum==1.6.1",
"diffusers[torch]==0.12.1",
"cppimport==22.8.2",
"peft==0.3.0",
"datasets",
"tokenizers",
"typeguard",
"sentencepiece",
"scipy",
"pillow",
]
QUALITY_REQUIRES = [
"black~=23.1",
"isort>=5.5.4",
"hf-doc-builder @ git+https://github.com/huggingface/doc-builder.git",
"ruff>=0.0.241,<=0.0.259",
]
EXTRA_REQUIRE = {
"testing": [
"filelock",
"GitPython",
"parameterized",
"psutil",
"pytest",
"pytest-pythonpath",
"pytest-xdist",
"librosa",
"soundfile",
],
"quality": QUALITY_REQUIRES,
}
setup(
name="optimum-graphcore",
version=__version__,
description="Optimum Library is an extension of the Hugging Face Transformers library, providing a framework to "
"integrate third-party libraries from Hardware Partners and interface with their specific "
"functionality.",
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.8",
"Programming Language :: Python :: 3.9",
"Topic :: Scientific/Engineering :: Artificial Intelligence",
],
keywords="transformers, quantization, pruning, training, ipu",
url="https://huggingface.co/hardware",
author="HuggingFace Inc. Special Ops Team",
license="Apache",
packages=find_namespace_packages(include=["optimum*"]),
install_requires=INSTALL_REQUIRES,
extras_require=EXTRA_REQUIRE,
include_package_data=True,
zip_safe=False,
package_data={"": ["*.cpp", "*.hpp"]}
)