Remove SOFIE from TMVA, use temporary bundle #24371
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
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.02 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
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
guitargeek
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/sofiedirectory, then:All occurrences of
TMVAandROOTin general are removed from SOFIESOFIE-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_sofiecan 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 viaExternalProject_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 functionalityNothing 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.