@@ -823,9 +823,6 @@ def get_all_costs(
823823 else :
824824 history = self .history
825825 for trial in history :
826- if trial .config_id not in results :
827- results [trial .config_id ] = {}
828-
829826 if statuses is not None :
830827 if isinstance (statuses , Status ):
831828 statuses = [statuses ]
@@ -844,12 +841,15 @@ def get_all_costs(
844841 latest_budget = highest_evaluated_budget [trial .config_id ]
845842 # Only the highest budget is kept
846843 if trial .budget >= latest_budget :
844+ if trial .config_id not in results :
845+ results [trial .config_id ] = {}
847846 results [trial .config_id ][trial .seed ] = trial .costs
848847 else :
849848 if trial .budget is not None :
850849 if trial .budget != budget :
851850 continue
852-
851+ if trial .config_id not in results :
852+ results [trial .config_id ] = {}
853853 results [trial .config_id ][trial .seed ] = trial .costs
854854 return results
855855
@@ -939,19 +939,21 @@ def get_incumbent(
939939 min_cost = np .inf
940940 best_config_id = None
941941
942- results = self .get_all_costs (budget , statuses , seed , selected_ids )
942+ results = self .get_all_costs (
943+ budget = budget , statuses = statuses , seed = seed , selected_ids = selected_ids
944+ )
943945
944946 seed_count = {}
945947 for config_id , costs in results .items ():
946- seed_count [config_id ] = len (costs . values () )
948+ seed_count [config_id ] = len (costs )
947949 max_seed_count = max (seed_count .values ())
948950
949951 for config_id , costs in results .items ():
950952 # If there are multiple seeds, only configurations evaluated on all seeds are
951953 # considered. From these configurations, the one with the highest average cost
952954 # over the seeds is considered as the incumbent.
953955 if max_seed_count > 1 :
954- if len (costs . values () ) < max_seed_count :
956+ if len (costs ) < max_seed_count :
955957 continue
956958
957959 # Get average over all seeds
@@ -1396,7 +1398,7 @@ def check_equality(
13961398 configspace : bool = True ,
13971399 objectives : bool = True ,
13981400 budgets : bool = True ,
1399- seeds : bool = True ,
1401+ seeds : bool = False ,
14001402) -> Dict [str , Any ]:
14011403 """
14021404 Check the passed runs on equality based on the selected runs.
@@ -1408,15 +1410,15 @@ def check_equality(
14081410 runs : list[AbstractRun]
14091411 Runs to check for equality.
14101412 meta : bool, optional
1411- Meta-Data excluding objectives and budgets, by default True .
1413+ Meta-Data excluding objectives and budgets, by default False .
14121414 configspace : bool, optional
14131415 Wheter to include the configuration space, by default True.
14141416 objectives : bool, optional
14151417 Wheter to include the objectives, by default True.
14161418 budgets : bool, optional
14171419 Whether to include the budgets, by default True.
14181420 seeds : bool, optional
1419- Whether to include the seeds, by default True .
1421+ Whether to include the seeds, by default False .
14201422
14211423 Returns
14221424 -------
@@ -1517,7 +1519,7 @@ def check_equality(
15171519 for run in runs :
15181520 s2 = run .get_seeds (include_combined = False )
15191521 if s1 != s2 :
1520- raise NotMergeableError ("Seeds of runs are not equal." )
1522+ raise NotMergeableError ("Seeds of runs are not equal." , RunInequality . INEQ_SEED )
15211523
15221524 result ["seeds" ] = s1
15231525 if meta :
0 commit comments