[RF] Deprecate the legacy evaluation backend and BatchMode() command argument - #23268
Merged
guitargeek merged 1 commit intoSep 6, 2026
Merged
Conversation
The legacy evaluation backend for likelihood and chi-square fits is
deprecated and will be removed in ROOT 6.44. It was superseded by the
vectorized "cpu" backend, which is the default since ROOT 6.32. After
the removal of the constant term optimization, the legacy backend also
has no performance-relevant feature left that would justify its
continued maintenance.
This commit:
* Marks RooFit::EvalBackend::Legacy() as R__DEPRECATED(6, 44, ...),
which also enforces the removal: the deprecation attribute turns
into a compilation error once the ROOT version passes 6.43.
* Emits a loud runtime warning from createNLL() and createChi2()
whenever the legacy backend is actually selected for a fit. This
also covers the EvalBackend("legacy") string form and PyROOT.
* Deprecates the RooFit::BatchMode() command argument at the same
time. Its C++ declarations had been unintentionally commented out
since ROOT 6.30 (in an unrelated commit), making it unusable from
both C++ and PyROOT. They are restored in this commit, marked as
R__DEPRECATED(6, 44, ...), to give downstream code a proper
migration window. The runtime warning now also announces the
removal in ROOT 6.44.
* Switches ROOT-internal uses of EvalBackend::Legacy() to the
non-deprecated enum spelling so that the ROOT build stays free of
deprecation warnings.
* Documents the deprecation in the fitTo() reference documentation
and in the ROOT 6.42 release notes, including everything that will
be removed together with the backend in 6.44 (the RooNLLVar,
RooChi2Var, RooAbsOptTestStatistic and RooAbsTestStatistic classes,
the RooRealMPFE-based multiprocessing together with the effect of
NumCPU(), and the nll::/chi2:: factory expressions).
* Adds unit tests checking that the deprecation warnings are emitted
for the legacy backend and for BatchMode(), that no warning is
emitted for the default backend, and that the restored BatchMode()
overloads map to the right evaluation backends.
Test Results 23 files 23 suites 3d 18h 1m 28s ⏱️ For more details on these failures, see this check. Results for commit 90a8276. ♻️ This comment has been updated with latest results. |
dpiparo
approved these changes
Sep 6, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The legacy evaluation backend for likelihood and chi-square fits is deprecated and will be removed in ROOT 6.44. It was superseded by the vectorized "cpu" backend, which is the default since ROOT 6.32. After the removal of the constant term optimization, the legacy backend also has no performance-relevant feature left that would justify its continued maintenance.
This commit:
Marks RooFit::EvalBackend::Legacy() as R__DEPRECATED(6, 44, ...), which also enforces the removal: the deprecation attribute turns into a compilation error once the ROOT version passes 6.43.
Emits a loud runtime warning from createNLL() and createChi2() whenever the legacy backend is actually selected for a fit. This also covers the EvalBackend("legacy") string form and PyROOT.
Deprecates the RooFit::BatchMode() command argument at the same time. Its C++ declarations had been unintentionally commented out since ROOT 6.30 (in an unrelated commit), making it unusable from both C++ and PyROOT. They are restored in this commit, marked as R__DEPRECATED(6, 44, ...), to give downstream code a proper migration window. The runtime warning now also announces the removal in ROOT 6.44.
Switches ROOT-internal uses of EvalBackend::Legacy() to the non-deprecated enum spelling so that the ROOT build stays free of deprecation warnings.
Documents the deprecation in the fitTo() reference documentation and in the ROOT 6.42 release notes, including everything that will be removed together with the backend in 6.44 (the RooNLLVar, RooChi2Var, RooAbsOptTestStatistic and RooAbsTestStatistic classes, the RooRealMPFE-based multiprocessing together with the effect of NumCPU(), and the nll::/chi2:: factory expressions).
Adds unit tests checking that the deprecation warnings are emitted for the legacy backend and for BatchMode(), that no warning is emitted for the default backend, and that the restored BatchMode() overloads map to the right evaluation backends.