← Back to Pull requests

Remove SOFIE from TMVA, use temporary bundle #24371

Open
unknown opened this pull request with 304 lines diff across 3 files
View on GitHub
unknown unknown commented on Nov 26, 2026 15:28 UTC
Author

SOFIE is not part of ROOT anymore. These are the required changes to adapt. In the first commit, the SOFIE source code is copied verbatim to the builtins/sofie directory, then:

All occurrences of TMVA and ROOT in general are removed from SOFIE
SOFIE-generated code by default only contains standard C++ code. Optionally, the generated code can use a BLAS library already loaded in the process, or VDT functions if present at compile time.
The code-generation capability of SOFIE can be accessed via a C API.
~SOFIE is treated as other builtins. A new option for the ROOT build system builtin_sofie can be used to control it. It is OFF by default. It automatically is switched to ON if either roofit or dataframe are ON. When it is switched on, it builds SOFIE from the bundled sources via ExternalProject_Add~ No new ROOT build option is introduced, the bundled SOFIE is built only when needed (e.g. if roofit or dataframe are on).
ROOT code can use SOFIE capabilities by loading the shared library and looking for the C function pointer at runtime. In order to preserve the already available functionality of RooONNXFunc, a new internal-only function is introduced in RooFit to ease the access to SOFIE functionality
Nothing in ROOT needs SOFIE at build time
For previously existing tests the following strategies are adopted
SOFIE-only tests go with the bundled sources
RooONNXFunc tests stay as they are
~SOFIE + Clad tests are moved to a different subdirectory of the RooFit tests, to be decided what to do about these~ the functionality that used to be tested with SOFIE+Clad is now tested directly in RooONNXFunc, the Clad tests have thus been removed.
A few existing tutorials that used the TMVA SOFIE functionality and ran it within an RDataFrame computation graph are changed to now show a similar approach as RooONNXFunc. The C++ code for an ONNX model is generated in a Python script as a dependency for the tutorials. A C++ and Python tutorial show how to onboard the generated code in an RDataFrame computation graph. These are to be considered advanced tutorials, and in particular ROOT does not guarantee that these tutorials will work forever, only as long as the SOFIE functionality can be publicly accessed that way.
A few references to SOFIE are still left in TMVA docs, these should be updated to point to the external project once there is a stable release.

Diff: 304 lines (+228 / -76) across 3 files Reviewer: guitargeek Review duration: 5787m
All Vouch review confidence checks passed
Residual risk 0.21 = Change Risk (0.40) × (1 − Review Confidence (0.47)). Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.40 · 304 lines diff across 3 files
0.40
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.02 · 1 substantive comment(s)
0.02
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
46%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Shallow Review Depth shallow_review_depth
0.344
Diff Size diff_size
0.342
Real PR Conversation Timeline
1 comments
"Review active on #24371"
general weight: 0.35
Reviewers
Assignees
Unassigned
Labels
risk: low confidence: 46.7% reviewed
Vouch Risk Breakdown
AI-powered review risk analysis
Change Risk
Change Risk · Model 1 (XGBoost)
Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
Score: 40.1% (MEDIUM) · Higher = larger blast radius
40.1%
Review Confidence
Review Confidence · Models 2 & 3
Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
Score: 46.7% · Lower = rushed or shallow review
46.7%
Residual Risk
Residual Risk · Core Equation
Residual = Change × (1 − Confidence)
Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
Score: 21.4% · Safe to merge
21.4%