Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NevergradRuntimeWarning: Bounds are 1.0 sigma away from each other at the closest, you should aim for at least 3 for better quality. errors.NevergradRuntimeWarning, #1250

Open
xinhongri opened this issue Sep 28, 2021 · 1 comment

Comments

@xinhongri
Copy link

Steps to reproduce

  1. ng.p.Array(init=np.array([0.5,0.5,0.5]),).set_bounds(0, 1)

why does it happen?
how to solve?

@jrapin
Copy link
Contributor

jrapin commented Sep 28, 2021

Hi @xinhongri
The default sigma/step size is 1, but the range of your bounds is 1 - 0 = 1, so that you're pretty sure to hit the bounds rather quickly. Either:

  • change sigma manually ng.p.Array(init=np.array([0.5,0.5,0.5]),).set_mutation(sigma=0.25).set_bounds(0, 1)
  • set bounds within the constructor so that sigma is initialized automatically with a good value: ng.p.Array(lower=0, upper=1, shape=(3,)) (the default init value will be the middle so it's simpler to just provide the shape in this case)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants