[tmva][sofie] Implement ThresholdedRelu operator with parser and unit tests #24191
All Vouch review confidence checks passed
Residual risk 0.14 = Change Risk (0.36) × (1 − Review Confidence (0.60)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.36 · 208 lines diff across 2 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 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
Diff Size
diff_size
0.320
Shallow Review Depth
shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #24191"
general
weight: 0.35
guitargeek
### Description
This PR implements the ONNX
ThresholdedReluactivation operator in TMVA SOFIE, along with its parser ingestion and upstream unit tests.Supersedes and replaces closed PR #24054 (as requested by @guitargeek due to inability to reopen after branch force-push). All CI issues from #24054 (
clang-format,ruff, and the Linux GTest compilation issue) have been fully resolved:constexpr float op_<name>_alpha(matchingROperator_LeakyRelu), preventing theinvalid digit 'f' in decimal constantcompilation error under Clang/GCC on Linux..clang-format.ruff format.Changes Included:
1. Operator Definition:
- Added
ROperator_ThresholdedRelu.hxxintmva/sofie/inc/TMVA/supporting scalar fallback emission with branchless ternary formulation:2. Parser Integration:
- Added
ParseThresholdedRelu.cxxintmva/sofie_parsers/src/to parse ONNX protobuf nodes and extract thealphaattribute (defaulting to1.0).- Registered
ThresholdedReluinRModelParser_ONNX.cxxand added it totmva/sofie_parsers/CMakeLists.txt.3. Tests:
- Added
make_ThresholdedRelumodel generator ingenerate_input_models.py.- Added automated GTest
TEST(ONNX, ThresholdedRelu)inTestCustomModelsFromONNX.cxx.Validation:
clang-formatandruff format.