2022-11-26 01:52:09 +03:00
|
|
|
from setuptools import find_packages, setup
|
2020-04-29 19:09:41 +03:00
|
|
|
import os
|
|
|
|
|
|
|
|
this = os.path.dirname(__file__)
|
|
|
|
|
|
|
|
packages = find_packages()
|
|
|
|
assert packages
|
|
|
|
|
|
|
|
# read version from the package file.
|
|
|
|
with (open(os.path.join(this, "hummingbird/__init__.py"), "r")) as f:
|
|
|
|
line = [_ for _ in [_.strip("\r\n ") for _ in f.readlines()] if _.startswith("__version__")]
|
|
|
|
if len(line) > 0:
|
|
|
|
version_str = line[0].split("=")[1].strip('" ')
|
|
|
|
|
|
|
|
README = os.path.join(os.getcwd(), "README.md")
|
|
|
|
with open(README) as f:
|
|
|
|
long_description = f.read()
|
|
|
|
start_pos = long_description.find("## Introduction")
|
|
|
|
if start_pos >= 0:
|
|
|
|
long_description = long_description[start_pos:]
|
|
|
|
|
2020-10-21 17:51:44 +03:00
|
|
|
install_requires = [
|
2021-06-18 22:00:19 +03:00
|
|
|
"numpy>=1.15",
|
2022-08-09 07:04:42 +03:00
|
|
|
"onnxconverter-common>=1.6.0",
|
2021-06-18 22:00:19 +03:00
|
|
|
"scipy",
|
2022-06-21 03:40:00 +03:00
|
|
|
"scikit-learn",
|
2022-06-21 05:05:25 +03:00
|
|
|
"torch>1.7.0",
|
2020-10-21 17:51:44 +03:00
|
|
|
"psutil",
|
2020-12-24 02:50:35 +03:00
|
|
|
"dill",
|
2023-01-14 00:47:54 +03:00
|
|
|
"protobuf>=3.20.2",
|
2020-10-21 17:51:44 +03:00
|
|
|
]
|
2020-10-19 02:09:57 +03:00
|
|
|
onnx_requires = [
|
2021-06-18 22:00:19 +03:00
|
|
|
"onnxruntime>=1.0.0",
|
2022-06-16 20:53:04 +03:00
|
|
|
"onnxmltools>=1.6.0,<=1.11.0",
|
2023-04-03 22:50:33 +03:00
|
|
|
"skl2onnx>=1.7.0",
|
2020-10-19 02:09:57 +03:00
|
|
|
]
|
|
|
|
extra_requires = [
|
|
|
|
# The need each for these depends on which libraries you plan to convert from
|
2021-06-18 22:00:19 +03:00
|
|
|
"xgboost>=0.90",
|
|
|
|
"lightgbm>=2.2",
|
2022-07-28 20:36:05 +03:00
|
|
|
"prophet==1.1",
|
2020-10-19 02:09:57 +03:00
|
|
|
]
|
2020-04-29 19:09:41 +03:00
|
|
|
setup(
|
2020-05-07 21:40:39 +03:00
|
|
|
name="hummingbird-ml",
|
2020-04-29 19:09:41 +03:00
|
|
|
version=version_str,
|
2020-05-06 02:34:12 +03:00
|
|
|
description="Convert trained traditional machine learning models into tensor computations",
|
2020-07-09 06:41:03 +03:00
|
|
|
long_description=long_description,
|
|
|
|
long_description_content_type="text/markdown",
|
2020-04-29 19:09:41 +03:00
|
|
|
license="MIT License",
|
|
|
|
author="Microsoft Corporation",
|
|
|
|
author_email="hummingbird-dev@microsoft.com",
|
|
|
|
url="https://github.com/microsoft/hummingbird",
|
|
|
|
packages=packages,
|
|
|
|
include_package_data=True,
|
2020-06-12 20:06:51 +03:00
|
|
|
install_requires=install_requires,
|
2020-06-12 02:41:51 +03:00
|
|
|
extras_require={
|
|
|
|
"tests": ["flake8", "pytest", "coverage", "pre-commit"],
|
2023-04-03 21:36:36 +03:00
|
|
|
"sparkml": ["pyspark>=2.4.4,<3.1.2", "pyarrow>1.0", "pandas<1.5.3"],
|
2020-10-19 02:09:57 +03:00
|
|
|
"onnx": onnx_requires,
|
|
|
|
"extra": extra_requires,
|
|
|
|
"benchmark": onnx_requires + extra_requires + ["memory-profiler", "psutil"],
|
2020-06-12 02:41:51 +03:00
|
|
|
},
|
2020-04-29 19:09:41 +03:00
|
|
|
classifiers=[
|
|
|
|
"Environment :: Console",
|
|
|
|
"Intended Audience :: Developers",
|
|
|
|
"Programming Language :: Python",
|
2020-05-07 21:40:39 +03:00
|
|
|
"Operating System :: OS Independent",
|
2020-04-29 19:09:41 +03:00
|
|
|
"License :: OSI Approved :: MIT License",
|
|
|
|
],
|
2022-06-21 05:05:25 +03:00
|
|
|
python_requires=">=3.8",
|
2020-04-29 19:09:41 +03:00
|
|
|
)
|