← Back to Pull requests

[tmva][sofie] Order Session constructor shape params like `infer()` #24100

Merged
guitargeek merged 2 files (26 lines) on Nov 11, 2026 13:41 UTC
View on GitHub
guitargeek guitargeek commented on Nov 11, 2026 10:13 UTC
Author

The order came from iterating an unordered_map, so it depended on the standard library and broke TMVA_SOFIE_GNN_Application on some macs.

This fixes the current tutorial-machine_learning-TMVA_SOFIE_GNN_Application failures on mac26

Diff: 26 lines (+18 / -8) across 2 files Reviewer: pcanal Review duration: 208m
All Vouch review confidence checks passed
Residual risk 0.02 = Change Risk (0.24) × (1 − Review Confidence (0.91)). Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.24 · 26 lines diff across 2 files
0.24
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.90 · 5 substantive comment(s)
0.90
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 50%
91%
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
Diff Size diff_size
0.197
Real PR Conversation Timeline
8 items
silverweed silverweed commented on code on Nov 11, 2026 10:19 UTC
Code Review
tmva/sofie/src/RModel.cxx:1
@@ -686,7 +686,14 @@ void RModel::Initialize(const std::map<std::string, size_t> & inputParams, bool
    // if the batch size is provided it can be used to specify the full shape
    // Add the full specified tensors in fReadyInputTensors collection
    auto originalInputTensorInfos = fInputTensorInfos; // need to copy because we may delete elements

Since we're copying this anyway, can't we copy it into a std::map and have it ordered like that?

guitargeek guitargeek commented on code on Nov 11, 2026 10:33 UTC
Code Review
tmva/sofie/src/RModel.cxx:1
@@ -686,7 +686,14 @@ void RModel::Initialize(const std::map<std::string, size_t> & inputParams, bool
    // if the batch size is provided it can be used to specify the full shape
    // Add the full specified tensors in fReadyInputTensors collection
    auto originalInputTensorInfos = fInputTensorInfos; // need to copy because we may delete elements

Good question! I think std::map means alphabetic order, which won't be the correct order necessarily. When parsing the ONNX file, we just take over the original order of the input tensors in the file, which may or may not be alphabetic.

pcanal pcanal approved these changes on Nov 11, 2026 12:24 UTC
Approved Reviewer

Thanks.

guitargeek guitargeek commented on Nov 11, 2026 13:41 UTC
Author

/backport to 6.42

root-project-bot root-project-bot commented on Nov 11, 2026 13:43 UTC
Bot

Preparing to backport PR #24100 to branch 6.42 requested by guitargeek

root-project-bot root-project-bot commented on Nov 11, 2026 13:43 UTC
Bot

Something went wrong when assigning the PR or setting labels @guitargeek please see the logs

root-project-bot root-project-bot commented on Nov 11, 2026 13:43 UTC
Bot

This PR has been backported to branch 6.42: https://github.com/root-project/root/pull/24103

Reviewers
Assignees
guitargeek guitargeek
Labels
risk: low confidence: 91.2% 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: 24.2% (LOW) · Higher = larger blast radius
24.2%
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: 91.2% · Lower = rushed or shallow review
91.2%
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: 2.1% · Safe to merge
2.1%