From 25844a883ec7196ae13e09f03af866198c4a2524 Mon Sep 17 00:00:00 2001 From: fabianvdW Date: Thu, 7 Oct 2021 09:30:05 +0200 Subject: [PATCH 1/2] Fix #1700 --- pkg/suggestion/v1beta1/skopt/base_service.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pkg/suggestion/v1beta1/skopt/base_service.py b/pkg/suggestion/v1beta1/skopt/base_service.py index e0203ee57e7..ebba653930a 100644 --- a/pkg/suggestion/v1beta1/skopt/base_service.py +++ b/pkg/suggestion/v1beta1/skopt/base_service.py @@ -118,11 +118,11 @@ def getSuggestions(self, trials, request_number): return_trial_list = [] - for i in range(request_number): - skopt_suggested = self.skopt_optimizer.ask() - logger.info("New suggested parameters for Trial: {}".format(skopt_suggested)) + skopt_suggested = self.skopt_optimizer.ask(n_points = request_number) + for suggestion in skopt_suggested: + logger.info("New suggested parameters for Trial: {}".format(suggestion)) return_trial_list.append( - BaseSkoptService.convert(self.search_space, skopt_suggested)) + BaseSkoptService.convert(self.search_space, suggestion)) logger.info("GetSuggestions return {} new Trials\n\n".format(request_number)) return return_trial_list From 4cc03936361087d6b67c0aeb066cf0f09c9e31fb Mon Sep 17 00:00:00 2001 From: fabianvdW Date: Thu, 7 Oct 2021 09:30:33 +0200 Subject: [PATCH 2/2] Reformat --- pkg/suggestion/v1beta1/skopt/base_service.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/suggestion/v1beta1/skopt/base_service.py b/pkg/suggestion/v1beta1/skopt/base_service.py index ebba653930a..77140962d4e 100644 --- a/pkg/suggestion/v1beta1/skopt/base_service.py +++ b/pkg/suggestion/v1beta1/skopt/base_service.py @@ -118,7 +118,7 @@ def getSuggestions(self, trials, request_number): return_trial_list = [] - skopt_suggested = self.skopt_optimizer.ask(n_points = request_number) + skopt_suggested = self.skopt_optimizer.ask(n_points=request_number) for suggestion in skopt_suggested: logger.info("New suggested parameters for Trial: {}".format(suggestion)) return_trial_list.append(