Skip to content

Commit 09b2e2b

Browse files
authored
Merge pull request #158 from automl/bug/fix-cost-over-time-hoover-text
Better cost-over-time hoover text
2 parents 46f490e + c6019a5 commit 09b2e2b

File tree

2 files changed

+11
-6
lines changed

2 files changed

+11
-6
lines changed

CHANGELOG.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
# Version 1.2.1
22

33
## Quality of Life
4-
- Runs now get displayed with their parent directory for better distinguishability
4+
- Runs now get displayed with their parent directory for better distinguishability.
55
- Increase plot font sizes.
66
- Add a simple loading bar functionality for longer runs.
7+
- Show a run's hoover-text for the actual budget of a trial in Cost over Time with Combined budget (#154).
8+
- Use highest budget as default budget for Cost over Time instead of Combined.
79

810
## General
911
- Seed is now required in the Recorder.

deepcave/plugins/objective/cost_over_time.py

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,9 @@ def load_inputs(self) -> Dict[str, Any]:
225225
},
226226
"budget_id": {
227227
"options": self.budget_options,
228-
"value": self.budget_options[-1]["value"],
228+
"value": self.budget_options[0]["value"]
229+
if len(self.budget_options) == 1
230+
else self.budget_options[-2]["value"],
229231
},
230232
"xaxis": {
231233
"options": [
@@ -344,8 +346,7 @@ def load_outputs(runs, inputs, outputs) -> go.Figure: # type: ignore
344346
continue
345347

346348
objective = run.get_objective(inputs["objective_id"])
347-
budget = run.get_budget(inputs["budget_id"])
348-
config_ids = outputs[run.id]["config_ids"]
349+
ids = outputs[run.id]["ids"]
349350
x = outputs[run.id]["times"]
350351
if inputs["xaxis"] == "trials":
351352
x = outputs[run.id]["ids"]
@@ -360,9 +361,11 @@ def load_outputs(runs, inputs, outputs) -> go.Figure: # type: ignore
360361
hoverinfo = "skip"
361362
symbol = None
362363
mode = "lines"
363-
if len(config_ids) > 0:
364+
if len(run.history) > 0:
364365
hovertext = [
365-
get_hovertext_from_config(run, config_id, budget) for config_id in config_ids
366+
get_hovertext_from_config(run, trial.config_id, trial.budget)
367+
for id, trial in enumerate(run.history)
368+
if id in ids
366369
]
367370
hoverinfo = "text"
368371
symbol = "circle"

0 commit comments

Comments
 (0)