File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -1562,7 +1562,9 @@ def _optimize_openbox() -> Union[pd.Series,
15621562 # TODO: save dtype and convert back later
15631563 values = values .astype (int )
15641564
1565- if values .dtype .kind in 'iumM' :
1565+ if len (values ) == 1 :
1566+ variables .append (sp .Constant (value = float (values [0 ]), name = key ))
1567+ elif values .dtype .kind in 'iumM' :
15661568 variables .append (sp .Int (lower = values .min (), upper = values .max (), name = key ))
15671569 elif values .dtype .kind == 'f' or (values .dtype .kind == 'O' and all ([isinstance (v , Decimal ) for v in values ])):
15681570 variables .append (sp .Real (lower = values .min (), upper = values .max (), name = key ))
@@ -1599,7 +1601,7 @@ def eval_run(config: sp.Configuration):
15991601 task_id = 'soc' ,
16001602 random_state = random_state ,
16011603 initial_runs = min (max_tries , n_initial_points or 20 + 3 * len (kwargs )),
1602- init_strategy = 'latin_hypercube' ,
1604+ # init_strategy='latin_hypercube',
16031605 )
16041606 history = opt .run ()
16051607 optimal_configurations = history .get_incumbents ()
You can’t perform that action at this time.
0 commit comments