-
Notifications
You must be signed in to change notification settings - Fork 13
/
pyproject.toml
352 lines (322 loc) · 8.89 KB
/
pyproject.toml
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
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
[project]
name = "neural-pipeline-search"
version = "v0.12.2"
description = "Neural Pipeline Search helps deep learning experts find the best neural pipeline."
authors = [
{ name = "Danny Stoll", email = "[email protected]" },
{ name = "Neeratyoy Mallik", email = "[email protected]" },
{ name = "Simon Schrodi" },
{ name = "Eddie Bergman" },
{ name = "Maciej Janowski" },
{ name = "Samir Garibov" },
{ name = "Tarek Abou Chakra" },
{ name = "Daniel Rogalla" },
{ name = "Carl Hvarfner" },
{ name = "Binxin Ru" },
{ name = "Nils Kober" },
{ name = "Théophane Vallaeys" },
{ name = "Frank Hutter" },
]
readme = "README.md"
license = { file = "LICENSE" }
keywords = [
"Neural Pipeline Search",
"Neural Architecture Search",
"Hyperparameter Optimization",
"AutoML",
]
classifiers = [
"Development Status :: 4 - Beta",
"Intended Audience :: Developers",
"Intended Audience :: Science/Research",
"Natural Language :: English",
"License :: OSI Approved :: Apache Software License",
"Operating System :: POSIX :: Linux",
"Operating System :: Microsoft :: Windows",
"Operating System :: MacOS",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Topic :: Scientific/Engineering :: Artificial Intelligence",
"Topic :: System :: Distributed Computing",
]
requires-python = ">=3.10,<3.13"
dependencies = [
"ConfigSpace>=0.7,<1.0",
"grakel>=0.1,<0.2",
"numpy>=1.0,<2.0",
"pandas>=2.0,<3.0",
"networkx>=2.6.3,<3.0",
"nltk>=3.6.4,<4.0",
"scipy>=1.13.1",
"torch>=2.0.1",
"matplotlib>=3.0,<4.0",
"more-itertools",
"portalocker>=2.0,<3.0",
"seaborn>=0.13,<0.14",
"pyyaml>=6.0,<7.0",
"tensorboard>=2.0,<3.0",
"typing-extensions",
"torchvision>=0.8.0",
"ifbo>=0.3.10",
"botorch>=0.12",
"gpytorch==1.13.0",
]
[project.urls]
homepage = "https://github.com/automl/neps"
repository = "https://github.com/automl/neps"
documentation = "https://automl.github.io/neps/"
[project.optional-dependencies]
dev = [
"ruff",
"pre-commit>=3,<4",
"mypy>=1,<2",
"pytest>=7,<8",
"pytest-cases>=3,<4",
"types-PyYAML>=6,<7",
"mkdocs-material",
"mkdocs-autorefs",
"mkdocs-gen-files",
"mkdocstrings[python]",
"mkdocs-literate-nav",
"mike",
"black", # This allows mkdocstrings to format signatures in the docs
]
[tool.setuptools.packages.find]
include = [
"neps",
"neps.*",
"neps_examples",
]
exclude = []
[build-system]
requires = [
"setuptools>=68.2.2",
"wheel>=0.41.2",
]
build-backend = "setuptools.build_meta"
# TODO(eddiebergman): Include more of these as we go on in migration
# "tests",
# "neps_examples",
[tool.ruff]
target-version = "py310"
output-format = "full"
line-length = 90
src = ["neps"]
# TODO(eddiebergman): Include more of these as we go on in migration
exclude = [
"neps/optimizers/multi_fidelity_prior/utils.py",
"neps/search_spaces/architecture/**/*.py",
"neps/search_spaces/yaml_search_space_utils.py",
"neps/search_spaces/architecture",
"neps/utils/run_args_from_yaml.py",
"neps/api.py",
"tests",
"neps_examples",
".bzr",
".direnv",
".eggs",
".git",
".hg",
".mypy_cache",
".nox",
".pants.d",
".ruff_cache",
".svn",
".tox",
".venv",
"__pypackages__",
"_build",
"buck-out",
"build",
"dist",
"node_modules",
"venv",
"docs",
]
[tool.ruff.lint]
# Extend what ruff is allowed to fix, even if it may break
# This is okay given we use it all the time and it ensures
# better practices. Would be dangerous if using for first
# time on established project.
extend-safe-fixes = ["ALL"]
# Allow unused variables when underscore-prefixed.
dummy-variable-rgx = "^(_+|(_+[a-zA-Z0-9_]*[a-zA-Z0-9]+?))$"
select = [
"A",
# "ANN", # Handled by mypy
"ARG",
"B",
"BLE",
"COM",
"C4",
"D",
# "DTZ", # One day I should know how to utilize timezones and dates...
"E",
# "EXE", Meh
"ERA",
"F",
"FBT",
"I",
# "ISC", # Favours implicit string concatenation
"INP",
# "INT", # I don't understand this one
"N",
"NPY",
"PD",
"PLC",
"PLE",
"PLR",
"PLW",
"PIE",
"PT",
"PTH",
# "PYI", # Specific to .pyi files for type stubs
"Q",
"PGH004",
"RET",
"RUF",
"C90",
"S",
# "SLF", # Private member accessed (sure, it's python)
"SIM",
# "TRY", # Good in principle, would take a lot of work to statisfy
"T10",
"T20",
"TID",
"TCH",
"UP",
"N",
"W",
"YTT",
]
ignore = [
"D104", # Missing docstring in public package
"D105", # Missing docstring in magic mthod
"D203", # 1 blank line required before class docstring
"D205", # 1 blank line between summary and description
"D401", # First line of docstring should be in imperative mood
"N806", # Variable X in function should be lowercase
"E731", # Do not assign a lambda expression, use a def
"A003", # Shadowing a builtin
"S101", # Use of assert detected.
"W292", # No newline at end of file
"PLC1901", # "" can be simplified to be falsey
"TCH003", # Move stdlib import into TYPE_CHECKING
"B010", # Do not use `setattr`
"PD901", # Use a better name than 'df'
"PD011", # Use .to_numpy() instead of .values (triggers on report.values)
"PD008", # Use `.loc` instead of `.at`. If speed is important, use NumPy.
"COM812", # Require trailing commas, recommended to ignore due to ruff formatter
"PLR2004", # No magic numbers inline
"N817", # CamelCase import as (ignore for ConfigSpace)
"N999", # Invalid name for module
"NPY002", # Replace legacy `np.random.choice` call with `np.random.Generator`
"N803", # Arguments should start with a lower case letter.
"S311", # Standard pseudo-random generators are not suitable for cryptographic purposes
]
# Exclude a variety of commonly ignored directories.
[tool.ruff.lint.per-file-ignores]
"tests/*.py" = [
"S101",
"D101",
"D102",
"D103",
"ANN001",
"ANN201",
"FBT001",
"D100",
"PD901", # X is a bad variable name. (pandas)
"TCH",
"N803",
"C901", # Too complex
]
"__init__.py" = ["I002"]
"neps_examples/*" = [
"INP001",
"I002",
"E741",
"D101",
"D103",
"T20",
"D415",
"ERA001",
"E402",
"E501",
]
"docs/*" = ["INP001"]
# TODO
"neps/optimizers/**.py" = [
"D", # Documentation of everything
"ARG002", # Unused arguments, bunch of them in inits
"PLR0913", # Too many arguments...
]
[tool.ruff.lint.isort]
known-first-party = ["neps"]
known-third-party = []
required-imports = ["from __future__ import annotations"]
no-lines-before = ["future"]
combine-as-imports = true
extra-standard-library = ["typing_extensions"]
force-wrap-aliases = true
[tool.ruff.lint.pydocstyle]
convention = "google"
[tool.ruff.lint.pylint]
max-args = 10 # Changed from default of 5
[tool.pytest.ini_options]
addopts = "--basetemp ./tests_tmpdir -m 'not ci_examples'"
markers = [
"ci_examples",
"core_examples",
"regression_all",
"runtime",
"neps_api",
"summary_csv",
]
filterwarnings = "ignore::DeprecationWarning:torch.utils.tensorboard.*:"
[tool.mypy]
python_version = "3.10" # Match minimum supported version
packages = ["neps"]
show_error_codes = true
namespace_packages = true
explicit_package_bases = true
follow_imports = "normal"
ignore_missing_imports = true
warn_unused_configs = true
warn_redundant_casts = true
warn_return_any = true
warn_unreachable = true
disallow_untyped_defs = true # All functions must have types
disallow_untyped_decorators = true # ... even decorators
disallow_incomplete_defs = true # ...all types
no_implicit_optional = true
check_untyped_defs = true
# TODO(eddiebergman): Improve coverage on these modules
[[tool.mypy.overrides]]
module = [
"neps.api",
"neps.search_spaces.architecture.*",
"neps.utils.run_args_from_yaml",
"neps.optimizers.multi_fidelity.successive_halving",
"neps.optimizers.multi_fidelity.sampling_policy",
"neps.optimizers.multi_fidelity.promotion_policy",
"neps.optimizers.bayesian_optimization.acquisition_functions.ei",
"neps.optimizers.bayesian_optimization.acquisition_functions.prior_weighted",
"neps.optimizers.bayesian_optimization.acquisition_functions.ucb",
"neps.optimizers.bayesian_optimization.acquisition_functions.base_acquisition",
"neps.optimizers.bayesian_optimization.acquisition_functions.weighted_acquisition",
"requests.*",
]
ignore_errors = true
[tool.bumpversion]
current_version = "0.12.2"
commit = true
tag = true
[[tool.bumpversion.files]]
filename = "pyproject.toml"
search = "version = \"v{current_version}\""
replace = "version = \"v{new_version}\""
[[tool.bumpversion.files]]
filename = "CITATION.cff"
search = "version: {current_version}"
replace = "version: {new_version}"