-
Notifications
You must be signed in to change notification settings - Fork 356
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
Invalid state for DE unless num_ask - num_tell <= popsize #1461
Comments
When the user creates an optimizer object and specifies |
Perhaps this could be mentioned in the docs as a promise rather than as typical usage. #263 is an example where a user other than myself thought they could ignore impossible-to-evaluate points without a The answer to #1028 had given me the impression that it's not absolutely crucial to set popsize larger than |
It seems like it would be good to add some more error checking for these cases. |
This might be a safe way to do it. I don't know if this invariant matters for other optimizers. |
Calling
ask
more thanpopsize
times will result in an invalid state for DE. In particular it will cause the _uid_queue to wrap around, and produce two asked points with the same parent which adds the uid twice to _uid_queue on calls totell
. Then a tell-not-ask with better loss has the potential to kick the parent from the population, but leave its uid in the _uid_queue, resulting in a KeyError on one of the subsequent calls toask
.If this is for performance reasons, the documentation could stress that calling
ask
no more thanpopsize
times should be manually enforced as it can break some optimizers.The text was updated successfully, but these errors were encountered: