# Problem about TMVA::Dataloader

**URL:** <https://root-forum.cern.ch/t/problem-about-tmva-dataloader/61645>\
**Category:** TMVA\
**Created:** [September 12, 2024, 2:03pm UTC](https://root-forum.cern.ch/t/problem-about-tmva-dataloader/61645 "2024-09-12T14:03:01Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![TField](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/tfield/32/36014_2.png) [@TField](https://root-forum.cern.ch/u/TField)\
**Post date:** [September 12, 2024, 2:03pm UTC](https://root-forum.cern.ch/t/problem-about-tmva-dataloader/61645/1 "2024-09-12T14:03:01Z")

</div>

when I assign the address to store the weight file: auto dataloader\_raii = std::make\_uniqueTMVA::DataLoader(“/data03/tianye/dir/dataset100”);  
it will occur: Error in TFile::GetObjectChecked: The provided key name is invalid.

\*\*\* Break \*\*\* segmentation violation

===========================================================  
There was a crash (#5 0x00007fd2ca83e174 in SigHandler(ESignals) () from /data03/root/lib/libCore.so).  
This is the entire stack trace of all threads:  
#0 0x00007fd2c7d182ca in wait4 () from /lib64/libc.so.6  
#1 0x00007fd2c7c61953 in do\_system () from /lib64/libc.so.6  
#2 0x00007fd2ca841f9a in TUnixSystem::Exec(char const\*) () from /data03/root/lib/libCore.so  
#3 0x00007fd2ca842841 in TUnixSystem::StackTrace() () from /data03/root/lib/libCore.so  
#4 0x00007fd2ca8462a0 in TUnixSystem::DispatchSignals(ESignals) () from /data03/root/lib/libCore.so  
#5 0x00007fd2ca83e174 in SigHandler(ESignals) () from /data03/root/lib/libCore.so  
#6 0x00007fd2ca8461a4 in sighandler(int) () from /data03/root/lib/libCore.so  
#7   
#8 0x00007fd2cb364727 in TMVA::MethodBase::MethodBaseDir() const () from /data03/root/lib/libTMVA.so  
#9 0x00007fd2cb363fb4 in TMVA::MethodBase::BaseDir() const () from /data03/root/lib/libTMVA.so  
#10 0x00007fd2cb358076 in TMVA::MethodBase::TrainMethod() () from /data03/root/lib/libTMVA.so  
#11 0x00007fd2cb310c9f in TMVA:🏭:TrainAllMethods() () from /data03/root/lib/libTMVA.so  
#12 0x000000000040f1ab in TMVAClassification(TString, int, float, float, int, int) ()  
#13 0x0000000000410d68 in tmva\_mdsl\_fp\_data(int, float, float, int, int) ()  
#14 0x0000000000410e43 in main ()  
The lines below might hint at the cause of the crash.  
You may get help by asking at the ROOT forum [ROOT Forum](https://root.cern/forum)  
Only if you are really convinced it is a bug in ROOT then please submit a  
report at [Sign in to GitHub · GitHub](https://root.cern/bugs) Please post the ENTIRE stack trace  
from above as an attachment in addition to anything else  
that might help us fixing this issue.  
#8 0x00007fd2cb364727 in TMVA::MethodBase::MethodBaseDir() const () from /data03/root/lib/libTMVA.so  
#9 0x00007fd2cb363fb4 in TMVA::MethodBase::BaseDir() const () from /data03/root/lib/libTMVA.so  
#10 0x00007fd2cb358076 in TMVA::MethodBase::TrainMethod() () from /data03/root/lib/libTMVA.so  
#11 0x00007fd2cb310c9f in TMVA:🏭:TrainAllMethods() () from /data03/root/lib/libTMVA.so  
#12 0x000000000040f1ab in TMVAClassification(TString, int, float, float, int, int) ()  
#13 0x0000000000410d68 in tmva\_mdsl\_fp\_data(int, float, float, int, int) ()  
#14 0x0000000000410e43 in main ()

However, if I change the path into: auto dataloader\_raii = std::make\_uniqueTMVA::DataLoader(“dataset100”); it is running fine, what’s wrong in the code.

---

<div class="post-metadata">

**Author:** ![mczurylo](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/mczurylo/32/33269_2.png) [@mczurylo](https://root-forum.cern.ch/u/mczurylo)\
**Post date:** [September 12, 2024, 2:19pm UTC](https://root-forum.cern.ch/t/problem-about-tmva-dataloader/61645/2 "2024-09-12T14:19:40Z")

</div>

Hi @TField,

thank you for the report, could you share the full reproducer (code snippet) of what gives the error so we can reproduce it ourselves?

Cheers,  
Marta

---

<div class="post-metadata">

**Author:** ![TField](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/tfield/32/36014_2.png) [@TField](https://root-forum.cern.ch/u/TField)\
**Post date:** [September 13, 2024, 8:10am UTC](https://root-forum.cern.ch/t/problem-about-tmva-dataloader/61645/3 "2024-09-13T08:10:56Z")

</div>

[tmva\_mdsl\_fp\_data.C](https://root-forum.cern.ch/uploads/short-url/cdyubBH3m5CoMTBMqcDVVKSRFnU.C) (22.8 KB)  
Hi,  
at line 196 to 200, where I found intrigue the crash, if I set std::make\_uniqueTMVA::DataLoader(“/data03/tianye/fpbdt\_train/dataset/dataset\_fp100”), it will encounter an error;however, if I use std::make\_uniqueTMVA::DataLoader(“dataset\_fp100”)//create the dataset in current dir, it goes fine. I think something goes wrong with the dataloader::setname() or TName or something else. 🤔

---

<div class="post-metadata">

**Author:** ![mczurylo](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/mczurylo/32/33269_2.png) [@mczurylo](https://root-forum.cern.ch/u/mczurylo)\
**Post date:** [September 13, 2024, 8:53am UTC](https://root-forum.cern.ch/t/problem-about-tmva-dataloader/61645/4 "2024-09-13T08:53:38Z")

</div>

Hi @TField,

thank you for the reproducer, maybe @moneta has some insights about this.

Cheers,  
Marta
