I am developing a Python (3) package to manage inputs and booking of different MVA suites and methods etc.
I am seeing a problem with the TMVA stdout, namely it doesn’t get printed out to screen even if the proper options of the TMVA factory and method objects seem to be set correctly.
This is a bit unfortunate, as I don’t know of another way of getting important info such as variable ranking other than looking at the std out (if there are, please tell me!).
Here’s a link to my package, with instructions on how to install it locally (NB: requires Python3.6+ and ROOT v6.14.04) and try to run TMVA on two sample files, also included. Look at README.rst
One thing I can see that could possibly interfere is that you silence all logging up to warning. A lot of TMVA information is printed at the info level and could be suppressed by this.
Otherwise, the TMVA output should end up in the stdout output stream.
Another thing, I would love to hear about your experience with the tmva cross validation interface.
Glad you found a solution. That should not be neccessary. My suspicion is that there is some call somewhere that suppresses the output and the solution you present forces a re-enable.
On the different note: I think the calls can be removed. The PyInitialize should be called automatically when needed as a method from PyMVA is created. Likewise for the tools singleton object, it should also be created as needed.
Maybe @swunsch can give some more insight in the PyInitialize situation.
Up to now, the call TMVA.PyMethodBase.PyInitialize() is needed because the PyMVA library is loaded just on demand. If you don’t invoke this first, the PyMVA methods won’t be found by the factory, e.g., the PyKeras method is not “in the list of methods”.