Skip to content

Commit 113a848

Browse files
author
Sarah Krebs
committed
Merge development and solve conflicts
2 parents 942228e + 3c45d1a commit 113a848

31 files changed

+396
-135
lines changed

.flake8

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,6 @@ extend-exclude =
77
build
88
extend-ignore =
99
# No whitespace before ':' in [x : y]
10-
E203
10+
E203,
1111
# No lambdas — too strict
12-
E731
12+
E731,

.github/workflows/docs.yml

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
name: docs
22

3+
concurrency:
4+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
5+
cancel-in-progress: true
6+
37
on:
48
# Trigger manually
59
workflow_dispatch:
@@ -22,19 +26,22 @@ env:
2226
jobs:
2327
build-and-deploy:
2428
runs-on: ubuntu-latest
29+
defaults:
30+
run:
31+
shell: bash # Default to using bash on all
2532
steps:
2633
- name: Checkout
27-
uses: actions/checkout@v2
34+
uses: actions/checkout@v4
2835

2936
- name: Setup Python
30-
uses: actions/setup-python@v2
37+
uses: actions/setup-python@v5
3138
with:
3239
python-version: 3.9
3340

3441
- name: Install dependencies
3542
run: |
3643
pip install .
37-
pip install .[dev]
44+
pip install ".[dev]"
3845
3946
- name: Make docs
4047
run: |

.github/workflows/pytest.yml

Lines changed: 40 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,50 @@
11
name: tests
2-
on: [ push ]
2+
3+
# Cancel previous tests for this branch if a new commit is pushed
4+
concurrency:
5+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
6+
cancel-in-progress: true
7+
8+
on:
9+
# Allow manual trigger of workflow
10+
workflow_dispatch:
11+
12+
# Run tests on push/merge to main
13+
push:
14+
branches:
15+
- main
16+
17+
# Run tests on anything that has a pull request to main/development
18+
pull_request:
19+
branches:
20+
- main
21+
- development
22+
323
jobs:
424
pytest:
5-
name: PyTest
6-
runs-on: ubuntu-latest
7-
steps:
8-
- uses: actions/checkout@v2
9-
- name: Add conda to system path
10-
run: |
11-
# $CONDA is an environment variable pointing to the root of the miniconda directory
12-
echo $CONDA/bin >> $GITHUB_PATH
25+
name: Test ${{ matrix.python-version }}-${{ matrix.os }}
26+
runs-on: ${{ matrix.os }}
27+
defaults:
28+
run:
29+
shell: bash # Default to using bash on all
30+
31+
strategy:
32+
fail-fast: false
33+
matrix:
34+
python-version: ["3.9", "3.10"] # "3.11" fails due to swig
35+
os: ["ubuntu-latest"] # "macos-latest", "windows-latest" fails due to swig
1336

37+
steps:
38+
- uses: actions/checkout@v4
1439
- name: Setup Python 3.9
15-
uses: actions/setup-python@v2
40+
uses: actions/setup-python@v5
1641
with:
17-
python-version: 3.9
42+
python-version: ${{ matrix.python-version }}
1843

1944
- name: Install dependencies
2045
run: |
21-
conda install -c anaconda swig
22-
make install-dev
23-
24-
- name: Run pytest
46+
pip install swig
47+
python -m pip install ".[dev]"
48+
49+
- name: Run pytest
2550
run: pytest tests

CHANGELOG.md

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22

