We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Fix docstrings
`Sphinx>=3.1.0` doesn't build our documentation for some reason (I guess our `experimental` and `deprecated` decorators are the devils, not sure though).

At first, as https://github.com/optuna/optuna/issues/1368 said, we were optimistic about this, i.e., we thought the next stable would work. However, it's not happened yet. So it's high time we dirtied our hands to enable the latest Sphinx.

~~The latest ongoing pull request is https://github.com/optuna/optuna/pull/1613.~~

--- 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 import sys
3 
4 import pkg_resources
5 from setuptools import find_packages
6 from setuptools import setup
7 
8 from typing import Dict
9 from typing import List
10 from typing import Optional
11 
12 
13 def get_version() -> str:
14 
15     version_filepath = os.path.join(os.path.dirname(__file__), "optuna", "version.py")
16     with open(version_filepath) as f:
17         for line in f:
18             if line.startswith("__version__"):
19                 return line.strip().split()[-1][1:-1]
20     assert False
21 
22 
23 def get_long_description() -> str:
24 
25     readme_filepath = os.path.join(os.path.dirname(__file__), "README.md")
26     with open(readme_filepath) as f:
27         return f.read()
28 
29 
30 def get_install_requires() -> List[str]:
31 
32     return [
33         "alembic",
34         "cliff",
35         "cmaes>=0.5.1",
36         "colorlog",
37         "joblib",
38         "numpy",
39         "packaging>=20.0",
40         "scipy!=1.4.0",
41         "sqlalchemy>=1.1.0",
42         "tqdm",
43     ]
44 
45 
46 def get_tests_require() -> List[str]:
47 
48     return get_extras_require()["testing"]
49 
50 
51 def get_extras_require() -> Dict[str, List[str]]:
52 
53     requirements = {
54         "checking": ["black", "hacking", "mypy"],
55         "codecov": ["codecov", "pytest-cov"],
56         "doctest": [
57             "cma",
58             "pandas",
59             "plotly>=4.0.0",
60             "scikit-learn>=0.19.0,<0.23.0",
61             "scikit-optimize",
62             "mlflow",
63         ],
64         "document": [
65             # TODO(hvy): Unpin `sphinx` version after:
66             # https://github.com/sphinx-doc/sphinx/issues/7807.
67             "sphinx>=3.0.0,!=3.1.0,!=3.1.1,!=3.1.2,!=3.2.0",
68             # As reported in: https://github.com/readthedocs/sphinx_rtd_theme/issues/949,
69             # `sphinx_rtd_theme` 0.5.0 is still not compatible with `sphinx` >= 3.0.
70             "sphinx_rtd_theme<0.5.0",
71             "sphinx-gallery",
72             "pillow",
73             "matplotlib",
74             "scikit-learn",
75         ],
76         "example": [
77             "catboost",
78             "chainer",
79             "lightgbm",
80             "mlflow",
81             "mpi4py",
82             "mxnet",
83             "nbval",
84             "scikit-image",
85             "scikit-learn>=0.19.0,<0.23.0",  # optuna/visualization/param_importances.py.
86             "xgboost",
87             "keras",
88             "tensorflow>=2.0.0",
89             "tensorflow-datasets",
90         ]
91         + (
92             (
93                 ["torch==1.6.0", "torchvision==0.7.0"]
94                 if sys.platform == "darwin"
95                 else ["torch==1.6.0+cpu", "torchvision==0.7.0+cpu"]
96             )
97             + ["pytorch-ignite", "thop"]
98             if (3, 5) < sys.version_info[:2]
99             else []
100         )
101         + (["stable-baselines3>=0.7.0"] if (3, 5) < sys.version_info[:2] else [])
102         + (
103             ["allennlp==1.0.0", "fastai<2", "pytorch_lightning>=0.7.1"]
104             if (3, 5) < sys.version_info[:2] < (3, 8)
105             else []
106         )
107         + (["pytorch-lightning>=0.7.2"] if (3, 8) == sys.version_info[:2] else [])
108         + (
109             ["llvmlite<=0.31.0", "fsspec<0.8.0"] if (3, 5) == sys.version_info[:2] else []
110         )  # Newer `llvmlite` is not distributed with wheels for Python 3.5.
111         # Newer `fsspec` uses f-strings, which is not compatible with Python 3.5.
112         + (["dask[dataframe]", "dask-ml",] if sys.version_info[:2] < (3, 8) else [])
113         + (["catalyst"] if (3, 5) < sys.version_info[:2] else []),
114         "experimental": ["redis"],
115         "testing": [
116             # TODO(toshihikoyanase): Remove the version constraint after resolving the issue
117             # https://github.com/optuna/optuna/issues/1000.
118             "bokeh<2.0.0",
119             "chainer>=5.0.0",
120             "cma",
121             "fakeredis",
122             "lightgbm",
123             "mlflow",
124             "mpi4py",
125             "mxnet",
126             "pandas",
127             "plotly>=4.0.0",
128             "pytest",
129             "scikit-learn>=0.19.0,<0.23.0",
130             "scikit-optimize",
131             "xgboost",
132             "keras",
133             "tensorflow",
134             "tensorflow-datasets",
135         ]
136         + (
137             (
138                 ["torch==1.6.0", "torchvision==0.7.0"]
139                 if sys.platform == "darwin"
140                 else ["torch==1.6.0+cpu", "torchvision==0.7.0+cpu"]
141             )
142             + ["pytorch-ignite"]
143             if (3, 5) < sys.version_info[:2]
144             else []
145         )
146         + (
147             ["allennlp==1.0.0", "fastai<2", "pytorch_lightning>=0.7.1"]
148             if (3, 5) < sys.version_info[:2] < (3, 8)
149             else []
150         )
151         + (["catalyst"] if (3, 5) < sys.version_info[:2] else [])
152         + (["pytorch-lightning>=0.7.2"] if (3, 8) == sys.version_info[:2] else []),
153         "tests": ["fakeredis", "pytest"],
154         "optional": [
155             "bokeh<2.0.0",  # optuna/cli.py, optuna/dashboard.py.
156             "pandas",  # optuna/study.py
157             "plotly>=4.0.0",  # optuna/visualization.
158             "redis",  # optuna/storages/redis.py.
159             "scikit-learn>=0.19.0,<0.23.0",  # optuna/visualization/param_importances.py.
160         ],
161         "integration": [
162             # TODO(toshihikoyanase): Remove the version constraint after resolving the issue
163             # https://github.com/optuna/optuna/issues/1000.
164             "chainer>=5.0.0",
165             "cma",
166             "lightgbm",
167             "mlflow",
168             "mpi4py",
169             "mxnet",
170             "pandas",
171             "scikit-learn>=0.19.0,<0.23.0",
172             "scikit-optimize",
173             "xgboost",
174             "keras",
175             "tensorflow",
176             "tensorflow-datasets",
177         ]
178         + (
179             (
180                 ["torch==1.6.0", "torchvision==0.7.0"]
181                 if sys.platform == "darwin"
182                 else ["torch==1.6.0+cpu", "torchvision==0.7.0+cpu"]
183             )
184             + ["pytorch-ignite"]
185             if (3, 5) < sys.version_info[:2]
186             else []
187         )
188         + (
189             ["allennlp==1.0.0", "fastai<2", "pytorch-lightning>=0.7.1"]
190             if (3, 5) < sys.version_info[:2] < (3, 8)
191             else []
192         )
193         + (["catalyst"] if (3, 5) < sys.version_info[:2] else [])
194         + (["pytorch-lightning>=0.7.2"] if (3, 8) == sys.version_info[:2] else []),
195     }
196 
197     return requirements
198 
199 
200 def find_any_distribution(pkgs: List[str]) -> Optional[pkg_resources.Distribution]:
201 
202     for pkg in pkgs:
203         try:
204             return pkg_resources.get_distribution(pkg)
205         except pkg_resources.DistributionNotFound:
206             pass
207     return None
208 
209 
210 setup(
211     name="optuna",
212     version=get_version(),
213     description="A hyperparameter optimization framework",
214     long_description=get_long_description(),
215     long_description_content_type="text/markdown",
216     author="Takuya Akiba",
217     author_email="akiba@preferred.jp",
218     url="https://optuna.org/",
219     packages=find_packages(),
220     package_data={
221         "optuna": [
222             "storages/_rdb/alembic.ini",
223             "storages/_rdb/alembic/*.*",
224             "storages/_rdb/alembic/versions/*.*",
225         ]
226     },
227     python_requires=">=3.5",
228     install_requires=get_install_requires(),
229     tests_require=get_tests_require(),
230     extras_require=get_extras_require(),
231     entry_points={
232         "console_scripts": ["optuna = optuna.cli:main"],
233         "optuna.command": [
234             "create-study = optuna.cli:_CreateStudy",
235             "delete-study = optuna.cli:_DeleteStudy",
236             "study set-user-attr = optuna.cli:_StudySetUserAttribute",
237             "studies = optuna.cli:_Studies",
238             "dashboard = optuna.cli:_Dashboard",
239             "study optimize = optuna.cli:_StudyOptimize",
240             "storage upgrade = optuna.cli:_StorageUpgrade",
241         ],
242     },
243     classifiers=[
244         "Development Status :: 5 - Production/Stable",
245         "Intended Audience :: Science/Research",
246         "Intended Audience :: Developers",
247         "License :: OSI Approved :: MIT License",
248         "Programming Language :: Python :: 3",
249         "Programming Language :: Python :: 3.5",
250         "Programming Language :: Python :: 3.6",
251         "Programming Language :: Python :: 3.7",
252         "Programming Language :: Python :: 3.8",
253         "Programming Language :: Python :: 3 :: Only",
254         "Topic :: Scientific/Engineering",
255         "Topic :: Scientific/Engineering :: Mathematics",
256         "Topic :: Scientific/Engineering :: Artificial Intelligence",
257         "Topic :: Software Development",
258         "Topic :: Software Development :: Libraries",
259         "Topic :: Software Development :: Libraries :: Python Modules",
260     ],
261 )
262
```
--- 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
@@ -63,8 +63,8 @@
         ],
         "document": [
             # TODO(hvy): Unpin `sphinx` version after:
-            # https://github.com/sphinx-doc/sphinx/issues/7807.
-            "sphinx>=3.0.0,!=3.1.0,!=3.1.1,!=3.1.2,!=3.2.0",
+            # https://github.com/sphinx-doc/sphinx/issues/8105.
+            "sphinx==3.0.4",
             # As reported in: https://github.com/readthedocs/sphinx_rtd_theme/issues/949,
             # `sphinx_rtd_theme` 0.5.0 is still not compatible with `sphinx` >= 3.0.
             "sphinx_rtd_theme<0.5.0",

{"golden_diff": "diff --git a/setup.py b/setup.py\n--- a/setup.py\n+++ b/setup.py\n@@ -63,8 +63,8 @@\n         ],\n         \"document\": [\n             # TODO(hvy): Unpin `sphinx` version after:\n-            # https://github.com/sphinx-doc/sphinx/issues/7807.\n-            \"sphinx>=3.0.0,!=3.1.0,!=3.1.1,!=3.1.2,!=3.2.0\",\n+            # https://github.com/sphinx-doc/sphinx/issues/8105.\n+            \"sphinx==3.0.4\",\n             # As reported in: https://github.com/readthedocs/sphinx_rtd_theme/issues/949,\n             # `sphinx_rtd_theme` 0.5.0 is still not compatible with `sphinx` >= 3.0.\n             \"sphinx_rtd_theme<0.5.0\",\n", "issue": "Fix docstrings\n`Sphinx>=3.1.0` doesn't build our documentation for some reason (I guess our `experimental` and `deprecated` decorators are the devils, not sure though).\r\n\r\nAt first, as https://github.com/optuna/optuna/issues/1368 said, we were optimistic about this, i.e., we thought the next stable would work. However, it's not happened yet. So it's high time we dirtied our hands to enable the latest Sphinx.\r\n\r\n~~The latest ongoing pull request is https://github.com/optuna/optuna/pull/1613.~~\n", "before_files": [{"content": "import os\nimport sys\n\nimport pkg_resources\nfrom setuptools import find_packages\nfrom setuptools import setup\n\nfrom typing import Dict\nfrom typing import List\nfrom typing import Optional\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    return [\n        \"alembic\",\n        \"cliff\",\n        \"cmaes>=0.5.1\",\n        \"colorlog\",\n        \"joblib\",\n        \"numpy\",\n        \"packaging>=20.0\",\n        \"scipy!=1.4.0\",\n        \"sqlalchemy>=1.1.0\",\n        \"tqdm\",\n    ]\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        \"checking\": [\"black\", \"hacking\", \"mypy\"],\n        \"codecov\": [\"codecov\", \"pytest-cov\"],\n        \"doctest\": [\n            \"cma\",\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(hvy): Unpin `sphinx` version after:\n            # https://github.com/sphinx-doc/sphinx/issues/7807.\n            \"sphinx>=3.0.0,!=3.1.0,!=3.1.1,!=3.1.2,!=3.2.0\",\n            # As reported in: https://github.com/readthedocs/sphinx_rtd_theme/issues/949,\n            # `sphinx_rtd_theme` 0.5.0 is still not compatible with `sphinx` >= 3.0.\n            \"sphinx_rtd_theme<0.5.0\",\n            \"sphinx-gallery\",\n            \"pillow\",\n            \"matplotlib\",\n            \"scikit-learn\",\n        ],\n        \"example\": [\n            \"catboost\",\n            \"chainer\",\n            \"lightgbm\",\n            \"mlflow\",\n            \"mpi4py\",\n            \"mxnet\",\n            \"nbval\",\n            \"scikit-image\",\n            \"scikit-learn>=0.19.0,<0.23.0\",  # optuna/visualization/param_importances.py.\n            \"xgboost\",\n            \"keras\",\n            \"tensorflow>=2.0.0\",\n            \"tensorflow-datasets\",\n        ]\n        + (\n            (\n                [\"torch==1.6.0\", \"torchvision==0.7.0\"]\n                if sys.platform == \"darwin\"\n                else [\"torch==1.6.0+cpu\", \"torchvision==0.7.0+cpu\"]\n            )\n            + [\"pytorch-ignite\", \"thop\"]\n            if (3, 5) < sys.version_info[:2]\n            else []\n        )\n        + ([\"stable-baselines3>=0.7.0\"] if (3, 5) < sys.version_info[:2] else [])\n        + (\n            [\"allennlp==1.0.0\", \"fastai<2\", \"pytorch_lightning>=0.7.1\"]\n            if (3, 5) < sys.version_info[:2] < (3, 8)\n            else []\n        )\n        + ([\"pytorch-lightning>=0.7.2\"] if (3, 8) == sys.version_info[:2] else [])\n        + (\n            [\"llvmlite<=0.31.0\", \"fsspec<0.8.0\"] if (3, 5) == sys.version_info[:2] else []\n        )  # Newer `llvmlite` is not distributed with wheels for Python 3.5.\n        # Newer `fsspec` uses f-strings, which is not compatible with Python 3.5.\n        + ([\"dask[dataframe]\", \"dask-ml\",] if sys.version_info[:2] < (3, 8) else [])\n        + ([\"catalyst\"] if (3, 5) < sys.version_info[:2] else []),\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            \"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            \"tensorflow\",\n            \"tensorflow-datasets\",\n        ]\n        + (\n            (\n                [\"torch==1.6.0\", \"torchvision==0.7.0\"]\n                if sys.platform == \"darwin\"\n                else [\"torch==1.6.0+cpu\", \"torchvision==0.7.0+cpu\"]\n            )\n            + [\"pytorch-ignite\"]\n            if (3, 5) < sys.version_info[:2]\n            else []\n        )\n        + (\n            [\"allennlp==1.0.0\", \"fastai<2\", \"pytorch_lightning>=0.7.1\"]\n            if (3, 5) < sys.version_info[:2] < (3, 8)\n            else []\n        )\n        + ([\"catalyst\"] if (3, 5) < sys.version_info[:2] else [])\n        + ([\"pytorch-lightning>=0.7.2\"] if (3, 8) == sys.version_info[:2] else []),\n        \"tests\": [\"fakeredis\", \"pytest\"],\n        \"optional\": [\n            \"bokeh<2.0.0\",  # optuna/cli.py, optuna/dashboard.py.\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\",  # 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\",\n            \"scikit-optimize\",\n            \"xgboost\",\n            \"keras\",\n            \"tensorflow\",\n            \"tensorflow-datasets\",\n        ]\n        + (\n            (\n                [\"torch==1.6.0\", \"torchvision==0.7.0\"]\n                if sys.platform == \"darwin\"\n                else [\"torch==1.6.0+cpu\", \"torchvision==0.7.0+cpu\"]\n            )\n            + [\"pytorch-ignite\"]\n            if (3, 5) < sys.version_info[:2]\n            else []\n        )\n        + (\n            [\"allennlp==1.0.0\", \"fastai<2\", \"pytorch-lightning>=0.7.1\"]\n            if (3, 5) < sys.version_info[:2] < (3, 8)\n            else []\n        )\n        + ([\"catalyst\"] if (3, 5) < sys.version_info[:2] else [])\n        + ([\"pytorch-lightning>=0.7.2\"] if (3, 8) == sys.version_info[:2] else []),\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(),\n    package_data={\n        \"optuna\": [\n            \"storages/_rdb/alembic.ini\",\n            \"storages/_rdb/alembic/*.*\",\n            \"storages/_rdb/alembic/versions/*.*\",\n        ]\n    },\n    python_requires=\">=3.5\",\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.5\",\n        \"Programming Language :: Python :: 3.6\",\n        \"Programming Language :: Python :: 3.7\",\n        \"Programming Language :: Python :: 3.8\",\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\nimport sys\n\nimport pkg_resources\nfrom setuptools import find_packages\nfrom setuptools import setup\n\nfrom typing import Dict\nfrom typing import List\nfrom typing import Optional\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    return [\n        \"alembic\",\n        \"cliff\",\n        \"cmaes>=0.5.1\",\n        \"colorlog\",\n        \"joblib\",\n        \"numpy\",\n        \"packaging>=20.0\",\n        \"scipy!=1.4.0\",\n        \"sqlalchemy>=1.1.0\",\n        \"tqdm\",\n    ]\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        \"checking\": [\"black\", \"hacking\", \"mypy\"],\n        \"codecov\": [\"codecov\", \"pytest-cov\"],\n        \"doctest\": [\n            \"cma\",\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(hvy): Unpin `sphinx` version after:\n            # https://github.com/sphinx-doc/sphinx/issues/8105.\n            \"sphinx==3.0.4\",\n            # As reported in: https://github.com/readthedocs/sphinx_rtd_theme/issues/949,\n            # `sphinx_rtd_theme` 0.5.0 is still not compatible with `sphinx` >= 3.0.\n            \"sphinx_rtd_theme<0.5.0\",\n            \"sphinx-gallery\",\n            \"pillow\",\n            \"matplotlib\",\n            \"scikit-learn\",\n        ],\n        \"example\": [\n            \"catboost\",\n            \"chainer\",\n            \"lightgbm\",\n            \"mlflow\",\n            \"mpi4py\",\n            \"mxnet\",\n            \"nbval\",\n            \"scikit-image\",\n            \"scikit-learn>=0.19.0,<0.23.0\",  # optuna/visualization/param_importances.py.\n            \"xgboost\",\n            \"keras\",\n            \"tensorflow>=2.0.0\",\n            \"tensorflow-datasets\",\n        ]\n        + (\n            (\n                [\"torch==1.6.0\", \"torchvision==0.7.0\"]\n                if sys.platform == \"darwin\"\n                else [\"torch==1.6.0+cpu\", \"torchvision==0.7.0+cpu\"]\n            )\n            + [\"pytorch-ignite\", \"thop\"]\n            if (3, 5) < sys.version_info[:2]\n            else []\n        )\n        + ([\"stable-baselines3>=0.7.0\"] if (3, 5) < sys.version_info[:2] else [])\n        + (\n            [\"allennlp==1.0.0\", \"fastai<2\", \"pytorch_lightning>=0.7.1\"]\n            if (3, 5) < sys.version_info[:2] < (3, 8)\n            else []\n        )\n        + ([\"pytorch-lightning>=0.7.2\"] if (3, 8) == sys.version_info[:2] else [])\n        + (\n            [\"llvmlite<=0.31.0\", \"fsspec<0.8.0\"] if (3, 5) == sys.version_info[:2] else []\n        )  # Newer `llvmlite` is not distributed with wheels for Python 3.5.\n        # Newer `fsspec` uses f-strings, which is not compatible with Python 3.5.\n        + ([\"dask[dataframe]\", \"dask-ml\",] if sys.version_info[:2] < (3, 8) else [])\n        + ([\"catalyst\"] if (3, 5) < sys.version_info[:2] else []),\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            \"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            \"tensorflow\",\n            \"tensorflow-datasets\",\n        ]\n        + (\n            (\n                [\"torch==1.6.0\", \"torchvision==0.7.0\"]\n                if sys.platform == \"darwin\"\n                else [\"torch==1.6.0+cpu\", \"torchvision==0.7.0+cpu\"]\n            )\n            + [\"pytorch-ignite\"]\n            if (3, 5) < sys.version_info[:2]\n            else []\n        )\n        + (\n            [\"allennlp==1.0.0\", \"fastai<2\", \"pytorch_lightning>=0.7.1\"]\n            if (3, 5) < sys.version_info[:2] < (3, 8)\n            else []\n        )\n        + ([\"catalyst\"] if (3, 5) < sys.version_info[:2] else [])\n        + ([\"pytorch-lightning>=0.7.2\"] if (3, 8) == sys.version_info[:2] else []),\n        \"tests\": [\"fakeredis\", \"pytest\"],\n        \"optional\": [\n            \"bokeh<2.0.0\",  # optuna/cli.py, optuna/dashboard.py.\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\",  # 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\",\n            \"scikit-optimize\",\n            \"xgboost\",\n            \"keras\",\n            \"tensorflow\",\n            \"tensorflow-datasets\",\n        ]\n        + (\n            (\n                [\"torch==1.6.0\", \"torchvision==0.7.0\"]\n                if sys.platform == \"darwin\"\n                else [\"torch==1.6.0+cpu\", \"torchvision==0.7.0+cpu\"]\n            )\n            + [\"pytorch-ignite\"]\n            if (3, 5) < sys.version_info[:2]\n            else []\n        )\n        + (\n            [\"allennlp==1.0.0\", \"fastai<2\", \"pytorch-lightning>=0.7.1\"]\n            if (3, 5) < sys.version_info[:2] < (3, 8)\n            else []\n        )\n        + ([\"catalyst\"] if (3, 5) < sys.version_info[:2] else [])\n        + ([\"pytorch-lightning>=0.7.2\"] if (3, 8) == sys.version_info[:2] else []),\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(),\n    package_data={\n        \"optuna\": [\n            \"storages/_rdb/alembic.ini\",\n            \"storages/_rdb/alembic/*.*\",\n            \"storages/_rdb/alembic/versions/*.*\",\n        ]\n    },\n    python_requires=\">=3.5\",\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.5\",\n        \"Programming Language :: Python :: 3.6\",\n        \"Programming Language :: Python :: 3.7\",\n        \"Programming Language :: Python :: 3.8\",\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"}]}