Skip to content

Updated support for CMA-ES minimizer based on libcmaes - #7044

Closed
lmoneta wants to merge 102 commits into
root-project:masterfrom
lmoneta:beniz-cmaes_root
Closed

lmoneta wants to merge 102 commits into
root-project:masterfrom
lmoneta:beniz-cmaes_root

Conversation

@lmoneta

@lmoneta lmoneta commented Jan 14, 2021

Copy link
Copy Markdown
Member

This is an updated PR of #507 that is an update of #40.

As a reminder, this PR integrates a new minimizer in ROOT, CMA-ES see https://github.com/beniz/libcmaes/ .

It rebases the new commits from @beniz to the current master and fixes the Eigen configuration issue.

beniz and others added 30 commits January 14, 2021 11:00
…ce + added control of fixed variables and auto-maxiter stopping criteria
@phsft-bot

Copy link
Copy Markdown

Starting build on ROOT-debian10-i386/cxx14, ROOT-performance-centos8-multicore/default, ROOT-fedora30/cxx14, ROOT-fedora31/noimt, ROOT-ubuntu16/nortcxxmod, mac1014/python3, mac11.0/cxx17, windows10/cxx14
How to customize builds

@lmoneta
lmoneta requested review from omazapa and removed request for couet January 14, 2021 17:38
@phsft-bot

Copy link
Copy Markdown

Build failed on mac11.0/cxx17.
Running on macphsft20.dyndns.cern.ch:/Users/sftnight/build/workspace/root-pullrequests-build
See console output.

Failing tests:

@beniz

beniz commented Jan 14, 2021

Copy link
Copy Markdown

@lmoneta Hi, happy to see this moving forward! FYI libcmaes recently went under the same umbrella as the other CMA-ES reference implementations, https://github.com/CMA-ES/libcmaes. Don't hesitate to file issues if we can help with integration from the libcmaes side.

@phsft-bot

Copy link
Copy Markdown

Build failed on ROOT-performance-centos8-multicore/default.
Running on null:/data/sftnight/workspace/root-pullrequests-build
See console output.

Failing tests:

@omazapa

omazapa commented Jan 15, 2021

Copy link
Copy Markdown
Contributor

this is awesome @lmoneta and @beniz
I am so happy to see this code and glad to be a reviewer.

Let's see my comments in the files :D

@omazapa

omazapa commented Jan 15, 2021

Copy link
Copy Markdown
Contributor

I leave some comments about some small details in the code.

I am still running some tests and tutorials, which is taking some time.

@lmoneta

lmoneta commented Jan 15, 2021

Copy link
Copy Markdown
Member Author

@beniz, sorry for starting this after a long time, but I think it is good to have this library integrated in ROOT.
I see now cameos can early build with cmake and this will make it easier to also download and install the library automatically.
I will try to fix issues from the ROOT side myself, but feel free to comment and correct me

@guitargeek

Copy link
Copy Markdown
Contributor

Dear @beniz, dear @lmoneta,

I am closing this PR, and with it the CMA-ES integration effort that started with #40 in 2014 and continued in #507. First of all, thank you, @beniz, for the work and for the patience: you rebased and answered every request for years, and this PR never got the technical review it deserved. That is on us, not on the contribution.

The reason for closing is a change of direction rather than a problem with the code. ROOT no longer wants to integrate external minimizer libraries as plugins, each with its own build option, bundled dependencies and tutorials to maintain. We made the same decision for the SciPy minimizer in #12997 (comment). I want to rather go in the opposite direction: ROOT exposes its functions, likelihoods and gradients through plain callable interfaces, and users bring whichever optimizer library fits their problem. For this PR I observe:

  • A libcmaes build option with a builtin_cmaes path that downloads and compiles Eigen3 and libcmaes is a dependency we would carry forever, in CI and in every packaged distribution.
  • The changes to Factory.cxx and MinimizerOptions.cxx special-case the new minimizer inside mathcore, so it would not be an optional plugin in practice.
  • Seven new tutorials and four test executables would run in CI for a feature that, over twelve years, no user asked for on our tracker.

But I don't think this ROOT integration is needed. libcmaes already minimizes any std::function, and a ROOT::Math::IMultiGenFunction or a RooFit likelihood can be handed to it in a few lines. I would be glad to link to libcmaes itself (https://github.com/CMA-ES/libcmaes) from the ROOT and RooFit documentation, if it turns out to be useful for the users who also use ROOT.

Thanks again to both of you!

@guitargeek guitargeek closed this Oct 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants