forked from optuna/optuna
-
Notifications
You must be signed in to change notification settings - Fork 0
/
pyproject.toml
194 lines (181 loc) · 5.03 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
[build-system]
requires = ["setuptools >= 61.1.0", "wheel"]
build-backend = "setuptools.build_meta"
[project]
name = "optuna"
description = "A hyperparameter optimization framework"
readme = "README.md"
authors = [
{name = "Takuya Akiba"}
]
classifiers = [
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Science/Research",
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: 3 :: Only",
"Topic :: Scientific/Engineering",
"Topic :: Scientific/Engineering :: Mathematics",
"Topic :: Scientific/Engineering :: Artificial Intelligence",
"Topic :: Software Development",
"Topic :: Software Development :: Libraries",
"Topic :: Software Development :: Libraries :: Python Modules",
]
requires-python = ">=3.8"
dependencies = [
"alembic>=1.5.0",
"colorlog",
"numpy",
"packaging>=20.0",
"sqlalchemy>=1.4.2",
"tqdm",
"PyYAML", # Only used in `optuna/cli.py`.
]
dynamic = ["version"]
[project.optional-dependencies]
benchmark = [
"asv>=0.5.0",
"cma",
"virtualenv"
]
checking = [
"black",
"blackdoc",
"flake8",
"isort",
"mypy",
"mypy_boto3_s3",
"types-PyYAML",
"types-redis",
"types-setuptools",
"types-tqdm",
"typing_extensions>=3.10.0.0",
]
document = [
"ase",
"cmaes>=0.10.0", # optuna/samplers/_cmaes.py.
"fvcore",
"kaleido<0.4", # TODO(nzw0301): Remove the version constraint by installing browser separately.
"lightgbm",
"matplotlib!=3.6.0",
"pandas",
"pillow",
"plotly>=4.9.0", # optuna/visualization.
"scikit-learn",
"sphinx",
"sphinx-copybutton",
"sphinx-gallery",
"sphinx_rtd_theme>=1.2.0",
"torch",
"torchvision",
]
optional = [
"boto3", # optuna/artifacts/_boto3.py.
"cmaes>=0.10.0", # optuna/samplers/_cmaes.py.
"google-cloud-storage", # optuna/artifacts/_gcs.py.
"matplotlib!=3.6.0", # optuna/visualization/matplotlib.
"pandas", # optuna/study.py.
"plotly>=4.9.0", # optuna/visualization.
"redis", # optuna/storages/redis.py.
"scikit-learn>=0.24.2",
# optuna/visualization/param_importances.py.
"scipy", # optuna/samplers/_gp
"torch; python_version<='3.12'", # TODO(gen740): Remove this line when 'torch', a dependency of 'optuna/_gp', supports Python 3.13
"grpcio", # optuna/storages/_grpc.
"protobuf>=5.28.1", # optuna/storages/_grpc.
]
test = [
"coverage",
"fakeredis[lua]",
"kaleido<0.4", # TODO(nzw0301): Remove the version constraint by installing browser separately.
"moto",
"pytest",
"scipy>=1.9.2",
"torch; python_version<='3.12'", # TODO(gen740): Remove this line when 'torch', a dependency of 'optuna/_gp', supports Python 3.13
"grpcio", # optuna/storages/_grpc.
"protobuf>=5.28.1", # optuna/storages/_grpc.
]
[project.urls]
homepage = "https://optuna.org/"
repository = "https://github.com/optuna/optuna"
documentation = "https://optuna.readthedocs.io"
bugtracker = "https://github.com/optuna/optuna/issues"
[project.scripts]
optuna = "optuna.cli:main"
[tool.setuptools.packages.find]
include = ["optuna*"]
[tool.setuptools.dynamic]
version = {attr = "optuna.version.__version__"}
[tool.setuptools.package-data]
"optuna" = [
"storages/_rdb/alembic.ini",
"storages/_rdb/alembic/*.*",
"storages/_rdb/alembic/versions/*.*",
"py.typed",
]
[tool.black]
line-length = 99
target-version = ['py38']
force-exclude = '''
/(
\.eggs
| \.git
| \.hg
| \.mypy_cache
| \.venv
| venv
| _build
| buck-out
| build
| dist
| docs
| optuna/storages/_grpc/auto_generated
)/
'''
[tool.isort]
profile = 'black'
src_paths = ['optuna', 'tests', 'docs', 'benchmarks']
skip_glob = [
'docs/source/conf.py',
'**/alembic/versions/*.py',
'tutorial/**/*.py',
'docs/visualization_examples/*.py',
'docs/visualization_matplotlib_examples/*.py',
'optuna/storages/_grpc/auto_generated/*.py'
]
line_length = 99
lines_after_imports = 2
force_single_line = 'True'
force_sort_within_sections = 'True'
order_by_type = 'False'
[tool.pytest.ini_options]
addopts = "--color=yes"
filterwarnings = 'ignore::optuna.exceptions.ExperimentalWarning'
markers = [
"skip_coverage: marks tests are skipped when calculating the coverage",
"slow: marks tests as slow (deselect with '-m \"not slow\"')",
]
[tool.mypy]
# Options configure mypy's strict mode.
warn_unused_configs = true
disallow_untyped_calls = true
disallow_untyped_defs = true
disallow_incomplete_defs = true
check_untyped_defs = true
no_implicit_optional = true
warn_redundant_casts = true
strict_equality = true
extra_checks = true
no_implicit_reexport = true
ignore_missing_imports = true
exclude = [".venv", "venv", "build", "docs", "tutorial", "optuna/storages/_rdb/alembic", "optuna/storages/_grpc/auto_generated"]
[[tool.mypy.overrides]]
module = 'optuna.storages._grpc.auto_generated/*'
follow_imports = "skip"