Skip to content

Commit 09f1c97

Browse files
authored
Merge pull request #183 from automl/development
Version 1.3
2 parents da96e74 + 6f5a589 commit 09f1c97

File tree

203 files changed

+14679
-16144
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

203 files changed

+14679
-16144
lines changed

.pre-commit-config.yaml

+8-5
Original file line numberDiff line numberDiff line change
@@ -48,22 +48,25 @@ repos:
4848
'absl-py>=1.0.0',
4949
'jsonlines>=3.0.0',
5050
'pandas>=1.3.4',
51-
'numpy>=1.22.2',
52-
'matplotlib>=3.5.1',
51+
'numpy==2.0.1',
52+
'matplotlib==3.9.0',
53+
'seaborn>=0.13.0',
5354
'pyyaml>=6.0.1',
5455
'kaleido>=0.2.1',
5556
'gplearn>=0.4.2',
5657
'sympy>=1.12',
57-
'ConfigSpace==0.6.1',
58+
'requests>=2.31.0',
59+
'ConfigSpace==1.2.0',
5860
'pyrfr>=0.9.0',
59-
'hpbandster==0.7.4',
6061
'dash==2.0.0',
6162
'dash-extensions==0.0.71',
6263
'dash-bootstrap-components==1.0.3',
6364
'redis>=4.1.4',
6465
'rq>=1.10.1',
6566
'werkzeug==2.0.3',
66-
'pyPDPPartitioner>=0.1.8'
67+
'pyarrow==16.1.0',
68+
'fastparquet==2024.5.0',
69+
'pyPDPPartitioner>=0.1.9'
6770
] # Needed for mypy, so that it knows the types to check
6871

6972
- repo: https://github.com/PyCQA/flake8

CHANGELOG.md

