AddSpectator variable crashes with segmentation violation in multi class kPyKeras TMVA

Dear ROOT experts,

could you help to figure out the cause of the segmentation violation crash when using pyKERAS multi classifier in TMVA, please?
Below I will summarize the examples I was following and attach the code to reproduce the error.

This is an example I was using from ROOT tutorials: I also use .root file from this example to reproduce the issue.

First I tried to set up this example with spectator variable “eta” for only two classes: one signal tree and one background tree. So I used AddSignalTree and AddBackgroundTree. This works fine for kFisher (lines 75-78 in and for kPyKeras (lines 111-120 in For kPyKeras to work I have to source root 6.16, otherwise I run into error which was pointed out by other colleague here Tensorflow crashes when factory has more than one pyKeras model booked.

Now keeping the same setup and the same ROOT version 6.16 I’m seeing up multi class example. To use the same .root input file I just added signal1 and signal2 with different names, but it is the same root file. To set up multi class I can not use AddSignalTree and AddBackgroundTree, I need to add two different signals, so I used AddTree and gave different names to signal classes (lines 23-24 in This training crashes with segmentation violation. Full error is in out_segmentation.txt. To make sure that training would run fine without categories based on spectator variables I did run the test in lines 81-84 in an the one finished ok.

Please help me to figure out what causes segmentation violation when using categories based on spectator variables and kPyKeras.

Many thanks in advance,
Olena (5.2 KB) (4.9 KB) out_segmentation.txt (43.5 KB)

@moneta can you help?

Yes, I can reproduce the crash. I will investigate it


Thank you, Lorenzo!
Please let me know it I can provide any other information, which can be helpful.

I’m looking forward to your reply,

1 Like

Hi ,
I have open an issue in github for this bug so you can monitor

Thank you for reporting this

1 Like