Pytorch and TMVA: Failed to get predictions

when l run the following URL on Tutorial: TMVA PyTorch Interface | GSoC , the following error occurs when l run the line of code All, please do you know what causes this? thank you very much!


runtime_error Traceback (most recent call last)
in
----> 1 factory.TrainAllMethods()

runtime_error: void TMVA::factory::TrainAllMethods() =>
runtime_error: FATAL error

Factory : Dataset[dataset] : Variable transform ‘FLAnalysisType=Classification’ unknown.Train all methods
Factory : Train method: Fisher for Classification
:
: Preparing the Decorrelation transformation…
: Preparing the Gaussian transformation…
TFHandler_Fisher : Variable Mean RMS [ Min Max ]
: -----------------------------------------------------------
: var1: 0.0089276 1.0040 [ -3.1195 5.7307 ]
: var2: 0.0079596 0.99992 [ -3.1195 5.7307 ]
: var3: 0.0079663 1.0001 [ -3.1195 5.7307 ]
: var4: 0.0074148 0.99773 [ -3.1195 5.7307 ]
: -----------------------------------------------------------
Fisher : Results for Fisher coefficients:
: NOTE: The coefficients must be applied to TRANFORMED variables
: List of the transformation:
: – Deco
: – Gauss
: -----------------------
: Variable: Coefficient:
: -----------------------
: var1: -0.220
: var2: -0.054
: var3: +0.034
: var4: +0.473
: (offset): -0.001
: -----------------------
: Elapsed time for training with 8000 events: 0.0264 sec
Fisher : [dataset] : Evaluation of Fisher on training sample (8000 events)
: Elapsed time for evaluation of 8000 events: 0.0135 sec
: Creating xml weight file: dataset/weights/TMVAClassification_Fisher.weights.xml
: Creating standalone class: dataset/weights/TMVAClassification_Fisher.class.C
Factory : Training finished
:
Factory : Train method: PyTorch for Classification
:
:
: ================================================================
: H e l p f o r M V A m e t h o d [ PyTorch ] :
:
: PyTorch is a scientific computing package supporting
: automatic differentiation. This method wraps the training
: and predictions steps of the PyTorch Python package for
: TMVA, so that dataloading, preprocessing and evaluation
: can be done within the TMVA system. To use this PyTorch
: interface, you need to generatea model with PyTorch first.
: Then, this model can be loaded and trained in TMVA.
:
:
: <Suppress this message by specifying “!H” in the booking option>
: ================================================================
:
: Preparing the Decorrelation transformation…
: Preparing the Gaussian transformation…
TFHandler_PyTorch : Variable Mean RMS [ Min Max ]
: -----------------------------------------------------------
: var1: 0.0089276 1.0040 [ -3.1195 5.7307 ]
: var2: 0.0079596 0.99992 [ -3.1195 5.7307 ]
: var3: 0.0079663 1.0001 [ -3.1195 5.7307 ]
: var4: 0.0074148 0.99773 [ -3.1195 5.7307 ]
: -----------------------------------------------------------
TFHandler_PyTorch : Variable Mean RMS [ Min Max ]
: -----------------------------------------------------------
: var1: 0.0089276 1.0040 [ -3.1195 5.7307 ]
: var2: 0.0079596 0.99992 [ -3.1195 5.7307 ]
: var3: 0.0079663 1.0001 [ -3.1195 5.7307 ]
: var4: 0.0074148 0.99773 [ -3.1195 5.7307 ]
: -----------------------------------------------------------
: Split TMVA training data in 6400 training events and 1600 validation events
: Print Training Model Architecture
: Option SaveBestOnly: Only model weights with smallest validation loss will be stored
: Elapsed time for training with 8000 events: 2.26 sec
PyTorch : [dataset] : Evaluation of PyTorch on training sample (8000 events)
: Failed to get predictions
***> abort program execution

Maybe @moneta can help on this

Hey, did you work this out by any chance? I am having the exact same problem

Welcome to the ROOT Forum! Let’s ask @moneta again

Hi,
Can you please pst your code giving this problem ?
Are you using C++ or Python ? You can look also at these 2 tutorials for using PyTorch with TMVA (these work for ROOT master)

Lorenzo

Hi, did you work it out by any chance?