root
root copied to clipboard
[TMVA] Pythonizations for TMVA
This Pull request:
- TMVA Pythonizations
- Translations of TMVA tutorial files into Python.
Changes or fixes:
Checklist:
- [ ] tested changes locally
- [ ] updated the docs (if necessary)
This PR fixes #
Can one of the admins verify this patch?
This pull request introduces 15 alerts when merging 747d015e2cd62c8c684f592a7007830c0bc37f3e into 5c8008d6ee1822e14a3c46cd9c4c413c53632518 - view on LGTM.com
new alerts:
- 6 for Unreachable code
- 4 for Module is imported with 'import' and 'import from'
- 2 for Except block handles 'BaseException'
- 1 for Unused import
- 1 for Variable defined multiple times
- 1 for `__init__` method returns a value
Hi @Harshalzzzzzzz , I have a couple of quick general comments:
- If you are creating a dedicated subdirectory for TMVA pythonizations, the TMVA pythonization files that are now in the general
_pythonization
directory should be moved to the_tmva
subdirectory (i.e._rbdt.py
,_rtensor.py
and_tree_inference.py
). - You need to make sure the pythonizations are actually picked up and registered at
import ROOT
time (since those pythonizations are not in the general_pythonization
directory, they won't be picked). See how_roofit
handles a similar case. - For every new pythonization you add, please add a new unit test file. Please see the
test
directory inpyroot/pythonizations
. There are some conventions on the name of the file to be followed (class_pythonization-name.py, see examples). If you also create a tmva subdirectory for your tests there, like it's done for roofit, please move the current tmva pythonization test files that are in the general directory to your subdirectory.
@etejedor Hello sir, Thank you for the inputs, I will make these changes and update the PR
This pull request introduces 15 alerts when merging 3a2764414790413866dfe79dbe92d86763e6583b into 08ab7e03061e551647d707637957252d121f9c39 - view on LGTM.com
new alerts:
- 6 for Unreachable code
- 4 for Module is imported with 'import' and 'import from'
- 2 for Except block handles 'BaseException'
- 1 for Unused import
- 1 for Variable defined multiple times
- 1 for `__init__` method returns a value
@phsft-bot build just on ROOT-ubuntu2204/default with flags -Dtmva-sofie=On -DCTEST_TEST_EXCLUDE_NONE=On
Starting build on ROOT-ubuntu2204
/default
with flags -Dtmva-sofie=On -DCTEST_TEST_EXCLUDE_NONE=On
How to customize builds
Build failed on ROOT-ubuntu2204/default. Running on root-ubuntu-2204-1.cern.ch:/home/sftnight/build/workspace/root-pullrequests-build See console output.
Warnings:
- [2022-08-05T07:13:15.169Z] /usr/include/python3.10/numpy/__multiarray_api.h:1464:1: warning: ‘int _import_array()’ defined but not used [-Wunused-function]
- [2022-08-05T07:13:15.169Z] /usr/include/python3.10/numpy/__multiarray_api.h:1464:1: warning: ‘int _import_array()’ defined but not used [-Wunused-function]
- [2022-08-05T07:13:20.429Z] /usr/include/python3.10/numpy/__multiarray_api.h:1464:1: warning: ‘int _import_array()’ defined but not used [-Wunused-function]
- [2022-08-05T07:13:21.980Z] /usr/include/python3.10/numpy/__multiarray_api.h:1464:1: warning: ‘int _import_array()’ defined but not used [-Wunused-function]
Failing tests:
- projectroot.runtutorials.tutorial_tmva_pytorch_RegressionPyTorch_py
- projectroot.runtutorials.tutorial_tmva_TMVA_SOFIE_RDataFrame
- projectroot.runtutorials.tutorial_tmva_TMVA_RNN_Classification_py
- projectroot.runtutorials.tutorial_tmva_keras_ApplicationClassificationKeras_py
- projectroot.runtutorials.tutorial_tmva_keras_ApplicationRegressionKeras_py
- projectroot.runtutorials.tutorial_tmva_keras_GenerateModel_py
- projectroot.runtutorials.tutorial_tmva_pytorch_ApplicationRegressionPyTorch_py
- projectroot.runtutorials.tutorial_tmva_tmva003_RReader_py
- projectroot.runtutorials.tutorial_tmva_TMVA_Higgs_Classification_py
- projectroot.runtutorials.tutorial_tmva_TMVA_CNN_Classification_py
And 10 more
@phsft-bot build just on ROOT-ubuntu2204/default with flags -Dtmva-sofie=On -DCTEST_TEST_EXCLUDE_NONE=On
Starting build on ROOT-ubuntu2204
/default
with flags -Dtmva-sofie=On -DCTEST_TEST_EXCLUDE_NONE=On
How to customize builds
This pull request introduces 14 alerts when merging 02cbe17804bc5368787cce2020d83e389ec16cee into f25e7e517418833f6ca45f24247c9461584d5d8b - view on LGTM.com
new alerts:
- 6 for Unreachable code
- 4 for Module is imported with 'import' and 'import from'
- 1 for Except block handles 'BaseException'
- 1 for Unused import
- 1 for Variable defined multiple times
- 1 for `__init__` method returns a value
Build failed on ROOT-ubuntu2204/default. Running on root-ubuntu-2204-1.cern.ch:/home/sftnight/build/workspace/root-pullrequests-build See console output.
Warnings:
- [2022-08-05T13:09:40.822Z] /usr/include/python3.10/numpy/__multiarray_api.h:1464:1: warning: ‘int _import_array()’ defined but not used [-Wunused-function]
- [2022-08-05T13:09:45.527Z] /usr/include/python3.10/numpy/__multiarray_api.h:1464:1: warning: ‘int _import_array()’ defined but not used [-Wunused-function]
- [2022-08-05T13:09:49.970Z] /usr/include/python3.10/numpy/__multiarray_api.h:1464:1: warning: ‘int _import_array()’ defined but not used [-Wunused-function]
- [2022-08-05T13:10:00.901Z] /usr/include/python3.10/numpy/__multiarray_api.h:1464:1: warning: ‘int _import_array()’ defined but not used [-Wunused-function]
Failing tests:
- projectroot.runtutorials.tutorial_tmva_TMVA_SOFIE_RDataFrame
- projectroot.runtutorials.tutorial_tmva_TMVARegressionApplication
- projectroot.runtutorials.tutorial_tmva_tmva003_RReader_py
- projectroot.runtutorials.tutorial_tmva_TMVA_RNN_Classification_py
- projectroot.runtutorials.tutorial_tmva_keras_RegressionKeras_py
- projectroot.bindings.pyroot.pythonizations.test.pyunittests_pyroot_pyz_rtensor
- projectroot.roottest.root.collection.roottest_root_collection_runDeleteWarning
- projectroot.roottest.root.io.uniquePointer.roottest_root_io_uniquePointer_simpleWriteRead
- projectroot.roottest.root.io.uniquePointer.roottest_root_io_uniquePointer_simpleRead
- projectroot.roottest.root.io.uniquePointer.roottest_root_io_uniquePointer_aclicDataMemberSelection
And 2 more
@phsft-bot build just on ROOT-ubuntu2204/default with flags -Dtmva-sofie=On -DCTEST_TEST_EXCLUDE_NONE=On
Starting build on ROOT-ubuntu2204
/default
with flags -Dtmva-sofie=On -DCTEST_TEST_EXCLUDE_NONE=On
How to customize builds
Build failed on ROOT-ubuntu2204/default. Running on root-ubuntu-2204-1.cern.ch:/home/sftnight/build/workspace/root-pullrequests-build See console output.
Warnings:
- [2022-08-10T12:54:11.200Z] /usr/include/python3.10/numpy/__multiarray_api.h:1464:1: warning: ‘int _import_array()’ defined but not used [-Wunused-function]
- [2022-08-10T12:54:11.200Z] /usr/include/python3.10/numpy/__multiarray_api.h:1464:1: warning: ‘int _import_array()’ defined but not used [-Wunused-function]
- [2022-08-10T12:54:21.065Z] /usr/include/python3.10/numpy/__multiarray_api.h:1464:1: warning: ‘int _import_array()’ defined but not used [-Wunused-function]
- [2022-08-10T12:54:22.412Z] /usr/include/python3.10/numpy/__multiarray_api.h:1464:1: warning: ‘int _import_array()’ defined but not used [-Wunused-function]
Failing tests:
- projectroot.roottest.root.io.uniquePointer.roottest_root_io_uniquePointer_simpleWriteRead
- projectroot.bindings.pyroot.pythonizations.test.pyunittests_pyroot_pyz_rtensor
- projectroot.runtutorials.tutorial_tmva_TMVA_SOFIE_RDataFrame
- projectroot.runtutorials.tutorial_tmva_TMVARegressionApplication
- projectroot.runtutorials.tutorial_tmva_tmva003_RReader_py
- projectroot.runtutorials.tutorial_tmva_TMVA_RNN_Classification_py
- projectroot.roottest.root.collection.roottest_root_collection_runDeleteWarning
- projectroot.roottest.root.io.uniquePointer.roottest_root_io_uniquePointer_simpleRead
- projectroot.roottest.root.io.uniquePointer.roottest_root_io_uniquePointer_aclicDataMemberSelection
- projectroot.roottest.root.meta.ROOT-7462.roottest_root_meta_ROOT_7462_make
And 2 more
This pull request introduces 16 alerts when merging 62c6fcbeb653e36437b5f2507ada79d0d94f4496 into bec44f8149721c6cad69886f10d1076c5f5072c7 - view on LGTM.com
new alerts:
- 6 for Unreachable code
- 3 for 'import *' may pollute namespace
- 3 for Module is imported with 'import' and 'import from'
- 1 for Except block handles 'BaseException'
- 1 for Unused import
- 1 for Variable defined multiple times
- 1 for `__init__` method returns a value
@phsft-bot build just on ROOT-ubuntu2204/default with flags -Dtmva-sofie=On -DCTEST_TEST_EXCLUDE_NONE=On
Starting build on ROOT-ubuntu2204
/default
with flags -Dtmva-sofie=On -DCTEST_TEST_EXCLUDE_NONE=On
How to customize builds
Build failed on ROOT-ubuntu2204/default. Running on root-ubuntu-2204-1.cern.ch:/home/sftnight/build/workspace/root-pullrequests-build See console output.
Warnings:
- [2022-08-17T12:50:03.456Z] /usr/include/python3.10/numpy/__multiarray_api.h:1464:1: warning: ‘int _import_array()’ defined but not used [-Wunused-function]
- [2022-08-17T12:50:04.243Z] /usr/include/python3.10/numpy/__multiarray_api.h:1464:1: warning: ‘int _import_array()’ defined but not used [-Wunused-function]
- [2022-08-17T12:50:09.937Z] /usr/include/python3.10/numpy/__multiarray_api.h:1464:1: warning: ‘int _import_array()’ defined but not used [-Wunused-function]
- [2022-08-17T12:50:11.751Z] /usr/include/python3.10/numpy/__multiarray_api.h:1464:1: warning: ‘int _import_array()’ defined but not used [-Wunused-function]
Failing tests:
- projectroot.roottest.root.io.uniquePointer.roottest_root_io_uniquePointer_simpleWriteRead
- projectroot.runtutorials.tutorial_tmva_TMVA_RNN_Classification_py
- projectroot.roottest.root.collection.roottest_root_collection_runDeleteWarning
- projectroot.roottest.root.io.uniquePointer.roottest_root_io_uniquePointer_simpleRead
- projectroot.roottest.root.io.uniquePointer.roottest_root_io_uniquePointer_aclicDataMemberSelection
- projectroot.roottest.root.meta.ROOT-7462.roottest_root_meta_ROOT_7462_make
- projectroot.roottest.root.meta.MakeProject.roottest_root_meta_MakeProject_runaliceesd
This pull request introduces 6 alerts when merging e293793256377a8a6ba591fa6d1f21c0ee139bed into 0b49293d4d67dfecfe58e710616094b30a90130f - view on LGTM.com
new alerts:
- 5 for Unreachable code
- 1 for `__init__` method returns a value
@phsft-bot build just on ROOT-ubuntu2204/default with flags -Dtmva-sofie=On -DCTEST_TEST_EXCLUDE_NONE=On
Starting build on ROOT-ubuntu2204
/default
with flags -Dtmva-sofie=On -DCTEST_TEST_EXCLUDE_NONE=On
How to customize builds
@phsft-bot build just on ROOT-ubuntu2204/default with flags -Dtmva-sofie=On -DCTEST_TEST_EXCLUDE_NONE=On
Starting build on ROOT-ubuntu2204
/default
with flags -Dtmva-sofie=On -DCTEST_TEST_EXCLUDE_NONE=On
How to customize builds
Build failed on ROOT-ubuntu2204/default. Running on root-ubuntu-2204-1.cern.ch:/home/sftnight/build/workspace/root-pullrequests-build See console output.
Warnings:
- [2022-08-26T11:19:33.874Z] /home/sftnight/build/workspace/root-pullrequests-build/root/core/metacling/src/TClingCallFunc.cxx:1539:20: warning: ‘this’ pointer is null [-Wnonnull]
- [2022-08-26T11:25:16.550Z] /usr/include/python3.10/numpy/__multiarray_api.h:1464:1: warning: ‘int _import_array()’ defined but not used [-Wunused-function]
- [2022-08-26T11:25:20.122Z] /usr/include/python3.10/numpy/__multiarray_api.h:1464:1: warning: ‘int _import_array()’ defined but not used [-Wunused-function]
- [2022-08-26T11:25:23.957Z] /usr/include/python3.10/numpy/__multiarray_api.h:1464:1: warning: ‘int _import_array()’ defined but not used [-Wunused-function]
- [2022-08-26T11:25:28.521Z] /usr/include/python3.10/numpy/__multiarray_api.h:1464:1: warning: ‘int _import_array()’ defined but not used [-Wunused-function]
This pull request introduces 5 alerts when merging 4970a8c6877029388a16e13745c4f2cd315555a2 into 0b49293d4d67dfecfe58e710616094b30a90130f - view on LGTM.com
new alerts:
- 5 for Unreachable code
@phsft-bot build just on ROOT-ubuntu2204/default with flags -Dtmva-sofie=On -DCTEST_TEST_EXCLUDE_NONE=On
Starting build on ROOT-ubuntu2204
/default
with flags -Dtmva-sofie=On -DCTEST_TEST_EXCLUDE_NONE=On
How to customize builds
Build failed on ROOT-ubuntu2204/default. Running on root-ubuntu-2204-2.cern.ch:/home/sftnight/build/workspace/root-pullrequests-build See console output.