Skip to content

Conversation

@guitargeek
Copy link
Contributor

@guitargeek guitargeek commented Jan 18, 2023

  • speed up RooProdPdf::getConstraints()
  • don't waste time trying to undo changes to computation graph in BatchMode
  • some typo and documentation fixes

More detail in the commit descriptions.

@guitargeek guitargeek self-assigned this Jan 18, 2023
@phsft-bot
Copy link

Starting build on ROOT-debian10-i386/soversion, ROOT-performance-centos8-multicore/cxx17, ROOT-ubuntu18.04/nortcxxmod, ROOT-ubuntu2004/python3, mac12/noimt, mac11/cxx14, windows10/cxx14
How to customize builds

@guitargeek guitargeek changed the title Devs roofit [RF] Some performance improvements to RooFit likelihood creation and BatchMode Jan 18, 2023
@phsft-bot
Copy link

In `RooProdPdf::getConstraints()`, there is a place where it checks if
the parameters of one component pdf are overlapping with the observables
or all parameters of the model. This can get expensive for models with a
huge number of parameters. For the ATLAS Higgs combination workspace I
have, it is a significant fraction of `createNLL()`, which takes 100 seconds
total.

We can greatly speed up this check by caching the ordered name pointers
of the parameters and observables collections. This makes the time spent
in `getConstraints()` negligible for now (5 out of the remaining 80 seconds in
`createNLL` for the ATLAS Higgs combination).

It was important to optimize this part, because the exact same code is
also used in the BatchMode, for which I aim to make `createNLL` much
faster than 80 seconds in total.
@phsft-bot
Copy link

@phsft-bot
Copy link

Starting build on ROOT-debian10-i386/soversion, ROOT-performance-centos8-multicore/cxx17, ROOT-ubuntu18.04/nortcxxmod, ROOT-ubuntu2004/python3, mac12/noimt, mac11/cxx14, windows10/cxx14
How to customize builds

@phsft-bot
Copy link

Build failed on ROOT-performance-centos8-multicore/cxx17.
Running on olbdw-01.cern.ch:/data/sftnight/workspace/root-pullrequests-build
See console output.

Errors:

  • [2023-01-18T11:45:06.861Z] CMake Error at /usr/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:230 (message):
  • [2023-01-18T11:45:07.117Z] CMake Error at /data/sftnight/workspace/root-pullrequests-build/rootspi/jenkins/root-build.cmake:1210 (message):

@phsft-bot
Copy link

Build failed on ROOT-ubuntu2004/python3.
Running on root-ubuntu-2004-1.cern.ch:/home/sftnight/build/workspace/root-pullrequests-build
See console output.

Failing tests:

@phsft-bot
Copy link

Build failed on ROOT-debian10-i386/soversion.
Running on pcepsft11.dyndns.cern.ch:/home/sftnight/build/workspace/root-pullrequests-build
See console output.

Failing tests:

Copy link
Member

@lmoneta lmoneta left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!
Thanks Jonas for the nice improvements when fitting the ATLAS Higgs examples

It's to expensive to do for large graphs, too complicated to implement,
an not necessary anymore because also in BatchMode the full computation
graph is cloned.

This also means that the `RooAbsReal` that is evaluated in
`RooAbsReal::getValues()` also needs to be cloned, but this is okay
because the interface is so far only used in unit tests and not
performance critical. It was actually necessary to do the cloning there
to begin with, since the BatchMode was not correctly reverting all
modifications to the computation graph anyway.
@phsft-bot
Copy link

Starting build on ROOT-debian10-i386/soversion, ROOT-performance-centos8-multicore/cxx17, ROOT-ubuntu18.04/nortcxxmod, ROOT-ubuntu2004/python3, mac12/noimt, mac11/cxx14, windows10/cxx14
How to customize builds

@phsft-bot
Copy link

Build failed on ROOT-performance-centos8-multicore/cxx17.
Running on olbdw-01.cern.ch:/data/sftnight/workspace/root-pullrequests-build
See console output.

Errors:

  • [2023-01-18T15:00:59.913Z] CMake Error at /usr/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:230 (message):
  • [2023-01-18T15:01:00.169Z] CMake Error at /data/sftnight/workspace/root-pullrequests-build/rootspi/jenkins/root-build.cmake:1210 (message):

@guitargeek guitargeek merged commit aeb5eee into root-project:master Jan 18, 2023
@guitargeek guitargeek deleted the devs_roofit branch January 18, 2023 18:05
@phsft-bot
Copy link

Build failed on ROOT-debian10-i386/soversion.
Running on pcepsft11.dyndns.cern.ch:/home/sftnight/build/workspace/root-pullrequests-build
See console output.

Failing tests:

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.

3 participants