forked from oracle/accelerated-data-science
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
175 lines (160 loc) · 4.94 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
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
#!/usr/bin/env python
# -*- coding: utf-8; -*-
# Copyright (c) 2020, 2022 Oracle and/or its affiliates.
# Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl/
import sys
import os
import json
from setuptools import setup, find_packages
from functools import reduce
from pathlib import Path
from setuptools.command.install import install
from setuptools.command.develop import develop
install_requires = [
"asteval>=0.9.25",
"cerberus>=1.3.4",
"cloudpickle>=1.6.0",
"fsspec>=0.8.7",
"jinja2>=2.11.2",
"gitpython>=3.1.2",
"matplotlib>=3.1.3",
"numpy>=1.19.2",
"oci>=2.96.0",
"ocifs>=1.1.3",
"pandas>1.2.1,<1.6",
"python_jsonschema_objects>=0.3.13",
"PyYAML>=5.4,<6",
"requests",
"scikit-learn>=0.23.2,<1.2",
"tabulate>=0.8.9",
"tqdm>=4.59.0",
"psutil>=5.7.2",
]
extras_require = {
"boosted": [
"xgboost",
"lightgbm",
],
"notebook": [
"ipywidgets~=7.6.3",
"ipython>=7.23.1, <8.0",
],
"text": ["wordcloud>=1.8.1", "spacy"],
"viz": [
"bokeh>=2.3.0, <=2.4.3",
"folium>=0.12.1",
"graphviz<0.17",
"scipy>=1.5.4",
"seaborn>=0.11.0",
],
"data": [
"fastavro>=0.24.2",
"openpyxl>=3.0.7",
"pandavro>=1.6.0",
"datefinder>=0.7.1",
"htmllistparse>=0.6.0",
"sqlalchemy>=1.4.1, <=1.4.46",
"oracledb>=1.0",
],
"opctl": [
"oci-cli",
"docker",
"conda-pack",
"nbconvert",
"nbformat",
"inflection",
],
"mysql": ["mysql-connector-python"],
"bds": ["ibis-framework[impala]", "hdfs[kerberos]", "sqlalchemy"],
"spark": ["pyspark>=3.0.0"],
"huggingface": ["transformers"],
}
this_directory = Path(__file__).parent
def update_extra_with_internal_packages():
loaded_dep = {}
internal_deps = os.path.join(this_directory, "internal_extra_dependency.json")
print(f"looking for {internal_deps}")
if os.path.exists(internal_deps):
with open(internal_deps) as idf:
loaded_dep = json.load(idf)
print(f"Found: {loaded_dep}")
return loaded_dep
extras_require.update(update_extra_with_internal_packages())
extras_require["torch"] = extras_require["viz"] + ["torch"] + ["torchvision"]
extras_require["tensorflow"] = extras_require["viz"] + [
"tensorflow",
]
extras_require["geo"] = extras_require["viz"] + ["geopandas"]
extras_require["onnx"] = extras_require["viz"] + [
"protobuf<=3.20",
"onnx>=1.12.0",
"onnxruntime>=1.10.0",
"onnxmltools>=1.10.0",
"skl2onnx>=1.10.4",
"tf2onnx",
"xgboost==1.5.1",
"lightgbm==3.3.1",
]
extras_require["optuna"] = extras_require["viz"] + ["optuna==2.9.0"]
extras_require["complete"] = sorted({v for req in extras_require.values() for v in req})
extras_require["all-optional"] = reduce(
list.__add__,
[
extras_require[k]
for k in extras_require
if k not in ["boosted", "opctl", "complete"]
],
)
extras_require["all-public"] = reduce(
list.__add__,
[
extras_require[k]
for k in extras_require
if k not in ["all-optional", "complete"]
],
)
# Only include pytest-runner in setup_requires if we're invoking tests
if {"pytest", "test", "ptr"}.intersection(sys.argv):
setup_requires = ["pytest-runner"]
else:
setup_requires = []
ADS_VERSION = "UNKNOWN"
with open(
os.path.join(os.path.dirname(os.path.abspath(__file__)), "ads", "ads_version.json")
) as version_file:
ADS_VERSION = json.load(version_file)["version"]
long_description = (this_directory / "README.md").read_text()
setup(
name="oracle_ads",
version=ADS_VERSION,
description="Oracle Accelerated Data Science SDK",
author="Oracle Data Science",
license="Universal Permissive License 1.0",
long_description=long_description,
long_description_content_type="text/markdown",
packages=find_packages(),
url="https://docs.oracle.com/en-us/iaas/tools/ads-sdk/latest/index.html",
classifiers=[
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Developers",
"License :: OSI Approved :: Universal Permissive License (UPL)",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
],
keywords="Oracle Cloud Infrastructure, OCI, Machine Learning, ML, Artificial Intelligence, AI, Data Science, Cloud, Oracle",
include_package_data=True,
install_requires=install_requires,
python_requires=">=3.8",
setup_requires=setup_requires,
extras_require=extras_require,
tests_require=[
"pytest",
],
project_urls={
"Github": "https://github.com/oracle/accelerated-data-science",
"Documentation": "https://accelerated-data-science.readthedocs.io/en/latest/index.html",
},
scripts=["ads/ads"],
)