-
Notifications
You must be signed in to change notification settings - Fork 95
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
One-exchange neighborhood may raise ValueError
non-deterministically
#194
Comments
Thanks a lot for reporting this. Would you mind creating a pull request fixing this? What worries me a bit more, though, is that this is actually triggered - this should not happen at all as the neighborhood generation should only return valid configurations. Do you have a minimal example that reproduces this issue? |
Minimal exampleTry to run the following PCS with If all the calls to
If Note that if the calls to
|
Thanks a lot for the PR and the additional example. So apparently there is an issue in the neighborhood generation that leads to the creation of invalid configurations. If you are familiar with cython and can have a look in there this would be very much appreciated. |
Re-opening this as #195 only solves half of this issue. |
I am investigating the issue. It seems that
@mfeurer, should |
#197 modifies |
I can confirm that this issue still exists in I've created an easier repro example: repro = r"""
age_weight_ratio:log_ratio real [-10.0, 3.0] [0.0]
saturation_algorithm categorical {discount, fmb, inst_gen, lrs, otter, z3} [lrs]
inst_gen_with_resolution categorical {off, on} [off]
age_weight_ratio:log_ratio | saturation_algorithm != inst_gen || inst_gen_with_resolution == on
inst_gen_with_resolution | saturation_algorithm == inst_gen
""".splitlines()
from ConfigSpace.read_and_write.pcs_new import read
cs = read(repro)
default = cs.get_default_configuration()
print(default)
cs._check_configuration_rigorous(default) |
Description
ConfigSpace.util.get_one_exchange_neighbourhood
usesnp.random
to decide whether a new configuration is to be validated (see util.pyx:218). Usingnp.random
for this decision makes the behavior of the function non-deterministic.Solution proposal
Use the randomness generator
random
instantiated at util.pyx:130 instead ofnp.random
.The text was updated successfully, but these errors were encountered: