File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed
Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -501,8 +501,11 @@ def draw_latin_hypercube_samples(self, num_samples: int) -> list:
501501 normalized_param_config = self .normalize_param_config (param_config )
502502 try :
503503 index = self .find_param_config_index (normalized_param_config )
504- indices .append (index )
505- normalized_param_configs .append (normalized_param_config )
504+
505+ # returned indices must not contain duplicates
506+ if index not in indices :
507+ indices .append (index )
508+ normalized_param_configs .append (normalized_param_config )
506509 except ValueError :
507510 """With search space restrictions, the search space may not be a cartesian product of parameter values.
508511 It is thus possible for LHS to generate a parameter combination that is not in the actual searchspace.
You can’t perform that action at this time.
0 commit comments