-
Notifications
You must be signed in to change notification settings - Fork 52
/
setup.py
209 lines (195 loc) · 6.26 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
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
#!/usr/bin/env python
"""Installation script for Oríon."""
import os
from setuptools import setup
import versioneer
repo_root = os.path.dirname(os.path.abspath(__file__))
with open("tests/requirements.txt") as f:
tests_require = f.readlines()
# Builtin algo plugins that are built-in
algos = [
"orion.algo.asha",
"orion.algo.axoptimizer",
"orion.algo.bohb",
"orion.algo.dehb",
"orion.algo.evolution_es",
"orion.algo.gridsearch",
"orion.algo.hebo",
"orion.algo.hyperband",
"orion.algo.mofa",
"orion.algo.nevergradoptimizer",
"orion.algo.pbt",
"orion.algo.random",
"orion.algo.tpe",
]
packages = [ # Packages must be sorted alphabetically to ease maintenance and merges.
"orion",
"orion.algo.base",
"orion.algo.space",
"orion.analysis",
"orion.benchmark",
"orion.client",
"orion.core",
"orion.executor",
"orion.plotting",
"orion.serving",
"orion.storage",
"orion.testing",
]
extras_require = {
"test": tests_require,
"docs": [
"matplotlib",
"numpydoc",
"sphinx",
"sphinx_rtd_theme",
"sphinxcontrib.httpdomain",
"sphinx-autoapi",
"sphinx_gallery",
],
"dask": ["dask[complete]"],
"ray": ["ray"],
"track": ["track @ git+https://github.com/Delaunay/track@master#egg=track"],
"profet": ["emukit", "GPy", "torch", "pybnn"],
"configspace": ["ConfigSpace"],
"ax": [
"ax-platform",
"numpy",
],
"dehb": [
"ConfigSpace",
"dehb @ git+https://github.com/bouthilx/DEHB.git@master#egg=dehb",
"sspace @ git+https://github.com/Epistimio/sample-space.git@master#egg=sspace",
],
"bohb": [
"hpbandster",
"ConfigSpace",
"sspace @ git+https://github.com/Epistimio/sample-space.git@master#egg=sspace",
],
"pb2": ["GPy", "matplotlib"],
"nevergrad": ["nevergrad>=0.4.3.post10", "fcmaes", "pymoo"],
"hebo": [
# Issue #1061 Pending update of hebo
"numpy>=1.17,<1.24",
"pymoo==0.5.0",
"hebo @ git+https://github.com/huawei-noah/HEBO.git@v0.3.2#egg=hebo&subdirectory=HEBO",
],
}
extras_require["all"] = sorted(set(sum(extras_require.values(), [])))
dashboard_files = []
for root, sub_directories, files in os.walk("dashboard/build"):
for file in files:
# Install dashboard build in a folder `orion-dashboard`
install_root = os.path.join("orion-dashboard", *root.split(os.sep)[1:])
dashboard_files.append((install_root, [os.path.join(root, file)]))
setup_args = dict(
name="orion",
version=versioneer.get_version(),
cmdclass=versioneer.get_cmdclass(),
description="Asynchronous [black-box] Optimization",
long_description=open(
os.path.join(repo_root, "README.rst"), encoding="utf8"
).read(),
license="BSD-3-Clause",
author="Epistímio",
author_email="xavier.bouthillier@umontreal.ca",
url="https://github.com/epistimio/orion",
packages=packages + algos,
namespace_packages=[
"orion",
"orion.algo",
],
package_dir={"": "src"},
data_files=dashboard_files,
include_package_data=True,
python_requires=">=3.8",
entry_points={
"console_scripts": [
"orion = orion.core.cli:main",
],
"BaseAlgorithm": [
"random = orion.algo.random:Random",
"gridsearch = orion.algo.gridsearch:GridSearch",
"hyperband = orion.algo.hyperband:Hyperband",
"asha = orion.algo.asha:ASHA",
"dehb = orion.algo.dehb.dehb:DEHB",
"tpe = orion.algo.tpe:TPE",
"EvolutionES = orion.algo.evolution_es:EvolutionES",
# "pbt = orion.algo.pbt.pbt:PBT",
"ax = orion.algo.axoptimizer:AxOptimizer",
"mofa = orion.algo.mofa.mofa:MOFA",
"pb2 = orion.algo.pbt.pb2:PB2",
"bohb = orion.algo.bohb:BOHB",
"nevergrad = orion.algo.nevergradoptimizer:NevergradOptimizer",
],
"Database": [
"ephemeraldb = orion.core.io.database.ephemeraldb:EphemeralDB",
"pickleddb = orion.core.io.database.pickleddb:PickledDB",
"mongodb = orion.core.io.database.mongodb:MongoDB",
],
"BaseStorageProtocol": [
"track = orion.storage.track:Track",
"legacy = orion.storage.legacy:Legacy",
],
"BaseExecutor": [
"singleexecutor = orion.executor.single_backend:SingleExecutor",
"joblib = orion.executor.joblib_backend:Joblib",
"poolexecutor = orion.executor.multiprocess_backend:PoolExecutor",
"dask = orion.executor.dask_backend:Dask",
"ray = orion.executor.ray_backend:Ray",
],
},
install_requires=[
"cloudpickle",
"PyYAML",
"pymongo>=3",
"numpy",
"scipy",
"gitpython",
"filelock",
"tabulate",
"AppDirs",
"plotly",
# Pin the version to work around https://github.com/plotly/Kaleido/issues/156.
"kaleido==0.2.1",
"requests",
"pandas",
"gunicorn",
"falcon",
"falcon-cors",
"scikit-learn",
"psutil",
"joblib",
"pytest>=3.0.0",
"scikit-optimize",
"pyyaml",
"typing_extensions",
],
tests_require=tests_require,
setup_requires=["setuptools", "pytest-runner"],
extras_require=extras_require,
# "Zipped eggs don't play nicely with namespace packaging"
# from https://github.com/pypa/sample-namespace-packages
zip_safe=False,
)
setup_args["keywords"] = [
"Machine Learning",
"Deep Learning",
"Distributed",
"Optimization",
]
setup_args["platforms"] = ["Linux"]
setup_args["classifiers"] = [
"Development Status :: 1 - Planning",
"Intended Audience :: Developers",
"Intended Audience :: Education",
"Intended Audience :: Science/Research",
"License :: OSI Approved :: BSD License",
"Operating System :: POSIX",
"Operating System :: Unix",
"Programming Language :: Python",
"Topic :: Scientific/Engineering",
"Topic :: Scientific/Engineering :: Artificial Intelligence",
] + [("Programming Language :: Python :: %s" % x) for x in "3 3.8 3.9 3.10".split()]
if __name__ == "__main__":
setup(**setup_args)