-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathpyproject.toml
296 lines (267 loc) · 6.42 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
[project]
name = "configurable-optimizer"
version = "0.0.0"
dependencies = [
"torch",
"torchvision",
"numpy",
"ConfigSpace",
"nasbench@git+https://github.com/automl-classroom/nasbench-for-automl-lectures",
"protobuf==3.20.*",
"wandb",
"fvcore",
"reinmax",
"thop",
"seaborn",
"scikit-image",
"gdown",
]
requires-python = ">=3.8"
authors = [
{ name = "Abhash Kumar Jha", email = "[email protected]" },
{ name = "Shakiba Moradian", email = "[email protected]" },
{ name = "Arjun Krishnakumar", email = "[email protected]" },
]
readme = "README.md"
description = "Breaks down one-shot optimizers into their core ideas and modularizes them."
classifiers = [
'Intended Audience :: Science/Research',
'Intended Audience :: Developers',
'License :: OSI Approved',
'Programming Language :: Python',
'Topic :: Software Development',
'Topic :: Scientific/Engineering',
'Operating System :: POSIX',
'Operating System :: Unix',
'Operating System :: MacOS',
'Programming Language :: Python :: 3',
]
license = { file = "LICENSE" }
[project.optional-dependencies]
dev = [
"commitizen",
"pre-commit",
"black",
"ruff",
"mypy"
]
test = [
"pytest",
"pytest-coverage",
"pytest-cases",
]
benchmark = [
"nas-bench-201",
"gdown",
"autograd>=1.3",
"click",
"Cython",
"fasteners",
"ipython",
"imblearn",
"lightgbm>=2.3.1",
"matplotlib",
"netifaces",
"pandas",
"pathvalidate",
"Pillow>=7.1.2",
"psutil",
"pynisher<0.7.0",
"Pyro4",
"scikit-image",
"scipy",
"scikit-learn",
"seaborn",
"setuptools",
"serpent",
"statsmodels",
"tensorboard",
"tensorflow-estimator",
"tensorflow",
"tensorboard_logger",
"timm",
"tqdm",
"xgboost",
"torch-scatter",
"torch-sparse",
"torch-cluster",
"torch-spline-conv",
"torch-geometric",
"nasbench301 @ git+https://github.com/abhash-er/nasbench301.git@fix_configspace",
]
doc = [
"mkdocs",
"mkdocs-material",
"mkdocs-autorefs",
"mkdocs-gen-files",
"mkdocs-literate-nav",
"mkdocstrings[python]",
"mike",
"pillow",
"cairosvg",
"myst-parser",
"sphinx_rtd_theme",
"sphinx-panels",
]
[project.urls]
documentation = "https://github.com/automl/ConfigurableOptimizer"
source = "https://github.com/automl/ConfigurableOptimizer"
# https://docs.pytest.org/en/7.2.x/reference/reference.html#ini-options-ref
[tool.pytest.ini_options]
testpaths = ["tests"]
minversion = "7.0"
empty_parameter_set_mark = "xfail"
log_cli = false
log_level = "DEBUG"
xfail_strict = true
addopts = "--durations=10 -vv"
markers = [ "benchmark" ]
[tool.coverage.run]
branch = true
context = "confopt"
[tool.coverage.report]
show_missing = true
skip_covered = true
exclude_lines = [
"pragma: no cover",
'\.\.\.',
"raise NotImplementedError",
"if TYPE_CHECKING",
]
[tool.commitizen]
name = "cz_conventional_commits"
version = "0.8.0"
tag_format = "v$major.$minor.$patch$prerelease"
update_changelog_on_bump = true
version_files = ["pyproject.toml:version", "src/confopt/__version__.py"]
[tool.black]
target-version = ['py38']
line-length = 88
# https://github.com/charliermarsh/ruff
[tool.ruff]
target-version = "py38"
line-length = 88
show-source = true
src = ["src", "tests"]
# Allow unused variables when underscore-prefixed.
dummy-variable-rgx = "^(_+|(_+[a-zA-Z0-9_]*[a-zA-Z0-9]+?))$"
select = [
"A",
"ARG",
"B",
"BLE",
"C4",
"D",
"DTZ",
"E",
"F",
"FBT",
"I",
"INP",
"N",
"PD",
"PLC",
"PLE",
"PLR",
"PLW",
"PIE",
"PT",
"Q",
"PGH004", # Use specific rule codes when using noqa
"RET",
"RUF",
"C90",
"S",
"SIM",
"T10",
"UP",
"N",
"W",
"YTT",
]
ignore = [
"D100", # Missing docstring in public module
"D101", # Missing docstring in public class
"D102", # Missing docstring in public method
"D103", # Missing docstring in public function
"D104", # Missing docstring in public package
"D105", # Missing docstring in magic mthod
"D107", # Missing docstring in __init__
"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
"FBT001", # Boolean positional arg in function definition
"FBT002", # Boolean default arg in function definition
"FBT003", # Boolean positional value in function call
"N803", # Argument name should be lowercase
"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
"PLR0913", # Too many arguments to function call
"PLR2004", # Magic value used in comparison
"PLW2901", # For loop variable overwritten by assignment target
"RET504", # Unnecessary variable assignment before `return` statement
]
exclude = [
".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",
"src/confopt/train/__init__.py",
]
# Exclude a variety of commonly ignored directories.
[tool.ruff.per-file-ignores]
"tests/*.py" = [
"S101",
"D103",
"ANN001",
"ANN201",
"D100",
"I002",
"PLR2004",
"PD901", # X is a bad variable name. (pandas)
]
"src/confopt/__version__.py" = ["D100"]
"__init__.py" = ["I002"]
"examples/*" = ["INP001"]
[tool.ruff.isort]
known-first-party = ["confopt"]
no-lines-before = ["future"]
required-imports = ["from __future__ import annotations"]
force-sort-within-sections = true
[tool.ruff.pydocstyle]
convention = "google"
[tool.mypy]
python_version = "3.11"
show_error_codes = true
warn_unused_configs = true # warn about unused [tool.mypy] lines
follow_imports = "normal" # Type check top level api code we use from imports
ignore_missing_imports = false # prefer explicit ignores
disallow_untyped_defs = true # All functions must have types
disallow_untyped_decorators = true # ... even decorators
disallow_incomplete_defs = true # ...all types
warn_return_any = true
[[tool.mypy.overrides]]
module = ["tests.*"]
disallow_untyped_defs = false # Sometimes we just want to ignore verbose types
disallow_untyped_decorators = false # Test decorators are not properly typed
disallow_incomplete_defs = false # Sometimes we just want to ignore verbose types