@@ -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 :
@@ -569,7 +568,7 @@ def __optimize(self, max_fevals):
569568 """Find the next best candidate configuration(s), evaluate those and update the model accordingly."""
570569 while self .fevals < max_fevals :
571570 if self .__visited_num >= self .searchspace_size :
572- raise ValueError ( self . error_message_searchspace_fully_observed )
571+ break
573572 predictions , _ , std = self .predict_list (self .unvisited_cache )
574573 hyperparam = self .contextual_variance (std )
575574 list_of_acquisition_values = self .__af (predictions , hyperparam )
@@ -608,7 +607,7 @@ def __optimize_multi(self, max_fevals):
608607 predictions , _ , std = self .predict_list (self .unvisited_cache )
609608 hyperparam = self .contextual_variance (std )
610609 if self .__visited_num >= self .searchspace_size :
611- raise ValueError ( self . error_message_searchspace_fully_observed )
610+ break
612611 time_predictions = time .perf_counter_ns ()
613612 actual_candidate_params = list ()
614613 actual_candidate_indices = list ()
@@ -724,7 +723,7 @@ def __optimize_multi_advanced(self, max_fevals, increase_precision=False):
724723 if single_af :
725724 return self .__optimize (max_fevals )
726725 if self .__visited_num >= self .searchspace_size :
727- raise ValueError ( self . error_message_searchspace_fully_observed )
726+ break
728727 observations_median = np .median (self .__valid_observations )
729728 if increase_precision is False :
730729 predictions , _ , std = self .predict_list (self .unvisited_cache )
@@ -832,7 +831,7 @@ def __optimize_multi_fast(self, max_fevals):
832831 predictions , _ , std = self .predict_list (self .unvisited_cache )
833832 hyperparam = self .contextual_variance (std )
834833 if self .__visited_num >= self .searchspace_size :
835- raise ValueError ( self . error_message_searchspace_fully_observed )
834+ break
836835 for af in aqfs :
837836 if self .__visited_num >= self .searchspace_size or self .fevals >= max_fevals :
838837 break
@@ -873,7 +872,7 @@ def __optimize_multi_ultrafast(self, max_fevals, predict_eval_ratio=5):
873872 eval_start = time .perf_counter ()
874873 hyperparam = self .contextual_variance (std )
875874 if self .__visited_num >= self .searchspace_size :
876- raise ValueError ( self . error_message_searchspace_fully_observed )
875+ break
877876 for af in aqfs :
878877 if self .__visited_num >= self .searchspace_size or self .fevals >= max_fevals :
879878 break
0 commit comments