root icon indicating copy to clipboard operation
root copied to clipboard

[TMVA] Pythonizations for TMVA

Open harshal0815 opened this issue 2 years ago • 15 comments

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 #

harshal0815 avatar Jul 28 '22 14:07 harshal0815

Can one of the admins verify this patch?

phsft-bot avatar Jul 28 '22 14:07 phsft-bot

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

lgtm-com[bot] avatar Jul 28 '22 15:07 lgtm-com[bot]

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 in pyroot/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 avatar Jul 28 '22 15:07 etejedor

@etejedor Hello sir, Thank you for the inputs, I will make these changes and update the PR

harshal0815 avatar Jul 28 '22 15:07 harshal0815

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

lgtm-com[bot] avatar Aug 05 '22 06:08 lgtm-com[bot]

@phsft-bot build just on ROOT-ubuntu2204/default with flags -Dtmva-sofie=On -DCTEST_TEST_EXCLUDE_NONE=On

lmoneta avatar Aug 05 '22 07:08 lmoneta

Starting build on ROOT-ubuntu2204/default with flags -Dtmva-sofie=On -DCTEST_TEST_EXCLUDE_NONE=On How to customize builds

phsft-bot avatar Aug 05 '22 07:08 phsft-bot

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:

And 10 more

phsft-bot avatar Aug 05 '22 07:08 phsft-bot

@phsft-bot build just on ROOT-ubuntu2204/default with flags -Dtmva-sofie=On -DCTEST_TEST_EXCLUDE_NONE=On

lmoneta avatar Aug 05 '22 13:08 lmoneta

Starting build on ROOT-ubuntu2204/default with flags -Dtmva-sofie=On -DCTEST_TEST_EXCLUDE_NONE=On How to customize builds

phsft-bot avatar Aug 05 '22 13:08 phsft-bot

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

lgtm-com[bot] avatar Aug 05 '22 13:08 lgtm-com[bot]

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:

And 2 more

phsft-bot avatar Aug 05 '22 13:08 phsft-bot

@phsft-bot build just on ROOT-ubuntu2204/default with flags -Dtmva-sofie=On -DCTEST_TEST_EXCLUDE_NONE=On

lmoneta avatar Aug 10 '22 12:08 lmoneta

Starting build on ROOT-ubuntu2204/default with flags -Dtmva-sofie=On -DCTEST_TEST_EXCLUDE_NONE=On How to customize builds

phsft-bot avatar Aug 10 '22 12:08 phsft-bot

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:

And 2 more

phsft-bot avatar Aug 10 '22 13:08 phsft-bot

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

lgtm-com[bot] avatar Aug 17 '22 12:08 lgtm-com[bot]

@phsft-bot build just on ROOT-ubuntu2204/default with flags -Dtmva-sofie=On -DCTEST_TEST_EXCLUDE_NONE=On

lmoneta avatar Aug 17 '22 12:08 lmoneta

Starting build on ROOT-ubuntu2204/default with flags -Dtmva-sofie=On -DCTEST_TEST_EXCLUDE_NONE=On How to customize builds

phsft-bot avatar Aug 17 '22 12:08 phsft-bot

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:

phsft-bot avatar Aug 17 '22 13:08 phsft-bot

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

lgtm-com[bot] avatar Aug 26 '22 10:08 lgtm-com[bot]

@phsft-bot build just on ROOT-ubuntu2204/default with flags -Dtmva-sofie=On -DCTEST_TEST_EXCLUDE_NONE=On

lmoneta avatar Aug 26 '22 11:08 lmoneta

Starting build on ROOT-ubuntu2204/default with flags -Dtmva-sofie=On -DCTEST_TEST_EXCLUDE_NONE=On How to customize builds

phsft-bot avatar Aug 26 '22 11:08 phsft-bot

@phsft-bot build just on ROOT-ubuntu2204/default with flags -Dtmva-sofie=On -DCTEST_TEST_EXCLUDE_NONE=On

lmoneta avatar Aug 26 '22 11:08 lmoneta

Starting build on ROOT-ubuntu2204/default with flags -Dtmva-sofie=On -DCTEST_TEST_EXCLUDE_NONE=On How to customize builds

phsft-bot avatar Aug 26 '22 11:08 phsft-bot

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]

phsft-bot avatar Aug 26 '22 11:08 phsft-bot

This pull request introduces 5 alerts when merging 4970a8c6877029388a16e13745c4f2cd315555a2 into 0b49293d4d67dfecfe58e710616094b30a90130f - view on LGTM.com

new alerts:

  • 5 for Unreachable code

lgtm-com[bot] avatar Aug 26 '22 14:08 lgtm-com[bot]

@phsft-bot build just on ROOT-ubuntu2204/default with flags -Dtmva-sofie=On -DCTEST_TEST_EXCLUDE_NONE=On

lmoneta avatar Sep 07 '22 10:09 lmoneta

Starting build on ROOT-ubuntu2204/default with flags -Dtmva-sofie=On -DCTEST_TEST_EXCLUDE_NONE=On How to customize builds

phsft-bot avatar Sep 07 '22 10:09 phsft-bot

Build failed on ROOT-ubuntu2204/default. Running on root-ubuntu-2204-2.cern.ch:/home/sftnight/build/workspace/root-pullrequests-build See console output.

phsft-bot avatar Sep 07 '22 10:09 phsft-bot