|
| 1 | +# noqa: D400 |
| 2 | +""" |
| 3 | +# DeepCAVE |
| 4 | +
|
| 5 | +This module is used to initialize and set up the configuration for the DeepCAVE framework. |
| 6 | +
|
| 7 | +The Dash application gets created. |
| 8 | +""" |
| 9 | + |
1 | 10 | from typing import Any, Callable, TypeVar, cast |
2 | 11 |
|
3 | 12 | import datetime |
|
9 | 18 | name = "DeepCAVE" |
10 | 19 | package_name = "deepcave" |
11 | 20 | author = "R. Sass and E. Bergman and A. Biedenkapp and F. Hutter and M. Lindauer" |
12 | | -author_email = "sass@tnt.uni-hannover.de" |
| 21 | +author_email = "s.segel@ai.uni-hannover.de" |
13 | 22 | description = "An interactive framework to visualize and analyze your AutoML process in real-time." |
14 | 23 | url = "automl.org" |
15 | 24 | project_urls = { |
16 | 25 | "Documentation": "https://automl.github.io/DeepCAVE/main", |
17 | 26 | "Source Code": "https://github.com/automl/deepcave", |
18 | 27 | } |
19 | 28 | copyright = f"Copyright {datetime.date.today().strftime('%Y')}, {author}" |
20 | | -version = "1.1.3" |
| 29 | +version = "1.2" |
21 | 30 |
|
22 | 31 | _exec_file = sys.argv[0] |
23 | 32 | _exec_files = ["server.py", "worker.py", "sphinx-build"] |
24 | 33 |
|
25 | 34 | ROOT_DIR = Path(__file__).parent |
26 | 35 |
|
27 | 36 |
|
28 | | -def get_app(title: str): |
| 37 | +def get_app(title: str) -> Any: |
| 38 | + """ |
| 39 | + Get the Dash Proxy. |
| 40 | +
|
| 41 | + Parameters |
| 42 | + ---------- |
| 43 | + title : str |
| 44 | + The title of the application. |
| 45 | +
|
| 46 | + Returns |
| 47 | + ------- |
| 48 | + DashProxy |
| 49 | + The dash proxy. |
| 50 | + """ |
29 | 51 | import dash_bootstrap_components as dbc |
30 | 52 | from dash_extensions.enrich import ( |
31 | 53 | DashProxy, |
@@ -61,8 +83,8 @@ def get_app(title: str): |
61 | 83 | if any(file in _exec_file for file in _exec_files): |
62 | 84 | from deepcave.custom_queue import Queue |
63 | 85 | from deepcave.runs.handler import RunHandler |
64 | | - from deepcave.runs.objective import Objective # noqa |
65 | | - from deepcave.runs.recorder import Recorder # noqa |
| 86 | + from deepcave.runs.objective import Objective |
| 87 | + from deepcave.runs.recorder import Recorder |
66 | 88 | from deepcave.utils.cache import Cache |
67 | 89 | from deepcave.utils.configs import parse_config |
68 | 90 | from deepcave.utils.notification import Notification |
@@ -129,8 +151,37 @@ def get_app(title: str): |
129 | 151 |
|
130 | 152 |
|
131 | 153 | def interactive(func: F) -> F: |
| 154 | + """ |
| 155 | + Define the interactive decorator. |
| 156 | +
|
| 157 | + Parameters |
| 158 | + ---------- |
| 159 | + func : F |
| 160 | + The function to be decorated. |
| 161 | +
|
| 162 | + Returns |
| 163 | + ------- |
| 164 | + F |
| 165 | + The decorated function. |
| 166 | + """ |
| 167 | + |
132 | 168 | @wraps(func) |
133 | 169 | def inner(*args: Any, **kwargs: Any) -> Any: |
| 170 | + """ |
| 171 | + Inner function of the decorator. |
| 172 | +
|
| 173 | + Parameters |
| 174 | + ---------- |
| 175 | + *args : Any |
| 176 | + Arguments to be passed to the wrap function. |
| 177 | + **kwargs : Any |
| 178 | + Keyword arguments to be passed to the wrap function. |
| 179 | +
|
| 180 | + Returns |
| 181 | + ------- |
| 182 | + Any |
| 183 | + The result of the function. |
| 184 | + """ |
134 | 185 | if _api_mode: |
135 | 186 | return |
136 | 187 |
|
|
0 commit comments