+34
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,37 @@
1+
# Version 1.3
2+
3+
## Converters
4+
- Add support for AMLTK.
5+
- Add support for Optuna.
6+
- Add support for adding a run in DataFrame format (#137).
7+
- BOHB: Consider missing state as valid state as state is not provided by default (#65).
8+
9+
## Version-Updates
10+
- ConfigSpace from 0.6.1 to 1.2.0
11+
- Numpy from 1.26.4 to 2.0.1
12+
- pyPDPPartitioner from to 0.1.8 to 0.1.9
13+
14+
## Ablation Paths Plugin
15+
- Added ablation paths as a plugin.
16+
- Added ablation as a evaluator to use for the plugin.
17+
- Added tests as well as documentation.
18+
- Modified the RandomForest surrogate model, so it can be passed the number of trees.
19+
20+
## Move plugins
21+
- Moved the Configuration cube and the parallel coordinates plugin from objective to hyperparameter.
22+
- Changed layout accordingly as well as the documentation.
23+
24+
## Bug-Fixes
25+
- Upgrade pyPDPPartitioner to 0.1.9 as a requirement which fixes a bug related to copying config space objects (#111).
26+
27+
## Quality of Life
28+
- Update the documentation to reflect the new changes.
29+
- Disable warnings during RunHandler initialization to avoid showing warnings with respect to previously loaded runs.
30+
- Remove option to use docker (not yet supported).
31+
- Add SMAC3v2 multi-fidelity example runs.
32+
- Add more useful SMAC3v2 multi-objective example run.
33+
- Remove defective matplotlib button and associated functionalities.
34+
135
# Version 1.2.1
236

337
## Quality of Life

Makefile

+7-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# are usually completed in github actions.
33

44
SHELL := /bin/bash
5-
VERSION := 1.2.1
5+
VERSION := 1.3
66

77
NAME := DeepCAVE
88
PACKAGE_NAME := deepcave
@@ -52,6 +52,12 @@ install-dev:
5252
install-examples:
5353
$(PIP) install -e ".[examples]"
5454

55+
install-optuna:
56+
$(PIP) install -e ".[optuna]"
57+
58+
install-bohb:
59+
$(PIP) install -e ".[bohb]"
60+
5561
check-black:
5662
$(BLACK) ${SOURCE_DIR} --check || :
5763
$(BLACK) ${EXAMPLES_DIR} --check || :

README.md

+62-53
Original file line numberDiff line numberDiff line change
@@ -2,30 +2,15 @@
22

33
# DeepCAVE
44

5-
DeepCAVE is a visualization and analysis tool for AutoML (especially for the sub-problem
6-
hyperparameter optimization) runs. The framework is programmed on top of Dash and therefore
7-
entirely interactive. Multiple and diverse plugins make it possible to efficiently generate insights
8-
and bring the human back in the loop. Moreover, the powerful run interface and the modularized
9-
plugin structure allow extending the tool at any time effortlessly.
5+
DeepCAVE is a visualization and analysis tool for AutoML, with a particular focus on
6+
hyperparameter optimization (HPO). Built on the Dash framework, it offers a fully
7+
interactive experience. The tool features a variety of plugins that enable efficient insight
8+
generation, aiding in understanding and debugging the application of HPO.
9+
Additionally, the powerful run interface and the modularized plugin structure allow extending the
10+
tool at any time effortlessly.
1011

1112
![Configuration Footprint](docs/images/plugins/configuration_footprint.png)
1213

13-
Following features are provided:
14-
- Interactive Dashboard (completely written in Python) to self-analyze optimization runs/processes.
15-
- Analyzing while optimizing (run changes are automatically detected).
16-
- A large collection of plugins to explore multiple areas like performance, hyperparameter and
17-
budget analysis.
18-
- Save your runs using DeepCAVE's native recorder.
19-
- Support for many optimizers using converters (e.g., DeepCAVE, SMAC and BOHB).
20-
- Select runs directly from a working directory in the interface.
21-
- Select groups of runs for combined analysis.
22-
- Modularized plugin structure with access to selected runs/groups to provide maximal flexibility.
23-
- Asynchronous execution of expensive plugins and caching of their results.
24-
- Help buttons and integrated documentation in the interface helps you to understand the plugins.
25-
- Use the matplotlib mode to customize and save the plots for your publication.
26-
- The API mode gives you full access to the code, while you do not have to interact with the
27-
interface. Otherwise, you can also make use of the raw data, provided by every plugin.
28-
2914

3015
## Installation
3116

@@ -50,41 +35,21 @@ conda install -c anaconda swig
5035
make install-dev
5136
```
5237

53-
If you want to use the given examples, run this after installing:
38+
If you want to try the examples for recording your results in DeepCAVE format, run this after installing:
5439
```bash
5540
make install-examples
5641
```
5742

58-
Please visit the [documentation](https://automl.github.io/DeepCAVE/main/installation.html) to get
59-
further help (e.g. if you can not install redis server or you are on a mac).
60-
61-
62-
## Recording
63-
64-
A minimal example is given to show the simplicity yet powerful API to record runs.
65-
However, existing optimizers like BOHB, SMAC, Auto-Sklearn, Auto-PyTorch are supported natively.
66-
67-
```python
68-
import ConfigSpace as CS
69-
from deepcave import Recorder, Objective
70-
71-
72-
configspace = CS.ConfigurationSpace(seed=0)
73-
alpha = CS.hyperparameters.UniformFloatHyperparameter(
74-
name='alpha', lower=0, upper=1)
75-
configspace.add_hyperparameter(alpha)
76-
77-
accuracy = Objective("accuracy", lower=0, upper=1, optimize="upper")
78-
mse = Objective("mse", lower=0)
79-
80-
with Recorder(configspace, objectives=[accuracy, mse]) as r:
81-
for config in configspace.sample_configuration(100):
82-
for budget in [20, 40, 60]:
83-
r.start(config, budget)
84-
# Your code goes here
85-
r.end(costs=[0.5, 0.5])
43+
To load runs created with Optuna or the BOHB optimizer, you need to install the
44+
respective packages by running:
45+
```bash
46+
make install-optuna
47+
make install-bohb
8648
```
8749

50+
Please visit the [documentation](https://automl.github.io/DeepCAVE/main/installation.html) to get
51+
further help (e.g. if you cannot install redis server or if you are on MacOS).
52+
8853

8954
## Visualizing and Evaluating
9055

@@ -100,12 +65,56 @@ You can find more arguments and information (like using custom configurations) i
10065

10166
## Example runs
10267

103-
DeepCAVE comes with some pre-evaluated runs to get a feel for what DeepCAVE can do.
68+
DeepCAVE comes with some pre-evaluated runs to get a feeling for what DeepCAVE can do.
10469

105-
When you installed the package from GitHub via `git clone git@github.com:automl/DeepCAVE.git; pip install -e DeepCAVE`,
70+
If you cloned the repository from GitHub via `git clone https://github.com/automl/DeepCAVE.git`,
10671
you can try out some examples by exploring the `logs` directory inside the DeepCAVE dashboard.
10772
For example, if you navigate to `logs/DeepCAVE`, you can view the run `mnist_pytorch` if you hit
108-
the `+` button.
73+
the `+` button left to it.
74+
75+
76+
## Features
77+
78+
### Interactive Interface
79+
- **Interactive Dashboard:**
80+
The dashboard runs in a webbrowser and allows you to self-analyze your optimization runs interactively.
81+
82+
- **Run Selection Interface:**
83+
Easily select runs from your working directory directly within the interface.
84+
85+
- **Integrated Help and Documentation:**
86+
Use help buttons and integrated documentation within the interface to better understand the plugins.
87+
88+
### Comprehensive Analysis Tools
89+
- **Extensive Plugin Collection:**
90+
Explore a wide range of plugins for in-depth performance, hyperparameter, and budget analysis.
91+
92+
- **Analysis of Running Processes:**
93+
Analyze and monitor optimization processes as they occur, with automatic detection of run changes.
94+
95+
- **Group Analysis:**
96+
Choose groups of runs for combined analysis to gain deeper insights.
97+
98+
### Flexible and Modular Architecture
99+
- **Modular Plugin Architecture:**
100+
Benefit from a modularized plugin structure with access to selected runs and groups, offering you maximum flexibility.
101+
102+
- **Asynchronous Execution:**
103+
Utilize asynchronous execution of resource-intensive plugins and caching of results to improve performance.
104+
105+
### Broad Optimizer Support
106+
- **Optimizer Support:**
107+
Work with many frameworks and optimizers using our converters, including converters for SMAC, BOHB, AMLTK, and Optuna.
108+
109+
- **Native Format Saving:**
110+
Save AutoML runs from various frameworks in DeepCAVE's native format using the built-in recorder.
111+
112+
- **Flexible Data Loading:**
113+
Alternatively, load AutoML runs from other frameworks by converting them into a Pandas DataFrame.
114+
115+
### Developer and API Features
116+
- **API Mode:**
117+
Interact with the code directly through API mode, allowing you to bypass the graphical interface if preferred.
109118

110119

111120
## Citation

deepcave/__init__.py

+10-4
Original file line numberDiff line numberDiff line change
@@ -12,21 +12,22 @@
1212
import datetime
1313
import os
1414
import sys
15+
import warnings
1516
from functools import wraps
1617
from pathlib import Path
1718

1819
name = "DeepCAVE"
1920
package_name = "deepcave"
2021
author = "R. Sass and E. Bergman and A. Biedenkapp and F. Hutter and M. Lindauer"
21-
author_email = "s.segel@ai.uni-hannover.de"
22+
author_email = "l.fehring@ai.uni-hannover.de"
2223
description = "An interactive framework to visualize and analyze your AutoML process in real-time."
2324
url = "automl.org"
2425
project_urls = {
2526
"Documentation": "https://automl.github.io/DeepCAVE/main",
2627
"Source Code": "https://github.com/automl/deepcave",
2728
}
2829
copyright = f"Copyright {datetime.date.today().strftime('%Y')}, {author}"
29-
version = "1.2.1"
30+
version = "1.3"
3031

3132
_exec_file = sys.argv[0]
3233
_exec_files = ["server.py", "worker.py", "sphinx-build"]
@@ -115,8 +116,13 @@ def get_app(title: str) -> Any:
115116
# Run caches
116117
rc = RunCaches(config)
117118

118-
# Run Handler
119-
run_handler = RunHandler(config, c, rc)
119+
# Supress warnings during initializing run handler to avoid showing warnings with respect
120+
# to previously loaded runs
121+
with warnings.catch_warnings():
122+
warnings.simplefilter("ignore")
123+
124+
# Run Handler
125+
run_handler = RunHandler(config, c, rc)
120126

121127
# Notifications
122128
notification = Notification()

deepcave/cli.py

+7-12
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@
2525
"How many workers should be specified. In your case, the maximum number of workers should be "
2626
f"{multiprocessing.cpu_count() - 1}.",
2727
)
28-
flags.DEFINE_boolean("docker", False, "Uses docker image to start DeepCAVE. Not supported yet.")
2928
flags.DEFINE_string("config", None, "Filename to a user-specific config.")
3029
flags.DEFINE_string(
3130
"get_config_value", None, "Prints the value of a given config key. Useful for bash scripts."
@@ -44,18 +43,14 @@ def execute(_: Any) -> None:
4443

4544
HERE = Path(__file__).parent
4645

47-
if FLAGS.docker:
48-
exit("The command is not supported yet.")
49-
# subprocess.call('./start_docker.sh')
50-
else:
51-
start = HERE / "start.sh"
52-
open = "true" if FLAGS.open else "false"
53-
n_workers = str(FLAGS.n_workers)
46+
start = HERE / "start.sh"
47+
open = "true" if FLAGS.open else "false"
48+
n_workers = str(FLAGS.n_workers)
5449

55-
if FLAGS.config is not None:
56-
subprocess.call([start, open, n_workers, str(FLAGS.config)])
57-
else:
58-
subprocess.call([start, open, n_workers])
50+
if FLAGS.config is not None:
51+
subprocess.call([start, open, n_workers, str(FLAGS.config)])
52+
else:
53+
subprocess.call([start, open, n_workers])
5954

6055

6156
def main() -> None:

deepcave/config.py

+12-6
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,6 @@ class Config:
6969

7070
# Default Meta information which are used across the platform
7171
META_DEFAULT: Dict[str, Any] = {
72-
"matplotlib-mode": False,
7372
"working_dir": None, # str(DEFAULT_WORKING_DIRECTORY),
7473
"selected_run_paths": [],
7574
"groups": {}, # {group_name: [run_path, ...]}
@@ -94,14 +93,17 @@ def SERVER_NAME(self) -> str:
9493
def PLUGINS(self) -> Dict[str, List[Any]]:
9594
"""A list of available plugins per category."""
9695
from deepcave.plugins.budget.budget_correlation import BudgetCorrelation
96+
from deepcave.plugins.hyperparameter.ablation_paths import AblationPaths
97+
from deepcave.plugins.hyperparameter.configuration_cube import ConfigurationCube
9798
from deepcave.plugins.hyperparameter.importances import Importances
99+
from deepcave.plugins.hyperparameter.parallel_coordinates import (
100+
ParallelCoordinates,
101+
)
98102
from deepcave.plugins.hyperparameter.pdp import PartialDependencies
99103
from deepcave.plugins.hyperparameter.symbolic_explanations import (
100104
SymbolicExplanations,
101105
)
102-
from deepcave.plugins.objective.configuration_cube import ConfigurationCube
103106
from deepcave.plugins.objective.cost_over_time import CostOverTime
104-
from deepcave.plugins.objective.parallel_coordinates import ParallelCoordinates
105107
from deepcave.plugins.objective.pareto_front import ParetoFront
106108
from deepcave.plugins.summary.configurations import Configurations
107109
from deepcave.plugins.summary.footprint import FootPrint
@@ -116,15 +118,16 @@ def PLUGINS(self) -> Dict[str, List[Any]]:
116118
],
117119
"Objective Analysis": [
118120
CostOverTime(),
119-
ConfigurationCube(),
120121
ParetoFront(),
121-
ParallelCoordinates(),
122122
],
123123
"Budget Analysis": [
124124
BudgetCorrelation(),
125125
],
126126
"Hyperparameter Analysis": [
127127
Importances(),
128+
AblationPaths(),
129+
ConfigurationCube(),
130+
ParallelCoordinates(),
128131
PartialDependencies(),
129132
SymbolicExplanations(),
130133
],
@@ -134,9 +137,12 @@ def PLUGINS(self) -> Dict[str, List[Any]]:
134137
@property
135138
def CONVERTERS(self) -> List[Type["Run"]]:
136139
"""Get a list of available run converters."""
140+
from deepcave.runs.converters.amltk import AMLTKRun
137141
from deepcave.runs.converters.bohb import BOHBRun
142+
from deepcave.runs.converters.dataframe import DataFrameRun
138143
from deepcave.runs.converters.deepcave import DeepCAVERun
144+
from deepcave.runs.converters.optuna import OptunaRun
139145
from deepcave.runs.converters.smac3v1 import SMAC3v1Run
140146
from deepcave.runs.converters.smac3v2 import SMAC3v2Run
141147

142-
return [DeepCAVERun, BOHBRun, SMAC3v1Run, SMAC3v2Run]
148+
return [AMLTKRun, BOHBRun, DeepCAVERun, OptunaRun, SMAC3v1Run, SMAC3v2Run, DataFrameRun]

deepcave/evaluators/__init__.py

+2
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,6 @@
1010
This module provides utilities for creating a footprint of a run.
1111
lpi
1212
This module provides utilities to calculate the local parameter importance (LPI).
13+
ablation
14+
This module evaluates the ablation paths.
1315
"""

0 commit comments

Comments
 (0)