Skip to content

[RF] Deprecate the legacy evaluation backend and BatchMode() command argument - #23268

Merged
guitargeek merged 1 commit into
root-project:masterfrom
guitargeek:deprecate-legacy-eval-backend
Sep 6, 2026
Merged

[RF] Deprecate the legacy evaluation backend and BatchMode() command argument#23268
guitargeek merged 1 commit into
root-project:masterfrom
guitargeek:deprecate-legacy-eval-backend

Conversation

@guitargeek

Copy link
Copy Markdown
Contributor

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.

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.
@guitargeek guitargeek self-assigned this Sep 5, 2026
@guitargeek guitargeek changed the title [RF] Deprecate the legacy evaluation backend and BatchMode() [RF] Deprecate the legacy evaluation backend and BatchMode() command argument Sep 5, 2026
@github-actions

github-actions Bot commented Sep 5, 2026

Copy link
Copy Markdown

Test Results

    23 files      23 suites   3d 18h 1m 28s ⏱️
 3 872 tests  3 871 ✅ 0 💤 1 ❌
79 728 runs  79 727 ✅ 0 💤 1 ❌

For more details on these failures, see this check.

Results for commit 90a8276.

♻️ This comment has been updated with latest results.

@guitargeek
guitargeek merged commit 177d13d into root-project:master Sep 6, 2026
58 of 61 checks passed
@guitargeek
guitargeek deleted the deprecate-legacy-eval-backend branch September 6, 2026 11:13
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.

2 participants