optimum-intel
/
setup.py
84 строки · 2.8 Кб
1import re2
3from setuptools import find_namespace_packages, setup4
5
6# Ensure we match the version set in optimum/intel/version.py
7try:8filepath = "optimum/intel/version.py"9with open(filepath) as version_file:10(__version__,) = re.findall('__version__ = "(.*)"', version_file.read())11except Exception as error:12assert False, "Error: Could not open '%s' due %s\n" % (filepath, error)13
14INSTALL_REQUIRE = [15"torch>=1.11",16"optimum~=1.17",17"transformers>=4.36.0,<4.39.0",18"datasets>=1.4.0",19"sentencepiece",20"scipy",21"accelerate", # transformers 4.29 require accelerate for PyTorch22]
23
24TESTS_REQUIRE = [25"pytest",26"parameterized",27"Pillow",28"evaluate",29"diffusers",30"py-cpuinfo",31"sacremoses",32"torchaudio",33"rjieba",34"timm",35"invisible-watermark>=0.2.0",36"auto-gptq",37]
38
39QUALITY_REQUIRE = ["black~=23.1", "ruff>=0.0.241"]40
41EXTRAS_REQUIRE = {42"neural-compressor": ["neural-compressor>=2.2.0", "onnx", "onnxruntime<1.15.0"],43"openvino": ["openvino>=2023.3", "onnx", "onnxruntime"],44"openvino-tokenizers": ["openvino-tokenizers[transformers]"],45"nncf": ["nncf>=2.8.1"],46"ipex": ["intel-extension-for-pytorch", "onnx"],47"diffusers": ["diffusers"],48"quality": QUALITY_REQUIRE,49"tests": TESTS_REQUIRE,50}
51
52setup(53name="optimum-intel",54version=__version__,55description="Optimum Library is an extension of the Hugging Face Transformers library, providing a framework to "56"integrate third-party libraries from Hardware Partners and interface with their specific "57"functionality.",58long_description=open("README.md", "r", encoding="utf-8").read(),59long_description_content_type="text/markdown",60classifiers=[61"Development Status :: 5 - Production/Stable",62"License :: OSI Approved :: Apache Software License",63"Intended Audience :: Developers",64"Intended Audience :: Education",65"Intended Audience :: Science/Research",66"Operating System :: OS Independent",67"Programming Language :: Python :: 3.8",68"Programming Language :: Python :: 3.9",69"Programming Language :: Python :: 3.10",70"Programming Language :: Python :: 3.11",71"Topic :: Scientific/Engineering :: Artificial Intelligence",72],73keywords="transformers, quantization, pruning, knowledge distillation, optimization, training",74url="https://www.intel.com",75author="HuggingFace Inc. Special Ops Team",76author_email="hardware@huggingface.co",77license="Apache",78packages=find_namespace_packages(include=["optimum*"]),79install_requires=INSTALL_REQUIRE,80extras_require=EXTRAS_REQUIRE,81include_package_data=True,82zip_safe=False,83entry_points={"console_scripts": ["optimum-cli=optimum.commands.optimum_cli:main"]},84)
85