We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Review constrain scikit-learn< 0.23
scikit-optimize 0.8.1 has been released which works together with scikit-learn >= 0.23

https://github.com/scikit-optimize/scikit-optimize/releases/tag/v0.8.1

--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `setup.py`
Content:
```
1 import os
2 from typing import Dict
3 from typing import List
4 from typing import Optional
5 
6 import pkg_resources
7 from setuptools import find_packages
8 from setuptools import setup
9 
10 
11 def get_version() -> str:
12 
13     version_filepath = os.path.join(os.path.dirname(__file__), "optuna", "version.py")
14     with open(version_filepath) as f:
15         for line in f:
16             if line.startswith("__version__"):
17                 return line.strip().split()[-1][1:-1]
18     assert False
19 
20 
21 def get_long_description() -> str:
22 
23     readme_filepath = os.path.join(os.path.dirname(__file__), "README.md")
24     with open(readme_filepath) as f:
25         return f.read()
26 
27 
28 def get_install_requires() -> List[str]:
29 
30     requirements = [
31         "alembic",
32         "cliff",
33         "cmaes>=0.8.2",
34         "colorlog",
35         "numpy",
36         "packaging>=20.0",
37         "scipy!=1.4.0",
38         "sqlalchemy>=1.1.0",
39         "tqdm",
40     ]
41     return requirements
42 
43 
44 def get_tests_require() -> List[str]:
45 
46     return get_extras_require()["testing"]
47 
48 
49 def get_extras_require() -> Dict[str, List[str]]:
50 
51     requirements = {
52         # TODO(HideakiImamura) Unpin mypy version after fixing "Duplicate modules" error in
53         # examples and tutorials.
54         "checking": ["black", "hacking", "isort", "mypy==0.790", "blackdoc"],
55         "codecov": ["codecov", "pytest-cov"],
56         "doctest": [
57             "cma",
58             "matplotlib>=3.0.0",
59             "pandas",
60             "plotly>=4.0.0",
61             "scikit-learn>=0.19.0,<0.23.0",
62             "scikit-optimize",
63             "mlflow",
64         ],
65         "document": [
66             # TODO(nzw): Remove the version constraint after resolving the issue
67             # https://github.com/optuna/optuna/issues/2658.
68             "sphinx<4.0.0",
69             "sphinx_rtd_theme",
70             "sphinx-copybutton",
71             "sphinx-gallery",
72             "sphinx-plotly-directive",
73             "pillow",
74             "matplotlib",
75             "scikit-learn",
76             "plotly>=4.0.0",  # optuna/visualization.
77             "pandas",
78             "lightgbm",
79             "torch==1.8.0",
80             "torchvision==0.9.0",
81             "torchaudio==0.8.0",
82             "thop",
83         ],
84         "example": [
85             "nbval",
86             "scikit-learn>=0.19.0,<0.23.0 ; python_version<'3.9'",
87             # optuna/visualization/param_importances.py.
88             "thop",
89             "torch==1.8.0 ; sys_platform=='darwin'",
90             "torch==1.8.0+cpu ; sys_platform!='darwin'",
91             "torchvision==0.9.0 ; sys_platform=='darwin'",
92             "torchvision==0.9.0+cpu ; sys_platform!='darwin'",
93             "torchaudio==0.8.0",
94             "botorch>=0.4.0 ; python_version>'3.6'",
95             "pandas",
96             "plotly",
97             "requests",
98         ],
99         "experimental": ["redis"],
100         "testing": [
101             # TODO(toshihikoyanase): Remove the version constraint after resolving the issue
102             # https://github.com/optuna/optuna/issues/1000.
103             "bokeh<2.0.0",
104             "chainer>=5.0.0",
105             "cma",
106             "fakeredis",
107             "lightgbm",
108             "matplotlib>=3.0.0",
109             "mlflow",
110             "mpi4py",
111             "mxnet",
112             "pandas",
113             "plotly>=4.0.0",
114             "pytest",
115             "scikit-learn>=0.19.0,<0.23.0",
116             "scikit-optimize",
117             "xgboost",
118             "keras",
119             # TODO(HideakiImamura): Remove the version constraint after resolving the issue
120             # https://github.com/keras-team/keras/issues/14632
121             "tensorflow<2.5.0 ; python_version<'3.9'",
122             "tensorflow-datasets",
123             "pytorch-ignite",
124             "pytorch-lightning>=1.0.2",
125             "skorch",
126             "catalyst>=21.3",
127             "torch==1.8.0 ; sys_platform=='darwin'",
128             "torch==1.8.0+cpu ; sys_platform!='darwin'",
129             "torchvision==0.9.0 ; sys_platform=='darwin'",
130             "torchvision==0.9.0+cpu ; sys_platform!='darwin'",
131             "torchaudio==0.8.0",
132             "allennlp>=2.2.0",
133             "botorch>=0.4.0 ; python_version>'3.6'",
134             "fastai",
135         ],
136         "tests": [
137             "fakeredis",
138             "pytest",
139         ],
140         "optional": [
141             "bokeh<2.0.0",  # optuna/cli.py, optuna/dashboard.py.
142             "matplotlib>=3.0.0",  # optuna/visualization/matplotlib
143             "pandas",  # optuna/study.py
144             "plotly>=4.0.0",  # optuna/visualization.
145             "redis",  # optuna/storages/redis.py.
146             "scikit-learn>=0.19.0,<0.23.0 ; python_version<'3.9'",
147             # optuna/visualization/param_importances.py.
148         ],
149         "integration": [
150             # TODO(toshihikoyanase): Remove the version constraint after resolving the issue
151             # https://github.com/optuna/optuna/issues/1000.
152             "chainer>=5.0.0",
153             "cma",
154             "lightgbm",
155             "mlflow",
156             "mpi4py",
157             "mxnet",
158             "pandas",
159             "scikit-learn>=0.19.0,<0.23.0 ; python_version<'3.9'",
160             "scikit-optimize",
161             "xgboost",
162             "keras ; python_version<'3.9'",
163             # TODO(HideakiImamura): Remove the version constraint after resolving the issue
164             # https://github.com/keras-team/keras/issues/14632
165             "tensorflow<2.5.0 ; python_version<'3.9'",
166             "tensorflow-datasets ; python_version<'3.9'",
167             "pytorch-ignite",
168             "pytorch-lightning>=1.0.2",
169             "skorch",
170             "catalyst>=21.3",
171             "torch==1.8.0 ; sys_platform=='darwin'",
172             "torch==1.8.0+cpu ; sys_platform!='darwin'",
173             "torchvision==0.9.0 ; sys_platform=='darwin'",
174             "torchvision==0.9.0+cpu ; sys_platform!='darwin'",
175             "torchaudio==0.8.0",
176             "allennlp>=2.2.0",
177             "botorch>=0.4.0 ; python_version>'3.6'",
178             "fastai",
179         ],
180     }
181 
182     return requirements
183 
184 
185 def find_any_distribution(pkgs: List[str]) -> Optional[pkg_resources.Distribution]:
186 
187     for pkg in pkgs:
188         try:
189             return pkg_resources.get_distribution(pkg)
190         except pkg_resources.DistributionNotFound:
191             pass
192     return None
193 
194 
195 setup(
196     name="optuna",
197     version=get_version(),
198     description="A hyperparameter optimization framework",
199     long_description=get_long_description(),
200     long_description_content_type="text/markdown",
201     author="Takuya Akiba",
202     author_email="akiba@preferred.jp",
203     url="https://optuna.org/",
204     packages=find_packages(exclude=("tests", "tests.*")),
205     package_data={
206         "optuna": [
207             "storages/_rdb/alembic.ini",
208             "storages/_rdb/alembic/*.*",
209             "storages/_rdb/alembic/versions/*.*",
210             "py.typed",
211         ]
212     },
213     python_requires=">=3.6",
214     install_requires=get_install_requires(),
215     tests_require=get_tests_require(),
216     extras_require=get_extras_require(),
217     entry_points={
218         "console_scripts": ["optuna = optuna.cli:main"],
219         "optuna.command": [
220             "create-study = optuna.cli:_CreateStudy",
221             "delete-study = optuna.cli:_DeleteStudy",
222             "study set-user-attr = optuna.cli:_StudySetUserAttribute",
223             "studies = optuna.cli:_Studies",
224             "dashboard = optuna.cli:_Dashboard",
225             "study optimize = optuna.cli:_StudyOptimize",
226             "storage upgrade = optuna.cli:_StorageUpgrade",
227         ],
228     },
229     classifiers=[
230         "Development Status :: 5 - Production/Stable",
231         "Intended Audience :: Science/Research",
232         "Intended Audience :: Developers",
233         "License :: OSI Approved :: MIT License",
234         "Programming Language :: Python :: 3",
235         "Programming Language :: Python :: 3.6",
236         "Programming Language :: Python :: 3.7",
237         "Programming Language :: Python :: 3.8",
238         "Programming Language :: Python :: 3.9",
239         "Programming Language :: Python :: 3 :: Only",
240         "Topic :: Scientific/Engineering",
241         "Topic :: Scientific/Engineering :: Mathematics",
242         "Topic :: Scientific/Engineering :: Artificial Intelligence",
243         "Topic :: Software Development",
244         "Topic :: Software Development :: Libraries",
245         "Topic :: Software Development :: Libraries :: Python Modules",
246     ],
247 )
248
```
--- END FILES ---

Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.

