[tmva][sofie] Guard old Keras parser against Keras-3#20791
Merged
guitargeek merged 1 commit intoroot-project:masterfrom Jan 6, 2026
Merged
[tmva][sofie] Guard old Keras parser against Keras-3#20791guitargeek merged 1 commit intoroot-project:masterfrom
guitargeek merged 1 commit intoroot-project:masterfrom
Conversation
e5d987e to
7c914b4
Compare
guitargeek
requested changes
Jan 4, 2026
Contributor
guitargeek
left a comment
There was a problem hiding this comment.
Thank you very much for the PR! This is a good temporary solution. Just a few comments:
- please remove the commit with the code formatting. It's not worth to format code that we plan to delete in #19692 anyway, so that's just bloating the history. You can ignore the clang-format CI errors this time.
- I think you don't need to explicitly
import kerasagain - Please drop the first commit, which comes from an unrelated development for which you have already opened a separate PR.
44c1176 to
60975ed
Compare
Test Results 18 files 18 suites 3d 3h 41m 48s ⏱️ For more details on these failures, see this check. Results for commit 60975ed. ♻️ This comment has been updated with latest results. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This Pull request
Adds a defensive runtime guard to the TMVA SOFIE Keras parser to prevent segmentation faults when used with Keras 3 (enabled by default in TensorFlow ≥ 2.16).
The current parser is implemented against the Keras 2 API. When Keras 3 objects are encountered, undefined behavior may occur, leading to runtime crashes. This PR does not add Keras 3 support; it only detects the unsupported configuration early and fails cleanly with a clear error message.
This provides a temporary safety measure while proper Keras 3 support is being developed.
Changes or fixes:
Checklist:
This PR fixes #20591