Skip to content

Commit 4af082e

Browse files
author
Sarah Krebs
committed
Merge development and fix conflict
2 parents 374e528 + 5814360 commit 4af082e

File tree

18 files changed

+99
-20
lines changed

18 files changed

+99
-20
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
- Add exit button which first deletes running jobs and then terminates DeepCave.
1818
- Nicer handling of Keyboard Interrupt.
1919
- Disable debug mode.
20+
- Save plotly plots in higher resolution upon download.
2021
- Get hovertext per budget in Footprint, Config Cube, Cost over Time, and Pareto Front.
2122

2223
## Bug-Fixes
@@ -29,6 +30,9 @@
2930
- When getting budget, objectives etc from multiple runs in Cost over Time and Pareto Front:
3031
- Instead of taking the first run as comparative value,
3132
- take the one with the lowest budget, else the index for the budgets could be out of bounds.
33+
- For PCP, show hyperparameters with highest importance closest to the cost, i.e. right (#124).
34+
- Add init files to all test directories.
35+
- Correct LPI importance tests.
3236
- Free port when exiting via the exit button (#52).
3337

3438
## Documentation

deepcave/config.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ class Config:
5656
SAVE_IMAGES = False # The figure will be saved to the cache directory.
5757
FIGURE_MARGIN = dict(t=30, b=0, l=0, r=0)
5858
FIGURE_HEIGHT = "40vh"
59+
FIGURE_DOWNLOAD_SCALE = 4.0
5960

6061
# Redis settings
6162
REDIS_PORT: int = 6379

deepcave/plugins/budget/budget_correlation.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,11 @@ def get_output_layout(register: Callable) -> List[Any]:
228228
[
229229
dbc.Tab(
230230
dcc.Graph(
231-
id=register("graph", "figure"), style={"height": Config.FIGURE_HEIGHT}
231+
id=register("graph", "figure"),
232+
style={"height": Config.FIGURE_HEIGHT},
233+
config={
234+
"toImageButtonOptions": {"scale": Config.FIGURE_DOWNLOAD_SCALE}
235+
},
232236
),
233237
label="Graph",
234238
),

deepcave/plugins/hyperparameter/importances.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -357,7 +357,11 @@ def get_output_layout(register: Callable) -> dcc.Graph:
357357
dcc.Graph
358358
Layout for the output block.
359359
"""
360-
return dcc.Graph(register("graph", "figure"), style={"height": Config.FIGURE_HEIGHT})
360+
return dcc.Graph(
361+
register("graph", "figure"),
362+
style={"height": Config.FIGURE_HEIGHT},
363+
config={"toImageButtonOptions": {"scale": Config.FIGURE_DOWNLOAD_SCALE}},
364+
)
361365

362366
@staticmethod
363367
def load_outputs(run, inputs, outputs) -> go.Figure: # type: ignore

deepcave/plugins/hyperparameter/pdp.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -366,7 +366,11 @@ def get_output_layout(register: Callable) -> dcc.Graph:
366366
dcc.Graph
367367
Layout for the output block.
368368
"""
369-
return dcc.Graph(register("graph", "figure"), style={"height": Config.FIGURE_HEIGHT})
369+
return dcc.Graph(
370+
register("graph", "figure"),
371+
style={"height": Config.FIGURE_HEIGHT},
372+
config={"toImageButtonOptions": {"scale": Config.FIGURE_DOWNLOAD_SCALE}},
373+
)
370374

371375
@staticmethod
372376
def get_pdp_figure( # type: ignore

deepcave/plugins/hyperparameter/symbolic_explanations.py

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -491,8 +491,16 @@ def get_output_layout(register: Callable) -> List[dcc.Graph]:
491491
Layout for the output block.
492492
"""
493493
return [
494-
dcc.Graph(register("symb_graph", "figure"), style={"height": Config.FIGURE_HEIGHT}),
495-
dcc.Graph(register("pdp_graph", "figure"), style={"height": Config.FIGURE_HEIGHT}),
494+
dcc.Graph(
495+
register("symb_graph", "figure"),
496+
style={"height": Config.FIGURE_HEIGHT},
497+
config={"toImageButtonOptions": {"scale": Config.FIGURE_DOWNLOAD_SCALE}},
498+
),
499+
dcc.Graph(
500+
register("pdp_graph", "figure"),
501+
style={"height": Config.FIGURE_HEIGHT},
502+
config={"toImageButtonOptions": {"scale": Config.FIGURE_DOWNLOAD_SCALE}},
503+
),
496504
]
497505

498506
@staticmethod

deepcave/plugins/objective/configuration_cube.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -294,7 +294,13 @@ def get_output_layout(register: Callable) -> Tuple[dcc.Graph,]:
294294
Tuple[dcc.Graph,]
295295
Layout for the output block.
296296
"""
297-
return (dcc.Graph(register("graph", "figure"), style={"height": Config.FIGURE_HEIGHT}),)
297+
return (
298+
dcc.Graph(
299+
register("graph", "figure"),
300+
style={"height": Config.FIGURE_HEIGHT},
301+
config={"toImageButtonOptions": {"scale": Config.FIGURE_DOWNLOAD_SCALE}},
302+
),
303+
)
298304

299305
@staticmethod
300306
def load_outputs(run, inputs, outputs) -> go.Figure: # type: ignore

deepcave/plugins/objective/cost_over_time.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -298,7 +298,11 @@ def get_output_layout(register: Callable) -> dcc.Graph:
298298
dcc.Graph
299299
The layouts for the output block.
300300
"""
301-
return dcc.Graph(register("graph", "figure"), style={"height": Config.FIGURE_HEIGHT})
301+
return dcc.Graph(
302+
register("graph", "figure"),
303+
style={"height": Config.FIGURE_HEIGHT},
304+
config={"toImageButtonOptions": {"scale": Config.FIGURE_DOWNLOAD_SCALE}},
305+
)
302306

303307
@staticmethod
304308
def load_outputs(runs, inputs, outputs) -> go.Figure: # type: ignore

deepcave/plugins/objective/parallel_coordinates.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -301,7 +301,9 @@ def process(run, inputs) -> Dict[str, Any]: # type: ignore
301301
evaluator.calculate(objective, budget, n_trees=10, seed=0)
302302
importances_dict = evaluator.get_importances()
303303
importances = {u: v[0] for u, v in importances_dict.items()}
304-
important_hp_names = sorted(importances, key=lambda key: importances[key], reverse=True)
304+
important_hp_names = sorted(
305+
importances, key=lambda key: importances[key], reverse=False
306+
)
305307
result["important_hp_names"] = important_hp_names
306308

307309
return result
@@ -322,7 +324,11 @@ def get_output_layout(register: Callable) -> dcc.Graph:
322324
dcc.Graph
323325
The layouts for the output block.
324326
"""
325-
return dcc.Graph(register("graph", "figure"), style={"height": Config.FIGURE_HEIGHT})
327+
return dcc.Graph(
328+
register("graph", "figure"),
329+
style={"height": Config.FIGURE_HEIGHT},
330+
config={"toImageButtonOptions": {"scale": Config.FIGURE_DOWNLOAD_SCALE}},
331+
)
326332

327333
@staticmethod
328334
def load_outputs(run, inputs, outputs) -> go.Figure: # type: ignore

deepcave/plugins/objective/pareto_front.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -379,7 +379,11 @@ def get_output_layout(register: Callable) -> dcc.Graph:
379379
dcc.Graph
380380
The layout for the output block.
381381
"""
382-
return dcc.Graph(register("graph", "figure"), style={"height": Config.FIGURE_HEIGHT})
382+
return dcc.Graph(
383+
register("graph", "figure"),
384+
style={"height": Config.FIGURE_HEIGHT},
385+
config={"toImageButtonOptions": {"scale": Config.FIGURE_DOWNLOAD_SCALE}},
386+
)
383387

384388
@staticmethod
385389
def load_outputs(runs, inputs, outputs) -> go.Figure: # type: ignore

0 commit comments

Comments
 (0)