2020-04-29 19:09:41 +03:00
|
|
|
from distutils.core import setup
|
|
|
|
from setuptools import find_packages
|
|
|
|
import os
|
2020-06-12 20:06:51 +03:00
|
|
|
import sys
|
2020-04-29 19:09:41 +03:00
|
|
|
|
|
|
|
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-06-12 20:06:51 +03:00
|
|
|
install_requires = ["numpy>=1.15", "onnxconverter-common>=1.6.0", "scikit-learn==0.22.1"]
|
|
|
|
if sys.platform == "darwin" or sys.platform == "linux":
|
2020-07-08 01:49:59 +03:00
|
|
|
install_requires.append("torch==1.5.1")
|
2020-06-12 20:06:51 +03:00
|
|
|
else:
|
2020-07-08 01:49:59 +03:00
|
|
|
install_requires.append("torch==1.5.1+cpu")
|
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-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"],
|
|
|
|
"docs": ["pdoc"],
|
2020-06-19 01:12:24 +03:00
|
|
|
"onnx": ["onnxruntime>=1.0.0", "onnxmltools>=1.6.0"],
|
2020-06-12 02:41:51 +03:00
|
|
|
"extra": [
|
|
|
|
# The need each for these depends on which libraries you plan to convert from
|
|
|
|
"xgboost==0.90",
|
|
|
|
"lightgbm>=2.2",
|
|
|
|
],
|
|
|
|
},
|
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",
|
|
|
|
],
|
2020-06-02 03:05:15 +03:00
|
|
|
python_requires=">=3.5",
|
2020-04-29 19:09:41 +03:00
|
|
|
)
|