We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Migrate mypy version to 0.910
As of today (Nov. 28th, 2021), the latest version of mypy is 0.910. On the other hand, now Optuna uses 0.790.
I think it is better to migrate to the latest version, but mypy 0.910 emits a lot of errors for the current Optuna codes like the following:

```
optuna/storages/_rdb/alembic/versions/v2.6.0.a_.py:21: error: Function is missing a return type annotation
optuna/storages/_rdb/alembic/versions/v2.6.0.a_.py:21: note: Use "-> None" if function does not return a value
optuna/storages/_rdb/alembic/versions/v2.6.0.a_.py:34: error: Function is missing a return type annotation
optuna/storages/_rdb/alembic/versions/v2.6.0.a_.py:34: note: Use "-> None" if function does not return a value
...
```

Thus we also need to add some fixes.


--- 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         "PyYAML",  # Only used in `optuna/cli.py`.
41     ]
42     return requirements
43 
44 
45 def get_tests_require() -> List[str]:
46 
47     return get_extras_require()["testing"]
48 
49 
50 def get_extras_require() -> Dict[str, List[str]]:
51 
52     requirements = {
53         # TODO(HideakiImamura) Unpin mypy version after fixing "Duplicate modules" error in
54         # tutorials.
55         "checking": ["black", "hacking", "isort", "mypy==0.790", "blackdoc"],
56         "codecov": ["codecov", "pytest-cov"],
57         "doctest": [
58             "cma",
59             "matplotlib>=3.0.0",
60             "pandas",
61             "plotly>=4.0.0",
62             "scikit-learn>=0.24.2",
63             "scikit-optimize",
64             "mlflow<1.22.0",
65         ],
66         "document": [
67             # TODO(nzw): Remove the version constraint after resolving the issue
68             # https://github.com/optuna/optuna/issues/2658.
69             "sphinx<4.0.0",
70             "sphinx_rtd_theme",
71             "sphinx-copybutton",
72             "sphinx-gallery",
73             "sphinx-plotly-directive",
74             "pillow",
75             "matplotlib",
76             "scikit-learn",
77             "plotly>=4.0.0",  # optuna/visualization.
78             "pandas",
79             "lightgbm",
80             "torch==1.8.0",
81             "torchvision==0.9.0",
82             "torchaudio==0.8.0",
83             "thop",
84         ],
85         "experimental": ["redis"],
86         "testing": [
87             "chainer>=5.0.0",
88             "cma",
89             "fakeredis",
90             "lightgbm",
91             "matplotlib>=3.0.0",
92             "mlflow<1.22.0",
93             "mpi4py",
94             "mxnet",
95             "pandas",
96             "plotly>=4.0.0",
97             "pytest",
98             "scikit-learn>=0.24.2",
99             "scikit-optimize",
100             "xgboost",
101             "tensorflow",
102             "tensorflow-datasets",
103             "pytorch-ignite",
104             # TODO(nzw0301): remove the upper version constraint when the callback supports
105             # pytorch-lightning==1.5.0.
106             "pytorch-lightning>=1.0.2,<1.5.0",
107             "skorch",
108             "catalyst>=21.3",
109             "torch==1.8.0 ; sys_platform=='darwin'",
110             "torch==1.8.0+cpu ; sys_platform!='darwin'",
111             "torchvision==0.9.0 ; sys_platform=='darwin'",
112             "torchvision==0.9.0+cpu ; sys_platform!='darwin'",
113             "torchaudio==0.8.0",
114             "allennlp>=2.2.0,<2.7.0",
115             "botorch>=0.4.0 ; python_version>'3.6'",
116             "fastai",
117         ],
118         "tests": [
119             "fakeredis",
120             "pytest",
121         ],
122         "optional": [
123             "matplotlib>=3.0.0",  # optuna/visualization/matplotlib
124             "pandas",  # optuna/study.py
125             "plotly>=4.0.0",  # optuna/visualization.
126             "redis",  # optuna/storages/redis.py.
127             "scikit-learn>=0.24.2",
128             # optuna/visualization/param_importances.py.
129         ],
130         "integration": [
131             "chainer>=5.0.0",
132             "cma",
133             "lightgbm",
134             "mlflow<1.22.0",
135             "wandb",
136             "mpi4py",
137             "mxnet",
138             "pandas",
139             "scikit-learn>=0.24.2",
140             "scikit-optimize",
141             "xgboost",
142             "tensorflow",
143             "tensorflow-datasets",
144             "pytorch-ignite",
145             # TODO(nzw0301): remove the upper version constraint when the callback supports
146             # pytorch-lightning==1.5.0.
147             "pytorch-lightning>=1.0.2,<1.5.0",
148             "skorch",
149             "catalyst>=21.3",
150             "torch==1.8.0 ; sys_platform=='darwin'",
151             "torch==1.8.0+cpu ; sys_platform!='darwin'",
152             "torchvision==0.9.0 ; sys_platform=='darwin'",
153             "torchvision==0.9.0+cpu ; sys_platform!='darwin'",
154             "torchaudio==0.8.0",
155             "allennlp>=2.2.0,<2.7.0",
156             "botorch>=0.4.0 ; python_version>'3.6'",
157             "fastai",
158         ],
159         "benchmark": [
160             "asv",
161             "virtualenv",
162         ],
163     }
164 
165     return requirements
166 
167 
168 def find_any_distribution(pkgs: List[str]) -> Optional[pkg_resources.Distribution]:
169 
170     for pkg in pkgs:
171         try:
172             return pkg_resources.get_distribution(pkg)
173         except pkg_resources.DistributionNotFound:
174             pass
175     return None
176 
177 
178 setup(
179     name="optuna",
180     version=get_version(),
181     description="A hyperparameter optimization framework",
182     long_description=get_long_description(),
183     long_description_content_type="text/markdown",
184     author="Takuya Akiba",
185     author_email="akiba@preferred.jp",
186     url="https://optuna.org/",
187     packages=find_packages(exclude=("tests", "tests.*", "benchmarks")),
188     package_data={
189         "optuna": [
190             "storages/_rdb/alembic.ini",
191             "storages/_rdb/alembic/*.*",
192             "storages/_rdb/alembic/versions/*.*",
193             "py.typed",
194         ]
195     },
196     python_requires=">=3.6",
197     install_requires=get_install_requires(),
198     tests_require=get_tests_require(),
199     extras_require=get_extras_require(),
200     entry_points={
201         "console_scripts": ["optuna = optuna.cli:main"],
202         "optuna.command": [
203             "create-study = optuna.cli:_CreateStudy",
204             "delete-study = optuna.cli:_DeleteStudy",
205             "study set-user-attr = optuna.cli:_StudySetUserAttribute",
206             "studies = optuna.cli:_Studies",
207             "trials = optuna.cli:_Trials",
208             "best-trial = optuna.cli:_BestTrial",
209             "best-trials = optuna.cli:_BestTrials",
210             "study optimize = optuna.cli:_StudyOptimize",
211             "storage upgrade = optuna.cli:_StorageUpgrade",
212             "ask = optuna.cli:_Ask",
213             "tell = optuna.cli:_Tell",
214         ],
215     },
216     classifiers=[
217         "Development Status :: 5 - Production/Stable",
218         "Intended Audience :: Science/Research",
219         "Intended Audience :: Developers",
220         "License :: OSI Approved :: MIT License",
221         "Programming Language :: Python :: 3",
222         "Programming Language :: Python :: 3.6",
223         "Programming Language :: Python :: 3.7",
224         "Programming Language :: Python :: 3.8",
225         "Programming Language :: Python :: 3.9",
226         "Programming Language :: Python :: 3 :: Only",
227         "Topic :: Scientific/Engineering",
228         "Topic :: Scientific/Engineering :: Mathematics",
229         "Topic :: Scientific/Engineering :: Artificial Intelligence",
230         "Topic :: Software Development",
231         "Topic :: Software Development :: Libraries",
232         "Topic :: Software Development :: Libraries :: Python Modules",
233     ],
234 )
235
```
--- 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
@@ -50,9 +50,16 @@
 def get_extras_require() -> Dict[str, List[str]]:
 
     requirements = {
-        # TODO(HideakiImamura) Unpin mypy version after fixing "Duplicate modules" error in
-        # tutorials.
-        "checking": ["black", "hacking", "isort", "mypy==0.790", "blackdoc"],
+        "checking": [
+            "black",
+            "hacking",
+            "isort",
+            "blackdoc",
+            "mypy",
+            "types-setuptools",
+            "types-redis",
+            "types-PyYAML",
+        ],
         "codecov": ["codecov", "pytest-cov"],
         "doctest": [
             "cma",

{"golden_diff": "diff --git a/setup.py b/setup.py\n--- a/setup.py\n+++ b/setup.py\n@@ -50,9 +50,16 @@\n def get_extras_require() -> Dict[str, List[str]]:\n \n     requirements = {\n-        # TODO(HideakiImamura) Unpin mypy version after fixing \"Duplicate modules\" error in\n-        # tutorials.\n-        \"checking\": [\"black\", \"hacking\", \"isort\", \"mypy==0.790\", \"blackdoc\"],\n+        \"checking\": [\n+            \"black\",\n+            \"hacking\",\n+            \"isort\",\n+            \"blackdoc\",\n+            \"mypy\",\n+            \"types-setuptools\",\n+            \"types-redis\",\n+            \"types-PyYAML\",\n+        ],\n         \"codecov\": [\"codecov\", \"pytest-cov\"],\n         \"doctest\": [\n             \"cma\",\n", "issue": "Migrate mypy version to 0.910\nAs of today (Nov. 28th, 2021), the latest version of mypy is 0.910. On the other hand, now Optuna uses 0.790.\r\nI think it is better to migrate to the latest version, but mypy 0.910 emits a lot of errors for the current Optuna codes like the following:\r\n\r\n```\r\noptuna/storages/_rdb/alembic/versions/v2.6.0.a_.py:21: error: Function is missing a return type annotation\r\noptuna/storages/_rdb/alembic/versions/v2.6.0.a_.py:21: note: Use \"-> None\" if function does not return a value\r\noptuna/storages/_rdb/alembic/versions/v2.6.0.a_.py:34: error: Function is missing a return type annotation\r\noptuna/storages/_rdb/alembic/versions/v2.6.0.a_.py:34: note: Use \"-> None\" if function does not return a value\r\n...\r\n```\r\n\r\nThus we also need to add some fixes.\r\n\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        \"PyYAML\",  # Only used in `optuna/cli.py`.\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        # 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<1.22.0\",\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        \"experimental\": [\"redis\"],\n        \"testing\": [\n            \"chainer>=5.0.0\",\n            \"cma\",\n            \"fakeredis\",\n            \"lightgbm\",\n            \"matplotlib>=3.0.0\",\n            \"mlflow<1.22.0\",\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            \"tensorflow\",\n            \"tensorflow-datasets\",\n            \"pytorch-ignite\",\n            # TODO(nzw0301): remove the upper version constraint when the callback supports\n            # pytorch-lightning==1.5.0.\n            \"pytorch-lightning>=1.0.2,<1.5.0\",\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,<2.7.0\",\n            \"botorch>=0.4.0 ; python_version>'3.6'\",\n            \"fastai\",\n        ],\n        \"tests\": [\n            \"fakeredis\",\n            \"pytest\",\n        ],\n        \"optional\": [\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            \"chainer>=5.0.0\",\n            \"cma\",\n            \"lightgbm\",\n            \"mlflow<1.22.0\",\n            \"wandb\",\n            \"mpi4py\",\n            \"mxnet\",\n            \"pandas\",\n            \"scikit-learn>=0.24.2\",\n            \"scikit-optimize\",\n            \"xgboost\",\n            \"tensorflow\",\n            \"tensorflow-datasets\",\n            \"pytorch-ignite\",\n            # TODO(nzw0301): remove the upper version constraint when the callback supports\n            # pytorch-lightning==1.5.0.\n            \"pytorch-lightning>=1.0.2,<1.5.0\",\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,<2.7.0\",\n            \"botorch>=0.4.0 ; python_version>'3.6'\",\n            \"fastai\",\n        ],\n        \"benchmark\": [\n            \"asv\",\n            \"virtualenv\",\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.*\", \"benchmarks\")),\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            \"trials = optuna.cli:_Trials\",\n            \"best-trial = optuna.cli:_BestTrial\",\n            \"best-trials = optuna.cli:_BestTrials\",\n            \"study optimize = optuna.cli:_StudyOptimize\",\n            \"storage upgrade = optuna.cli:_StorageUpgrade\",\n            \"ask = optuna.cli:_Ask\",\n            \"tell = optuna.cli:_Tell\",\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        \"PyYAML\",  # Only used in `optuna/cli.py`.\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        \"checking\": [\n            \"black\",\n            \"hacking\",\n            \"isort\",\n            \"blackdoc\",\n            \"mypy\",\n            \"types-setuptools\",\n            \"types-redis\",\n            \"types-PyYAML\",\n        ],\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<1.22.0\",\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        \"experimental\": [\"redis\"],\n        \"testing\": [\n            \"chainer>=5.0.0\",\n            \"cma\",\n            \"fakeredis\",\n            \"lightgbm\",\n            \"matplotlib>=3.0.0\",\n            \"mlflow<1.22.0\",\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            \"tensorflow\",\n            \"tensorflow-datasets\",\n            \"pytorch-ignite\",\n            # TODO(nzw0301): remove the upper version constraint when the callback supports\n            # pytorch-lightning==1.5.0.\n            \"pytorch-lightning>=1.0.2,<1.5.0\",\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,<2.7.0\",\n            \"botorch>=0.4.0 ; python_version>'3.6'\",\n            \"fastai\",\n        ],\n        \"tests\": [\n            \"fakeredis\",\n            \"pytest\",\n        ],\n        \"optional\": [\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            \"chainer>=5.0.0\",\n            \"cma\",\n            \"lightgbm\",\n            \"mlflow<1.22.0\",\n            \"wandb\",\n            \"mpi4py\",\n            \"mxnet\",\n            \"pandas\",\n            \"scikit-learn>=0.24.2\",\n            \"scikit-optimize\",\n            \"xgboost\",\n            \"tensorflow\",\n            \"tensorflow-datasets\",\n            \"pytorch-ignite\",\n            # TODO(nzw0301): remove the upper version constraint when the callback supports\n            # pytorch-lightning==1.5.0.\n            \"pytorch-lightning>=1.0.2,<1.5.0\",\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,<2.7.0\",\n            \"botorch>=0.4.0 ; python_version>'3.6'\",\n            \"fastai\",\n        ],\n        \"benchmark\": [\n            \"asv\",\n            \"virtualenv\",\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.*\", \"benchmarks\")),\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            \"trials = optuna.cli:_Trials\",\n            \"best-trial = optuna.cli:_BestTrial\",\n            \"best-trials = optuna.cli:_BestTrials\",\n            \"study optimize = optuna.cli:_StudyOptimize\",\n            \"storage upgrade = optuna.cli:_StorageUpgrade\",\n            \"ask = optuna.cli:_Ask\",\n            \"tell = optuna.cli:_Tell\",\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"}]}