Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions kernel_tuner/strategies/bayes_opt.py
Original file line number Diff line number Diff line change
Expand Up @@ -501,8 +501,11 @@ def draw_latin_hypercube_samples(self, num_samples: int) -> list:
normalized_param_config = self.normalize_param_config(param_config)
try:
index = self.find_param_config_index(normalized_param_config)
indices.append(index)
normalized_param_configs.append(normalized_param_config)

# returned indices must not contain duplicates
if index not in indices:
indices.append(index)
normalized_param_configs.append(normalized_param_config)
except ValueError:
"""With search space restrictions, the search space may not be a cartesian product of parameter values.
It is thus possible for LHS to generate a parameter combination that is not in the actual searchspace.
Expand Down