33
## Plugins
44
- Add symbolic explanations plugin (#46).
5+
- It is now possible to view multiple unequal runs at once in Cost over Time and Pareto (#93).
6+
- Runs with unequal objectives cannot be displayed together.
7+
- Added an enum for displaying according warning messages.
58

69
## Enhancements
710
- Fix lower bounds of dependency versions.
@@ -20,10 +23,17 @@
2023
- Reset inputs to fix error when subsequently selecting runs with different configspaces, objectives or budgets (#106).
2124
- Fix errors due to changing inputs before runselection (#64).
2225
- For fANOVA, remove constant hyperparameters from configspace (#9).
26+
- When getting budget, objectives etc from multiple runs in Cost over Time and Pareto Front:
27+
- Instead of taking the first run as comparative value,
28+
- take the one with the lowest budget, else the index for the budgets could be out of bounds.
2329
- For PCP, show hyperparameters with highest importance closest to the cost, i.e. right (#124).
2430
- Add init files to all test directories.
2531
- Correct LPI importance tests.
2632

33+
## Documentation
34+
- Add How to Contribute section.
35+
- Expand documentation for partial dependence plugin.
36+
2737
## Version-Updates
2838
- Black version from 23.1.0 to 23.3.0
2939
- Mypy from 0.930 to 1.5.1
@@ -39,6 +49,10 @@
3949
- Major overhaul of docstrings in various files
4050
- Removed unused imports and variables
4151

52+
## Groups
53+
- Groups now get a default name, if no name was entered by the user.
54+
- Groups get sorted alphabetically to appear more ordered.
55+
4256
## Additional Changes
4357
- Added a "make install examples" in Makefile
4458

@@ -68,7 +82,7 @@
6882
- SMAC 2.0
6983

7084
## Dependencies
71-
- Remove SMAC dependency by adding required function directly
85+
- Remove SMAC dependency by adding required function directly.
7286

7387
# Version 1.0.1
7488

README.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
<img src="docs/images/DeepCAVE_Logo_wide.png" alt="Logo"/>
2+
13
# DeepCAVE
24

35
DeepCAVE is a visualization and analysis tool for AutoML (especially for the sub-problem
@@ -14,7 +16,7 @@ Following features are provided:
1416
- A large collection of plugins to explore multiple areas like performance, hyperparameter and
1517
budget analysis.
1618
- Save your runs using DeepCAVE's native recorder.
17-
- Support for many optimizers using converter (e.g., DeepCAVE, SMAC and BOHB).
19+
- Support for many optimizers using converters (e.g., DeepCAVE, SMAC and BOHB).
1820
- Select runs directly from a working directory in the interface.
1921
- Select groups of runs for combined analysis.
2022
- Modularized plugin structure with access to selected runs/groups to provide maximal flexibility.
@@ -41,6 +43,7 @@ pip install DeepCAVE
4143
If you want to contribute to DeepCAVE use the following steps instead:
4244
```bash
4345
git clone https://github.com/automl/DeepCAVE.git
46+
cd DeepCAVE
4447
conda create -n DeepCAVE python=3.9
4548
conda activate DeepCAVE
4649
conda install -c anaconda swig

deepcave/layouts/general.py

Lines changed: 27 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -337,6 +337,7 @@ def get_layout(
337337

338338
# Load from cache if page is loaded
339339
children = []
340+
340341
for name, paths in groups.items():
341342
if name is None:
342343
continue
@@ -368,10 +369,29 @@ def callback(group_names: List[str], all_run_paths, i):
368369
self._refresh_groups = False
369370
raise PreventUpdate()
370371

372+
# For the default group names, if no name was entered
373+
group_counter = 0
374+
371375
groups = {}
372376
for group_name, run_paths in zip(group_names, all_run_paths):
373377
if group_name is None or group_name == "":
374-
continue
378+
# Set the default group name with a counter,
379+
# so the groups dont overwrite themselves
380+
group_name_unavailable = True
381+
382+
groups_cache = c.get("groups")
383+
if groups_cache is None:
384+
continue
385+
386+
# Check to see that no group name that already exists
387+
# gets picked
388+
while group_name_unavailable:
389+
group_name = f"Group {group_counter}"
390+
assert groups_cache is not None
391+
if group_name not in groups_cache.keys():
392+
group_name_unavailable = False
393+
else:
394+
group_counter += 1
375395

376396
if run_paths is None or len(run_paths) == 0:
377397
continue
@@ -386,16 +406,20 @@ def callback(group_names: List[str], all_run_paths, i):
386406

387407
groups[group_name] = valid_run_paths
388408

409+
# Sort the groups alphabetically, so when added
410+
# they appear ordered
411+
sorted_groups = dict(sorted(groups.items()))
412+
389413
try:
390414
# Now save it
391-
run_handler.update_groups(groups)
415+
run_handler.update_groups(sorted_groups)
392416
except NotMergeableError:
393417
notification.update("The selected runs are not mergeable.")
394418

395419
# This will automatically trigger the group display s.t. the selection is redo.
396420
return i + 1
397421

398-
self.logger.debug(f"Groups: {groups}")
422+
self.logger.debug(f"Groups: {sorted_groups}")
399423

400424
raise PreventUpdate()
401425

deepcave/plugins/__init__.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -917,7 +917,6 @@ def __call__(self, render_button: bool = False) -> List[Component]:
917917
]
918918
else:
919919
components += [html.H1(self.name)]
920-
921920
try:
922921
self.check_runs_compatibility(self.all_runs)
923922
except NotMergeableError as message:

deepcave/plugins/dynamic.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,7 @@ def plugin_output_update(_: Any, *inputs_list: str) -> Any:
9595
runs = self.get_selected_runs(inputs)
9696

9797
raw_outputs = {}
98+
rc.clear()
9899
for run in runs:
99100
run_outputs = rc.get(run, self.id, inputs_key)
100101
if run_outputs is None:

deepcave/plugins/hyperparameter/importances.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,10 @@ def get_filter_layout(register: Callable) -> List[html.Div]:
147147
html.Div(
148148
[
149149
dbc.Label("Budgets"),
150-
help_button("The hyperparameters are sorted by the highest budget."),
150+
help_button(
151+
"Budget refers to the multi-fidelity budget. "
152+
"The hyperparameters are sorted by the highest budget."
153+
),
151154
dbc.Checklist(id=register("budget_ids", ["value", "options"]), inline=True),
152155
]
153156
),

deepcave/plugins/hyperparameter/pdp.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,8 +85,9 @@ def get_input_layout(register: Callable) -> List[dbc.Row]:
8585
[
8686
dbc.Label("Budget"),
8787
help_button(
88+
"Budget refers to the multi-fidelity budget. "
8889
"Combined budget means that the trial on the highest"
89-
" evaluated budget is used.\n\n"
90+
" evaluated budget is used. \n "
9091
"Note: Selecting combined budget might be misleading if"
9192
" a time objective is used. Often, higher budget take "
9293
" longer to evaluate, which might negatively influence "

0 commit comments

Comments
 (0)