3737from deepcave .runs .status import Status
3838from deepcave .utils .layout import create_table , help_button
3939from deepcave .utils .styled_plotty import get_discrete_heatmap , save_image
40- from deepcave .utils .util import get_latest_change
40+ from deepcave .utils .util import custom_round , get_latest_change
4141
4242
4343class Overview (DynamicPlugin ):
@@ -131,23 +131,38 @@ def load_outputs(run, *_: Any) -> List[Any]: # type: ignore
131131 List[Any]
132132 A list of the created tables of the overview.
133133 """
134- # Get best cost across all objectives, highest budget
135- incumbent , _ = run .get_incumbent (statuses = [Status .SUCCESS ])
136- config_id = run .get_config_id (incumbent )
137- objective_names = run .get_objective_names ()
138-
139- avg_costs , std_costs = run .get_avg_costs (config_id )
140-
141- best_performances = []
142- for idx in range (len (objective_names )):
143- best_performances += [
144- f"{ round (avg_costs [idx ], 2 )} ± { round (std_costs [idx ], 2 )} ({ objective_names [idx ]} )"
145- ]
146-
147134 optimizer = run .prefix
148135 if isinstance (run , Group ):
149136 optimizer = run .get_runs ()[0 ].prefix
150137
138+ performance_outputs = []
139+ for idx , obj in enumerate (run .get_objectives ()):
140+ # Get best cost for the objective, highest budget
141+ incumbent , _ = run .get_incumbent (objectives = obj , statuses = [Status .SUCCESS ])
142+ config_id = run .get_config_id (incumbent )
143+ avg_costs , std_costs = run .get_avg_costs (config_id )
144+
145+ if len (run .get_seeds (include_combined = False )) > 1 :
146+ best_performance = (
147+ f"{ custom_round (avg_costs [idx ])} " f"± { custom_round (std_costs [idx ])} "
148+ )
149+ else :
150+ best_performance = f"{ custom_round (avg_costs [idx ])} "
151+
152+ performance_outputs .append (
153+ html .Div (
154+ [
155+ html .Span (f"Best { obj .name } : { best_performance } " ),
156+ html .A (
157+ "(See Configuration)" ,
158+ href = Configurations .get_link (run , config_id ),
159+ style = {"color" : "white" },
160+ ),
161+ ],
162+ className = "card-text" ,
163+ ),
164+ )
165+
151166 # Design card for quick information here
152167 card = dbc .Card (
153168 [
@@ -162,15 +177,12 @@ def load_outputs(run, *_: Any) -> List[Any]: # type: ignore
162177 f"Latest change: { get_latest_change (run .latest_change )} " ,
163178 className = "card-text" ,
164179 ),
180+ * performance_outputs ,
165181 html .Div (
166182 [
167183 html .Span (
168- f"Best average performance: { ', ' .join (best_performances )} "
169- ),
170- html .A (
171- "(See Configuration)" ,
172- href = Configurations .get_link (run , config_id ),
173- style = {"color" : "white" },
184+ f"Total runtime [s]: "
185+ f"{ max (trial .end_time for trial in run .history )} "
174186 ),
175187 ],
176188 className = "card-text" ,
0 commit comments