@@ -74,8 +74,8 @@ def _minimize_nevergrad(fun, x0, *, bounds=None, constraints=None):
7474 instrumentation_params = ng .p .Array (init = x0 )
7575 instrumentation = ng .p .Instrumentation (instrumentation_params )
7676
77- optimizer = ng .optimizers .registry ["NgIohTuned" ](instrumentation , budget = 2000 )
78- optimizer .register_callback ('ask' , ng .callbacks .EarlyStopping .no_improvement_stopper (1000 ))
77+ optimizer = ng .optimizers .registry ["NgIohTuned" ](instrumentation , budget = 3000 )
78+ optimizer .register_callback ('ask' , ng .callbacks .EarlyStopping .no_improvement_stopper (300 ))
7979
8080 def objective_with_nevergrad_expected_signature (* args ):
8181 return fun (args [0 ], * args [1 :])
@@ -116,7 +116,8 @@ def constrained_fun(x):
116116 best = fmin (fn = constrained_fun , space = space , trials = trials ,
117117 algo = kwargs .get ("algo" , tpe .suggest ),
118118 max_evals = kwargs .get ("max_evals" , 3000 ),
119- early_stop_fn = no_progress_loss (500 ))
119+ early_stop_fn = no_progress_loss (500 ),
120+ rstate = np .random .default_rng (0 ))
120121 result = OptimizeResult (
121122 x = best ,
122123 fun = trials .best_trial ['result' ]['loss' ],
@@ -139,11 +140,11 @@ def _minimize_skopt(fun, x0, *, bounds=None, constraints=None, **kwargs):
139140 # verbose=True,
140141 # callback=[DeltaYStopper(1e-1, 5), DeltaXStopper(.01)])
141142 res = skopt .forest_minimize (
142- lambda x : fun (np .array (x )), bounds , n_calls = 800 ,
143+ lambda x : fun (np .array (x )), bounds , n_calls = 3000 ,
143144 space_constraint = constraints and (lambda x : constraints (np .array (x ))),
144145 n_initial_points = 50 * len (bounds ),
145146 verbose = True ,
146- callback = HollowIterationsStopper (100 , .1 ))
147+ callback = HollowIterationsStopper (150 , .1 ))
147148 res ['message' ] = 'mock success'
148149 res ['nfev' ] = len (res .x_iters )
149150 res ['success' ] = True
0 commit comments