[tmva][sofie] throw on invalid BatchNormalization input count#21773
Conversation
|
I'd also like to add a regression test for this(verifying Parse() throws std::runtime_error) but im not sure what's the best to add it. |
Test Results 22 files 22 suites 3d 5h 19m 29s ⏱️ Results for commit 6141a69. |
guitargeek
left a comment
There was a problem hiding this comment.
Thanks! I don't think we need a regression test here, as this doesn't fix a bug per se but is more a usability improvement 👍
Thanks for the review and merge! |
Changes:
ParseBatchNormalizationonly constructed the operator wheninput_size() == 5but had noelseclause, so nodes with fewer inputs silently returned a nullunique_ptrand crashed later inGenerate()with an unrelated error message.I've simply added an
else throwto reject invalid input counts immediately at parse time with a clear error message, consistent with other parsers in the codebase.Checklist:
This PR fixes #21759