Hello!
I'm trying to solve black-box optimization task and that task is specific: domain of objective function is quite small, so when suggestion point x is not in domain, f(x) returns nan or any big value like 2.72489e+19 or larger.
My code:
import nevergrad as ng
def obj_function(x):
return black_box.get_function_value(x.tolist())
def solve():
initial_point = black_box.get_initial_point()
# init optimizer
param = ng.p.Array(shape=(parametrization_val,)).set_standardized_data(initial_point)
ng_optimizer = ng.optimizers.registry['BFGS'](parametrization=param, budget=1000)
for _ in range(ng_optimizer.budget):
x = ng_optimizer.ask()
obj_v = obj_function(*x.args, **x.kwargs)
ng_optimizer.tell(x, obj_v)
recommendation = ng_optimizer.provide_recommendation()
return recommendation.value
The main problem, that nevergrad optimizer suggest the same point many times until the budget ends. So my log looks like:
So it can't fins solution and recommendation just return initial point as the best result. So I can't understand why nevergrad suggest repeated points and how to avoid this?
Thank you
Hello! I'm trying to solve black-box optimization task and that task is specific: domain of objective function is quite small, so when suggestion point
x
is not in domain,f(x)
returnsnan
or any big value like 2.72489e+19 or larger.My code:
The main problem, that nevergrad optimizer suggest the same point many times until the budget ends. So my log looks like:
and so on.
So it can't fins solution and recommendation just return initial point as the best result. So I can't understand why nevergrad suggest repeated points and how to avoid this? Thank you