CMAES optimisers can silently make parameters be OOB
YonatanGideoni opened this issue · 1 comments
Bug description
CMAES, being currently implemented as an unconstrained optimiser, can sometimes give (and internally use) parameters that are out-of-bounds (OOB). No error or warning is raised so this fails silently.
To Reproduce
MWE shown in this .py
file: https://drive.google.com/file/d/1nc6D195WnUTvDr-K9Sn7gvzar_67sYsE/view?usp=sharing
Expected behavior
For the optimiser not to give OOB results and if there are such results then for a warning/error to be raised.
Environment
- OS: Windows 10
- Python Version: 3.8
c3-toolset
Version: latest
Additional context
There are two solutions that need to be implemented here:
- Following the example in https://github.com/CMA-ES/pycma/blob/master/notebooks/notebook-usecases-constraints.ipynb, make our CMAES implementation be constrained.
- Make this not be a silent failure - have it raise a warning/error. This should deal with such cases also in the future and with other such existing optimisers, if there are any.
It seems that the solution given in (1) in practice doesn't work all that well, nor does artificially making the function be in an infinite well such that infeasible solutions have a cost of