@@ -268,7 +268,6 @@ def get_hyperparam(name: str, default, supported_values=list()):
268268 self .__valid_observations = list ()
269269 self .unvisited_cache = self .unvisited ()
270270 time_setup = time .perf_counter_ns ()
271- self .error_message_searchspace_fully_observed = "The search space has been fully observed"
272271
273272 # take initial sample
274273 if self .num_initial_samples > 0 :
@@ -572,7 +571,7 @@ def __optimize(self, max_fevals):
572571 """Find the next best candidate configuration(s), evaluate those and update the model accordingly."""
573572 while self .fevals < max_fevals :
574573 if self .__visited_num >= self .searchspace_size :
575- raise ValueError ( self . error_message_searchspace_fully_observed )
574+ break
576575 predictions , _ , std = self .predict_list (self .unvisited_cache )
577576 hyperparam = self .contextual_variance (std )
578577 list_of_acquisition_values = self .__af (predictions , hyperparam )
@@ -611,7 +610,7 @@ def __optimize_multi(self, max_fevals):
611610 predictions , _ , std = self .predict_list (self .unvisited_cache )
612611 hyperparam = self .contextual_variance (std )
613612 if self .__visited_num >= self .searchspace_size :
614- raise ValueError ( self . error_message_searchspace_fully_observed )
613+ break
615614 time_predictions = time .perf_counter_ns ()
616615 actual_candidate_params = list ()
617616 actual_candidate_indices = list ()
@@ -727,7 +726,7 @@ def __optimize_multi_advanced(self, max_fevals, increase_precision=False):
727726 if single_af :
728727 return self .__optimize (max_fevals )
729728 if self .__visited_num >= self .searchspace_size :
730- raise ValueError ( self . error_message_searchspace_fully_observed )
729+ break
731730 observations_median = np .median (self .__valid_observations )
732731 if increase_precision is False :
733732 predictions , _ , std = self .predict_list (self .unvisited_cache )
@@ -835,7 +834,7 @@ def __optimize_multi_fast(self, max_fevals):
835834 predictions , _ , std = self .predict_list (self .unvisited_cache )
836835 hyperparam = self .contextual_variance (std )
837836 if self .__visited_num >= self .searchspace_size :
838- raise ValueError ( self . error_message_searchspace_fully_observed )
837+ break
839838 for af in aqfs :
840839 if self .__visited_num >= self .searchspace_size or self .fevals >= max_fevals :
841840 break
@@ -876,7 +875,7 @@ def __optimize_multi_ultrafast(self, max_fevals, predict_eval_ratio=5):
876875 eval_start = time .perf_counter ()
877876 hyperparam = self .contextual_variance (std )
878877 if self .__visited_num >= self .searchspace_size :
879- raise ValueError ( self . error_message_searchspace_fully_observed )
878+ break
880879 for af in aqfs :
881880 if self .__visited_num >= self .searchspace_size or self .fevals >= max_fevals :
882881 break
0 commit comments