[tmva][sofie] Fix TMVA_SOFIE_ONNX tensor name for current PyTorch#21546
[tmva][sofie] Fix TMVA_SOFIE_ONNX tensor name for current PyTorch#21546Neeraj-x0 wants to merge 1 commit intoroot-project:masterfrom
Conversation
There was a problem hiding this comment.
Pull request overview
This PR updates the TMVA SOFIE ONNX tutorial and its companion test artifact to align with tensor naming produced by current PyTorch/ONNX exports (e.g., 0.weight → 0weight after SOFIE name cleaning), fixing a runtime crash when querying tensor shapes/types.
Changes:
- Updated the tutorial macro to query
0weightinstead of the obsolete16weight. - Updated tutorial print statements to match the new tensor name.
- Regenerated
tmva/sofie/test/input_models/Linear_16.onnxusing a current PyTorch export.
Reviewed changes
Copilot reviewed 1 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| tutorials/machine_learning/TMVA_SOFIE_ONNX.C | Updates the hardcoded tensor queried by the tutorial to match current PyTorch naming. |
| tmva/sofie/test/input_models/Linear_16.onnx | Updates the test ONNX model artifact to match current PyTorch export output. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
36bd605 to
62f73f0
Compare
sanjibansg
left a comment
There was a problem hiding this comment.
LGTM!
Thanks, I would wait for the CI Jobs verification before we could merge this.
Test Results 20 files 20 suites 2d 22h 28m 7s ⏱️ For more details on these failures, see this check. Results for commit f05a1c1. ♻️ This comment has been updated with latest results. |
Working on it — the fix requires regenerating |
The tutorial hardcoded tensor name '16weight' which was generated by
an older PyTorch version. Current PyTorch Sequential modules produce
tensors named '0weight', '2weight', '4weight' (dot stripped by SOFIE).
Updated TMVA_SOFIE_ONNX.C to use '0weight' and regenerated Linear_16.onnx
using current PyTorch to keep tutorial and test model in sync.
Fixes: tutorial crash with runtime_error on GetTensorShape('16weight')
62f73f0 to
f05a1c1
Compare
|
In that case the CI should pass with a clean build. I have triggered one, and also rebased your commits on top of ROOT master. Will merge once the CI passes. |
guitargeek
left a comment
There was a problem hiding this comment.
Tests still fail even when doing a clean rebuild of everything in the CI. @Neeraj-x0, can you please take a look?
The tutorial hardcoded tensor name '16weight' which was generated by an older
PyTorch version. Current PyTorch Sequential modules produce tensors named
'0weight', '2weight', '4weight' (dot stripped by SOFIE).
Updated TMVA_SOFIE_ONNX.C to use '0weight' and regenerated Linear_16.onnx
using current PyTorch to keep tutorial and test model in sync.
Fixes: tutorial crash with runtime_error on GetTensorShape('16weight')
This Pull request:
Changes or fixes:
16weightwith0weightin TMVA_SOFIE_ONNX.CChecklist:
This PR fixes #21545