mlpack / ensmallen

A header-only C++ library for numerical optimization --
http://ensmallen.org
Other
740 stars 119 forks source link

Implementation of IPOP CMAES #373

Closed SuvarshaChennareddy closed 6 months ago

SuvarshaChennareddy commented 1 year ago

This pull request is an initial implementation of IPOP CMAES, which is part of my Google Summer of Code (GSoC) project. Tests have been added, but not all of them are passing.

SuvarshaChennareddy commented 1 year ago

@zoq What should we do about the tests? Keep fine tuning the hyperparameters?

zoq commented 1 year ago

@zoq What should we do about the tests? Keep fine tuning the hyperparameters?

I'm looking into it a little bit more, in the sense of, checking if this is not caused by a hidden bug.

SuvarshaChennareddy commented 1 year ago

@zoq Using the Rastrigin Function now for testing, should (hopefully) be more stable.

zoq commented 1 year ago

Looks good, let's remove the Schwefel function.

SuvarshaChennareddy commented 1 year ago

Looks good, let's remove the Schwefel function.

Yup, done👍. Fixed the style as well.

zoq commented 1 year ago

Looks like the newly added functions are unstable.

SuvarshaChennareddy commented 1 year ago

Looks like the newly added functions are unstable.

Weird...the tests seemed stable on my system.

zoq commented 1 year ago

Did you test it with different random seeds? ensmallen_tests "[IPOPCMAESTest]" -rng-seed 'time'

SuvarshaChennareddy commented 1 year ago

Did you test it with different random seeds? ensmallen_tests "[IPOPCMAESTest]" -rng-seed 'time'

Yes

zoq commented 1 year ago

@mlpack-jenkins test this please

SuvarshaChennareddy commented 1 year ago

@zoq I'm sorry, but I'm currently occupied with other responsibilities. However, I'll certainly revisit this when I have more availability.

SuvarshaChennareddy commented 11 months ago

@zoq I ran a batch script with the following: FOR /L %%i IN (1,1,100) DO ( ensmallen_tests.exe "[IPOPCMAESTest]" --durations yes --rng-seed "time" ) I got 6 fails (out of a 100 tests) However, this doesn't seem to be reflected in the ensmallen CPU test. I don't really know how else I could test this.

Edit: Never mind, I was testing with PR #375's implementation of IPOP-CMA-ES, which includes the 'saveState' feature.

SuvarshaChennareddy commented 11 months ago

Further modifications to the CMA-ES and Active-CMA-ES implementations will likely be necessary because the optimizer is unable to converge, possibly due to the diverging step size.

SuvarshaChennareddy commented 11 months ago

@mlpack-jenkins test this please

SuvarshaChennareddy commented 11 months ago

@mlpack-jenkins test this please

SuvarshaChennareddy commented 11 months ago

A test of Demon SGD keeps failing. I'm going to try once again. I hope I'm not being a bother 💀 .

SuvarshaChennareddy commented 11 months ago

@mlpack-jenkins test this please

SuvarshaChennareddy commented 11 months ago

@mlpack-jenkins test this please

SuvarshaChennareddy commented 11 months ago

@zoq @rcurtin (sorry for the mention) I'm not sure what to do. I fixed some more inconsistencies (hopefully all of them) I found in the CMA-ES implementations. However, there is one test of Demon SGD that keeps failing consistently (just this one test). I have run the CMA-ES tests locally and they seem to be stable on my machine (a LOT more stable than before, probably because most of the major inconsistencies, if not all, have been fixed). Unfortunately, I don't think I can do anything else. I'd like to hear your thoughts.

zoq commented 11 months ago

Happy to look into it.

mlpack-bot[bot] commented 10 months ago

This issue has been automatically marked as stale because it has not had any recent activity. It will be closed in 7 days if no further activity occurs. Thank you for your contributions! :+1:

mlpack-bot[bot] commented 9 months ago

This issue has been automatically marked as stale because it has not had any recent activity. It will be closed in 7 days if no further activity occurs. Thank you for your contributions! :+1:

coatless commented 9 months ago

@zoq did you have a moment to check on what @SuvarshaChennareddy mentioned?

zoq commented 9 months ago

@zoq did you have a moment to check on what @SuvarshaChennareddy mentioned?

yes, will check