-
Notifications
You must be signed in to change notification settings - Fork 1.4k
[tmva][pymva] Deprecate the PyKeras method
#20588
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
[tmva][pymva] Deprecate the PyKeras method
#20588
Conversation
|
I would wait to deprecate the PyKeras interface. Once we merge #15790, the work in refactoring is already done there, we can easily support Keras 3. |
Test Results 22 files 22 suites 3d 21h 35m 2s ⏱️ Results for commit 1853ede. ♻️ This comment has been updated with latest results. |
|
Let's give some more time to @lmoneta to fix PyMVA. |
c49354f to
1ab86c5
Compare
|
Reopened for now because I wanted to try out the suggestion by @silverweed to mark enum values as deprecated. |
The new Keras 3 API broke the existing TMVA `PyKeras` method. Re-implementing the method for Keras 3 turned out to be difficult, as it is not possible anymore to disable eager execution and have a decent speed in evaluating the model for single events. So large-scale refactoring would be necessary to implement `PyKeras` again with good performance (see also root-project#15790). Nowadays, we also have the RBatchGenerator to train Keras models directly with batches that are provided by ROOT. Therefore, the TMVA `PyKeras` method is not the only way anymore to train a Keras model with ROOT data without 3rd party libraries for the IO. That means it's not an essential feature anymore, and deprecating it will even make the situation clearer for the user, as there are not two different ways anymore to train Keras models on ROOT data.
Don't keep tutorials for deprecated functionality around, to make it explicit to the users that they should not use TMVA PyKeras anymore. We don't lose any test coverage when removing these tutorials, since `tmva-pymva` is globally disabled in the CI anyway, as Keras 3 is not supported by PyMVA.
1ab86c5 to
1853ede
Compare
The new Keras 3 API broke the existing TMVA
PyKerasmethod.Re-implementing the method for Keras 3 turned out to be difficult, as it is not possible anymore to disable eager execution and have a decent speed in evaluating the model for single events. So large-scale refactoring would be necessary to implement
PyKerasagain with good performance (see also #15790).Nowadays, we also have the RBatchGenerator to train Keras models directly with batches that are provided by ROOT. Therefore, the TMVA
PyKerasmethod is not the only way anymore to train a Keras model with ROOT data without 3rd party libraries for the IO. That means it's not an essential feature anymore, and deprecating it will even make the situation clearer for the user, as there are not two different ways anymore to train Keras models on ROOT data.Note that it doesn't help us in this case to use the deprecation macros, because
tmva-pymvais always disabled anyway. So we would not benefit from the automatic removal-reminder errors that one would get in the next development cycle.I also opened a separate PR that exercises the eventual removal in the next development cycle, also showing that after
PyKerasis gone, we can enabletmva-pymvaagain, as the other methods it provides work just fine (except for for corner cases like PyTorch on Linux ARM):PyKerasmethod #20577