Here is an example:

```diff
diff --git a/examples/server_async.py b/examples/server_async.py
--- a/examples/server_async.py
+++ b/examples/server_async.py
@@ -313,4 +313,4 @@
 
 
 if __name__ == "__main__":
-    asyncio.run(run_async_server("."), debug=True)
+    asyncio.run(run_async_server(), debug=True)
diff --git a/examples/server_sync.py b/examples/server_sync.py
--- a/examples/server_sync.py
+++ b/examples/server_sync.py
@@ -313,5 +313,5 @@
 
 
 if __name__ == "__main__":
-    server = run_sync_server(".")
+    server = run_sync_server()
     server.shutdown()

```

diff --git a/setup.py b/setup.py
--- a/setup.py
+++ b/setup.py
@@ -58,7 +58,7 @@
             "matplotlib>=3.0.0",
             "pandas",
             "plotly>=4.0.0",
-            "scikit-learn>=0.19.0,<0.23.0",
+            "scikit-learn>=0.24.2",
             "scikit-optimize",
             "mlflow",
         ],
@@ -83,7 +83,7 @@
         ],
         "example": [
             "nbval",
-            "scikit-learn>=0.19.0,<0.23.0 ; python_version<'3.9'",
+            "scikit-learn>=0.24.2",
             # optuna/visualization/param_importances.py.
             "thop",
             "torch==1.8.0 ; sys_platform=='darwin'",
@@ -112,7 +112,7 @@
             "pandas",
             "plotly>=4.0.0",
             "pytest",
-            "scikit-learn>=0.19.0,<0.23.0",
+            "scikit-learn>=0.24.2",
             "scikit-optimize",
             "xgboost",
             "keras",
@@ -143,7 +143,7 @@
             "pandas",  # optuna/study.py
             "plotly>=4.0.0",  # optuna/visualization.
             "redis",  # optuna/storages/redis.py.
-            "scikit-learn>=0.19.0,<0.23.0 ; python_version<'3.9'",
+            "scikit-learn>=0.24.2",
             # optuna/visualization/param_importances.py.
         ],
         "integration": [
@@ -156,7 +156,7 @@
             "mpi4py",
             "mxnet",
             "pandas",
-            "scikit-learn>=0.19.0,<0.23.0 ; python_version<'3.9'",
+            "scikit-learn>=0.24.2",
             "scikit-optimize",
             "xgboost",
             "keras ; python_version<'3.9'",

{"golden_diff": "diff --git a/setup.py b/setup.py\n--- a/setup.py\n+++ b/setup.py\n@@ -58,7 +58,7 @@\n             \"matplotlib>=3.0.0\",\n             \"pandas\",\n             \"plotly>=4.0.0\",\n-            \"scikit-learn>=0.19.0,<0.23.0\",\n+            \"scikit-learn>=0.24.2\",\n             \"scikit-optimize\",\n             \"mlflow\",\n         ],\n@@ -83,7 +83,7 @@\n         ],\n         \"example\": [\n             \"nbval\",\n-            \"scikit-learn>=0.19.0,<0.23.0 ; python_version<'3.9'\",\n+            \"scikit-learn>=0.24.2\",\n             # optuna/visualization/param_importances.py.\n             \"thop\",\n             \"torch==1.8.0 ; sys_platform=='darwin'\",\n@@ -112,7 +112,7 @@\n             \"pandas\",\n             \"plotly>=4.0.0\",\n             \"pytest\",\n-            \"scikit-learn>=0.19.0,<0.23.0\",\n+            \"scikit-learn>=0.24.2\",\n             \"scikit-optimize\",\n             \"xgboost\",\n             \"keras\",\n@@ -143,7 +143,7 @@\n             \"pandas\",  # optuna/study.py\n             \"plotly>=4.0.0\",  # optuna/visualization.\n             \"redis\",  # optuna/storages/redis.py.\n-            \"scikit-learn>=0.19.0,<0.23.0 ; python_version<'3.9'\",\n+            \"scikit-learn>=0.24.2\",\n             # optuna/visualization/param_importances.py.\n         ],\n         \"integration\": [\n@@ -156,7 +156,7 @@\n             \"mpi4py\",\n             \"mxnet\",\n             \"pandas\",\n-            \"scikit-learn>=0.19.0,<0.23.0 ; python_version<'3.9'\",\n+            \"scikit-learn>=0.24.2\",\n             \"scikit-optimize\",\n             \"xgboost\",\n             \"keras ; python_version<'3.9'\",\n", "issue": "Review constrain scikit-learn< 0.23\nscikit-optimize 0.8.1 has been released which works together with scikit-learn >= 0.23\r\n\r\nhttps://github.com/scikit-optimize/scikit-optimize/releases/tag/v0.8.1\n", "before_files": [{"content": "import os\nfrom typing import Dict\nfrom typing import List\nfrom typing import Optional\n\nimport pkg_resources\nfrom setuptools import find_packages\nfrom setuptools import setup\n\n\ndef get_version() -> str:\n\n    version_filepath = os.path.join(os.path.dirname(__file__), \"optuna\", \"version.py\")\n    with open(version_filepath) as f:\n        for line in f:\n            if line.startswith(\"__version__\"):\n                return line.strip().split()[-1][1:-1]\n    assert False\n\n\ndef get_long_description() -> str:\n\n    readme_filepath = os.path.join(os.path.dirname(__file__), \"README.md\")\n    with open(readme_filepath) as f:\n        return f.read()\n\n\ndef get_install_requires() -> List[str]:\n\n    requirements = [\n        \"alembic\",\n        \"cliff\",\n        \"cmaes>=0.8.2\",\n        \"colorlog\",\n        \"numpy\",\n        \"packaging>=20.0\",\n        \"scipy!=1.4.0\",\n        \"sqlalchemy>=1.1.0\",\n        \"tqdm\",\n    ]\n    return requirements\n\n\ndef get_tests_require() -> List[str]:\n\n    return get_extras_require()[\"testing\"]\n\n\ndef get_extras_require() -> Dict[str, List[str]]:\n\n    requirements = {\n        # TODO(HideakiImamura) Unpin mypy version after fixing \"Duplicate modules\" error in\n        # examples and tutorials.\n        \"checking\": [\"black\", \"hacking\", \"isort\", \"mypy==0.790\", \"blackdoc\"],\n        \"codecov\": [\"codecov\", \"pytest-cov\"],\n        \"doctest\": [\n            \"cma\",\n            \"matplotlib>=3.0.0\",\n            \"pandas\",\n            \"plotly>=4.0.0\",\n            \"scikit-learn>=0.19.0,<0.23.0\",\n            \"scikit-optimize\",\n            \"mlflow\",\n        ],\n        \"document\": [\n            # TODO(nzw): Remove the version constraint after resolving the issue\n            # https://github.com/optuna/optuna/issues/2658.\n            \"sphinx<4.0.0\",\n            \"sphinx_rtd_theme\",\n            \"sphinx-copybutton\",\n            \"sphinx-gallery\",\n            \"sphinx-plotly-directive\",\n            \"pillow\",\n            \"matplotlib\",\n            \"scikit-learn\",\n            \"plotly>=4.0.0\",  # optuna/visualization.\n            \"pandas\",\n            \"lightgbm\",\n            \"torch==1.8.0\",\n            \"torchvision==0.9.0\",\n            \"torchaudio==0.8.0\",\n            \"thop\",\n        ],\n        \"example\": [\n            \"nbval\",\n            \"scikit-learn>=0.19.0,<0.23.0 ; python_version<'3.9'\",\n            # optuna/visualization/param_importances.py.\n            \"thop\",\n            \"torch==1.8.0 ; sys_platform=='darwin'\",\n            \"torch==1.8.0+cpu ; sys_platform!='darwin'\",\n            \"torchvision==0.9.0 ; sys_platform=='darwin'\",\n            \"torchvision==0.9.0+cpu ; sys_platform!='darwin'\",\n            \"torchaudio==0.8.0\",\n            \"botorch>=0.4.0 ; python_version>'3.6'\",\n            \"pandas\",\n            \"plotly\",\n            \"requests\",\n        ],\n        \"experimental\": [\"redis\"],\n        \"testing\": [\n            # TODO(toshihikoyanase): Remove the version constraint after resolving the issue\n            # https://github.com/optuna/optuna/issues/1000.\n            \"bokeh<2.0.0\",\n            \"chainer>=5.0.0\",\n            \"cma\",\n            \"fakeredis\",\n            \"lightgbm\",\n            \"matplotlib>=3.0.0\",\n            \"mlflow\",\n            \"mpi4py\",\n            \"mxnet\",\n            \"pandas\",\n            \"plotly>=4.0.0\",\n            \"pytest\",\n            \"scikit-learn>=0.19.0,<0.23.0\",\n            \"scikit-optimize\",\n            \"xgboost\",\n            \"keras\",\n            # TODO(HideakiImamura): Remove the version constraint after resolving the issue\n            # https://github.com/keras-team/keras/issues/14632\n            \"tensorflow<2.5.0 ; python_version<'3.9'\",\n            \"tensorflow-datasets\",\n            \"pytorch-ignite\",\n            \"pytorch-lightning>=1.0.2\",\n            \"skorch\",\n            \"catalyst>=21.3\",\n            \"torch==1.8.0 ; sys_platform=='darwin'\",\n            \"torch==1.8.0+cpu ; sys_platform!='darwin'\",\n            \"torchvision==0.9.0 ; sys_platform=='darwin'\",\n            \"torchvision==0.9.0+cpu ; sys_platform!='darwin'\",\n            \"torchaudio==0.8.0\",\n            \"allennlp>=2.2.0\",\n            \"botorch>=0.4.0 ; python_version>'3.6'\",\n            \"fastai\",\n        ],\n        \"tests\": [\n            \"fakeredis\",\n            \"pytest\",\n        ],\n        \"optional\": [\n            \"bokeh<2.0.0\",  # optuna/cli.py, optuna/dashboard.py.\n            \"matplotlib>=3.0.0\",  # optuna/visualization/matplotlib\n            \"pandas\",  # optuna/study.py\n            \"plotly>=4.0.0\",  # optuna/visualization.\n            \"redis\",  # optuna/storages/redis.py.\n            \"scikit-learn>=0.19.0,<0.23.0 ; python_version<'3.9'\",\n            # optuna/visualization/param_importances.py.\n        ],\n        \"integration\": [\n            # TODO(toshihikoyanase): Remove the version constraint after resolving the issue\n            # https://github.com/optuna/optuna/issues/1000.\n            \"chainer>=5.0.0\",\n            \"cma\",\n            \"lightgbm\",\n            \"mlflow\",\n            \"mpi4py\",\n            \"mxnet\",\n            \"pandas\",\n            \"scikit-learn>=0.19.0,<0.23.0 ; python_version<'3.9'\",\n            \"scikit-optimize\",\n            \"xgboost\",\n            \"keras ; python_version<'3.9'\",\n            # TODO(HideakiImamura): Remove the version constraint after resolving the issue\n            # https://github.com/keras-team/keras/issues/14632\n            \"tensorflow<2.5.0 ; python_version<'3.9'\",\n            \"tensorflow-datasets ; python_version<'3.9'\",\n            \"pytorch-ignite\",\n            \"pytorch-lightning>=1.0.2\",\n            \"skorch\",\n            \"catalyst>=21.3\",\n            \"torch==1.8.0 ; sys_platform=='darwin'\",\n            \"torch==1.8.0+cpu ; sys_platform!='darwin'\",\n            \"torchvision==0.9.0 ; sys_platform=='darwin'\",\n            \"torchvision==0.9.0+cpu ; sys_platform!='darwin'\",\n            \"torchaudio==0.8.0\",\n            \"allennlp>=2.2.0\",\n            \"botorch>=0.4.0 ; python_version>'3.6'\",\n            \"fastai\",\n        ],\n    }\n\n    return requirements\n\n\ndef find_any_distribution(pkgs: List[str]) -> Optional[pkg_resources.Distribution]:\n\n    for pkg in pkgs:\n        try:\n            return pkg_resources.get_distribution(pkg)\n        except pkg_resources.DistributionNotFound:\n            pass\n    return None\n\n\nsetup(\n    name=\"optuna\",\n    version=get_version(),\n    description=\"A hyperparameter optimization framework\",\n    long_description=get_long_description(),\n    long_description_content_type=\"text/markdown\",\n    author=\"Takuya Akiba\",\n    author_email=\"akiba@preferred.jp\",\n    url=\"https://optuna.org/\",\n    packages=find_packages(exclude=(\"tests\", \"tests.*\")),\n    package_data={\n        \"optuna\": [\n            \"storages/_rdb/alembic.ini\",\n            \"storages/_rdb/alembic/*.*\",\n            \"storages/_rdb/alembic/versions/*.*\",\n            \"py.typed\",\n        ]\n    },\n    python_requires=\">=3.6\",\n    install_requires=get_install_requires(),\n    tests_require=get_tests_require(),\n    extras_require=get_extras_require(),\n    entry_points={\n        \"console_scripts\": [\"optuna = optuna.cli:main\"],\n        \"optuna.command\": [\n            \"create-study = optuna.cli:_CreateStudy\",\n            \"delete-study = optuna.cli:_DeleteStudy\",\n            \"study set-user-attr = optuna.cli:_StudySetUserAttribute\",\n            \"studies = optuna.cli:_Studies\",\n            \"dashboard = optuna.cli:_Dashboard\",\n            \"study optimize = optuna.cli:_StudyOptimize\",\n            \"storage upgrade = optuna.cli:_StorageUpgrade\",\n        ],\n    },\n    classifiers=[\n        \"Development Status :: 5 - Production/Stable\",\n        \"Intended Audience :: Science/Research\",\n        \"Intended Audience :: Developers\",\n        \"License :: OSI Approved :: MIT License\",\n        \"Programming Language :: Python :: 3\",\n        \"Programming Language :: Python :: 3.6\",\n        \"Programming Language :: Python :: 3.7\",\n        \"Programming Language :: Python :: 3.8\",\n        \"Programming Language :: Python :: 3.9\",\n        \"Programming Language :: Python :: 3 :: Only\",\n        \"Topic :: Scientific/Engineering\",\n        \"Topic :: Scientific/Engineering :: Mathematics\",\n        \"Topic :: Scientific/Engineering :: Artificial Intelligence\",\n        \"Topic :: Software Development\",\n        \"Topic :: Software Development :: Libraries\",\n        \"Topic :: Software Development :: Libraries :: Python Modules\",\n    ],\n)\n", "path": "setup.py"}], "after_files": [{"content": "import os\nfrom typing import Dict\nfrom typing import List\nfrom typing import Optional\n\nimport pkg_resources\nfrom setuptools import find_packages\nfrom setuptools import setup\n\n\ndef get_version() -> str:\n\n    version_filepath = os.path.join(os.path.dirname(__file__), \"optuna\", \"version.py\")\n    with open(version_filepath) as f:\n        for line in f:\n            if line.startswith(\"__version__\"):\n                return line.strip().split()[-1][1:-1]\n    assert False\n\n\ndef get_long_description() -> str:\n\n    readme_filepath = os.path.join(os.path.dirname(__file__), \"README.md\")\n    with open(readme_filepath) as f:\n        return f.read()\n\n\ndef get_install_requires() -> List[str]:\n\n    requirements = [\n        \"alembic\",\n        \"cliff\",\n        \"cmaes>=0.8.2\",\n        \"colorlog\",\n        \"numpy\",\n        \"packaging>=20.0\",\n        \"scipy!=1.4.0\",\n        \"sqlalchemy>=1.1.0\",\n        \"tqdm\",\n    ]\n    return requirements\n\n\ndef get_tests_require() -> List[str]:\n\n    return get_extras_require()[\"testing\"]\n\n\ndef get_extras_require() -> Dict[str, List[str]]:\n\n    requirements = {\n        # TODO(HideakiImamura) Unpin mypy version after fixing \"Duplicate modules\" error in\n        # examples and tutorials.\n        \"checking\": [\"black\", \"hacking\", \"isort\", \"mypy==0.790\", \"blackdoc\"],\n        \"codecov\": [\"codecov\", \"pytest-cov\"],\n        \"doctest\": [\n            \"cma\",\n            \"matplotlib>=3.0.0\",\n            \"pandas\",\n            \"plotly>=4.0.0\",\n            \"scikit-learn>=0.24.2\",\n            \"scikit-optimize\",\n            \"mlflow\",\n        ],\n        \"document\": [\n            # TODO(nzw): Remove the version constraint after resolving the issue\n            # https://github.com/optuna/optuna/issues/2658.\n            \"sphinx<4.0.0\",\n            \"sphinx_rtd_theme\",\n            \"sphinx-copybutton\",\n            \"sphinx-gallery\",\n            \"sphinx-plotly-directive\",\n            \"pillow\",\n            \"matplotlib\",\n            \"scikit-learn\",\n            \"plotly>=4.0.0\",  # optuna/visualization.\n            \"pandas\",\n            \"lightgbm\",\n            \"torch==1.8.0\",\n            \"torchvision==0.9.0\",\n            \"torchaudio==0.8.0\",\n            \"thop\",\n        ],\n        \"example\": [\n            \"nbval\",\n            \"scikit-learn>=0.24.2\",\n            # optuna/visualization/param_importances.py.\n            \"thop\",\n            \"torch==1.8.0 ; sys_platform=='darwin'\",\n            \"torch==1.8.0+cpu ; sys_platform!='darwin'\",\n            \"torchvision==0.9.0 ; sys_platform=='darwin'\",\n            \"torchvision==0.9.0+cpu ; sys_platform!='darwin'\",\n            \"torchaudio==0.8.0\",\n            \"botorch>=0.4.0 ; python_version>'3.6'\",\n            \"pandas\",\n            \"plotly\",\n            \"requests\",\n        ],\n        \"experimental\": [\"redis\"],\n        \"testing\": [\n            # TODO(toshihikoyanase): Remove the version constraint after resolving the issue\n            # https://github.com/optuna/optuna/issues/1000.\n            \"bokeh<2.0.0\",\n            \"chainer>=5.0.0\",\n            \"cma\",\n            \"fakeredis\",\n            \"lightgbm\",\n            \"matplotlib>=3.0.0\",\n            \"mlflow\",\n            \"mpi4py\",\n            \"mxnet\",\n            \"pandas\",\n            \"plotly>=4.0.0\",\n            \"pytest\",\n            \"scikit-learn>=0.24.2\",\n            \"scikit-optimize\",\n            \"xgboost\",\n            \"keras\",\n            # TODO(HideakiImamura): Remove the version constraint after resolving the issue\n            # https://github.com/keras-team/keras/issues/14632\n            \"tensorflow<2.5.0 ; python_version<'3.9'\",\n            \"tensorflow-datasets\",\n            \"pytorch-ignite\",\n            \"pytorch-lightning>=1.0.2\",\n            \"skorch\",\n            \"catalyst>=21.3\",\n            \"torch==1.8.0 ; sys_platform=='darwin'\",\n            \"torch==1.8.0+cpu ; sys_platform!='darwin'\",\n            \"torchvision==0.9.0 ; sys_platform=='darwin'\",\n            \"torchvision==0.9.0+cpu ; sys_platform!='darwin'\",\n            \"torchaudio==0.8.0\",\n            \"allennlp>=2.2.0\",\n            \"botorch>=0.4.0 ; python_version>'3.6'\",\n            \"fastai\",\n        ],\n        \"tests\": [\n            \"fakeredis\",\n            \"pytest\",\n        ],\n        \"optional\": [\n            \"bokeh<2.0.0\",  # optuna/cli.py, optuna/dashboard.py.\n            \"matplotlib>=3.0.0\",  # optuna/visualization/matplotlib\n            \"pandas\",  # optuna/study.py\n            \"plotly>=4.0.0\",  # optuna/visualization.\n            \"redis\",  # optuna/storages/redis.py.\n            \"scikit-learn>=0.24.2\",\n            # optuna/visualization/param_importances.py.\n        ],\n        \"integration\": [\n            # TODO(toshihikoyanase): Remove the version constraint after resolving the issue\n            # https://github.com/optuna/optuna/issues/1000.\n            \"chainer>=5.0.0\",\n            \"cma\",\n            \"lightgbm\",\n            \"mlflow\",\n            \"mpi4py\",\n            \"mxnet\",\n            \"pandas\",\n            \"scikit-learn>=0.24.2\",\n            \"scikit-optimize\",\n            \"xgboost\",\n            \"keras ; python_version<'3.9'\",\n            # TODO(HideakiImamura): Remove the version constraint after resolving the issue\n            # https://github.com/keras-team/keras/issues/14632\n            \"tensorflow<2.5.0 ; python_version<'3.9'\",\n            \"tensorflow-datasets ; python_version<'3.9'\",\n            \"pytorch-ignite\",\n            \"pytorch-lightning>=1.0.2\",\n            \"skorch\",\n            \"catalyst>=21.3\",\n            \"torch==1.8.0 ; sys_platform=='darwin'\",\n            \"torch==1.8.0+cpu ; sys_platform!='darwin'\",\n            \"torchvision==0.9.0 ; sys_platform=='darwin'\",\n            \"torchvision==0.9.0+cpu ; sys_platform!='darwin'\",\n            \"torchaudio==0.8.0\",\n            \"allennlp>=2.2.0\",\n            \"botorch>=0.4.0 ; python_version>'3.6'\",\n            \"fastai\",\n        ],\n    }\n\n    return requirements\n\n\ndef find_any_distribution(pkgs: List[str]) -> Optional[pkg_resources.Distribution]:\n\n    for pkg in pkgs:\n        try:\n            return pkg_resources.get_distribution(pkg)\n        except pkg_resources.DistributionNotFound:\n            pass\n    return None\n\n\nsetup(\n    name=\"optuna\",\n    version=get_version(),\n    description=\"A hyperparameter optimization framework\",\n    long_description=get_long_description(),\n    long_description_content_type=\"text/markdown\",\n    author=\"Takuya Akiba\",\n    author_email=\"akiba@preferred.jp\",\n    url=\"https://optuna.org/\",\n    packages=find_packages(exclude=(\"tests\", \"tests.*\")),\n    package_data={\n        \"optuna\": [\n            \"storages/_rdb/alembic.ini\",\n            \"storages/_rdb/alembic/*.*\",\n            \"storages/_rdb/alembic/versions/*.*\",\n            \"py.typed\",\n        ]\n    },\n    python_requires=\">=3.6\",\n    install_requires=get_install_requires(),\n    tests_require=get_tests_require(),\n    extras_require=get_extras_require(),\n    entry_points={\n        \"console_scripts\": [\"optuna = optuna.cli:main\"],\n        \"optuna.command\": [\n            \"create-study = optuna.cli:_CreateStudy\",\n            \"delete-study = optuna.cli:_DeleteStudy\",\n            \"study set-user-attr = optuna.cli:_StudySetUserAttribute\",\n            \"studies = optuna.cli:_Studies\",\n            \"dashboard = optuna.cli:_Dashboard\",\n            \"study optimize = optuna.cli:_StudyOptimize\",\n            \"storage upgrade = optuna.cli:_StorageUpgrade\",\n        ],\n    },\n    classifiers=[\n        \"Development Status :: 5 - Production/Stable\",\n        \"Intended Audience :: Science/Research\",\n        \"Intended Audience :: Developers\",\n        \"License :: OSI Approved :: MIT License\",\n        \"Programming Language :: Python :: 3\",\n        \"Programming Language :: Python :: 3.6\",\n        \"Programming Language :: Python :: 3.7\",\n        \"Programming Language :: Python :: 3.8\",\n        \"Programming Language :: Python :: 3.9\",\n        \"Programming Language :: Python :: 3 :: Only\",\n        \"Topic :: Scientific/Engineering\",\n        \"Topic :: Scientific/Engineering :: Mathematics\",\n        \"Topic :: Scientific/Engineering :: Artificial Intelligence\",\n        \"Topic :: Software Development\",\n        \"Topic :: Software Development :: Libraries\",\n        \"Topic :: Software Development :: Libraries :: Python Modules\",\n    ],\n)\n", "path": "setup.py"}]}