Skip to content

Commit

Permalink
adapt data-collection to new methods
Browse files Browse the repository at this point in the history
  • Loading branch information
SimonBlanke committed Apr 4, 2024
1 parent 2f8e56f commit 5b74030
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ def search_space_from_blank(search_space_blank, value_types):
return search_space

def search_data(self):
self.search_space = self.search_space(value_types="list")
self.search_space = self.search_space(value_types="array")

para_names = list(self.search_space.keys())
search_data_cols = para_names + ["score"]
Expand All @@ -67,12 +67,14 @@ def search_data(self):
dim_sizes_list = [len(array) for array in self.search_space.values()]
search_space_size = reduce((lambda x, y: x * y), dim_sizes_list)

self.create_objective_function()

while search_data_length < search_space_size:
print("\n ------------ search_space_size", search_space_size)
opt = GridSearchOptimizer(
self.search_space, direction="orthogonal", initialize={}
)
opt.search(self.objective_function_dict, n_iter=int(search_space_size * 1))
opt.search(self.pure_objective_function, n_iter=int(search_space_size * 1))

search_data = pd.concat(
[search_data, opt.search_data],
Expand Down

0 comments on commit 5b74030

Please sign in to comment.