Skip to content

MVA inference (TMVA, PyTorch, Tensorflow)

Pieter David requested to merge piedavid/bamboo:mvaevaluators into master

Fixes #13 (closed)

Picking up the correct libraries (when building and at runtime) is actually the hardest part... libtorch can be picked up from the 'torch' package through pkg_resources, so I'm relying on that for now. For Tensorflow there is a "Tensorflow-C" library for inference, I added an install script to put it in the VIRTUAL_ENV (if the libraries are in the LD_LIBRARY_PATH it should also work).

For every ML framework there is an "evaluator" class that assumes (list of float) -> (list of float) classifiers (other formats could be added quite easily), in a shared library (such that they can individually be loaded if available) that is linked to the so of the ML framework (but no dependency in the header, if that can be avoided).

To do still:

  • update documentation (install&setup as well as usage)
  • tests
  • automatic (?) loading of "bridge" libraries with evaluator classes
  • [ ] ONNX runtime (example here) for a followup PR
  • TMVA
  • LWTNN (?)
  • libtorch detection in LCG_96b LCG_97 version works (see also #48 (closed))

Feedback welcome :-)

Edited by Pieter David

Merge request reports