# TMVA::Experimental::SOFIE::RModelParser\_ONNX not recognized in namespace

**URL:** <https://root-forum.cern.ch/t/tmva-rmodelparser-onnx-not-recognized-in-namespace/59657>\
**Category:** TMVA\
**Tags:** tmva\
**Created:** [June 15, 2024, 5:50pm UTC](https://root-forum.cern.ch/t/tmva-rmodelparser-onnx-not-recognized-in-namespace/59657 "2024-06-15T17:50:12Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![tstarynski](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/t/e0b2c6/32.png) [@tstarynski](https://root-forum.cern.ch/u/tstarynski)\
**Post date:** [June 15, 2024, 5:50pm UTC](https://root-forum.cern.ch/t/tmva-rmodelparser-onnx-not-recognized-in-namespace/59657/1 "2024-06-15T17:50:12Z")

</div>

I am trying to use TMVA::Experimental::SOFIE::RModelParser\_ONNX to load in ONNX files into a program. To learn how it works i tried running the TMVA\_SOFIE\_ONNX.C file from the TMVA tutorial documentation, but I keep getting an error saying:

```auto
error: no type named 'RModelParser_ONNX' in namespace 'TMVA::Experimental::SOFIE'
TMVA::Experimental::SOFIE::RModelParser_ONNX parser;

```

I tried making a separate file that looks like this:

```auto
#include "TMVA/RModel.hxx"
#include <memory>
#include <functional>
#include <unordered_map>

TMVA::Experimental::SOFIE::RModelParser_ONNX parser;

```

I ended up getting the same exact error.

Before all of this I built ROOT with **-Drmva-sofie=On** as part of the cmake command. It seems like the compiler recognizes the TMVA::Experimental::SOFIE namespace, just not the specific object I want. Do I need to build more than just SOFIE when building root to get this to work?  
I am working on Linux.  
Thanks.

---

<div class="post-metadata">

**Author:** ![Danilo](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/danilo/32/34528_2.png) [@Danilo](https://root-forum.cern.ch/u/Danilo)\
**Post date:** [June 16, 2024, 6:23am UTC](https://root-forum.cern.ch/t/tmva-rmodelparser-onnx-not-recognized-in-namespace/59657/2 "2024-06-16T06:23:29Z")

</div>

Hi,

Thanks for the post.  
I am sorry to read you are experiencing this issue with your setup.  
What version of ROOT are you using installed how? Adding @moneta in the loop.

Cheers,  
D

---

<div class="post-metadata">

**Author:** ![tstarynski](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/t/e0b2c6/32.png) [@tstarynski](https://root-forum.cern.ch/u/tstarynski)\
**Post date:** [June 16, 2024, 2:55pm UTC](https://root-forum.cern.ch/t/tmva-rmodelparser-onnx-not-recognized-in-namespace/59657/3 "2024-06-16T14:55:24Z")

</div>

Hello,

I am using ROOT version 6.32.00  
I installed ROOT using the root\_v6.32.00.source.tar.gz file and when it was time to build it with cmake, i used the command:  
`cmake ../root -Drmva-sofie=On ~/local/protobuf-3.19.4/src/.libs/libprotobuf.a`  
because I saw a post on this forum about needing to link the protobuf installation to the ROOT build, but this resulted in a warning saying:

```auto
CMake warning:
	Ignoring extra path from command line:
	“/aft/cern.ch/user/v/vstaryns/local/protobuf-3.19.4/src/.libs/libprotobuf.a”

```

ROOT functions as normal, it’s just SOFIE I’m having problems with.

Thanks,  
T

---

<div class="post-metadata">

**Author:** ![mroguljic](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/mroguljic/32/26591_2.png) [@mroguljic](https://root-forum.cern.ch/u/mroguljic)\
**Post date:** [June 17, 2024, 10:29am UTC](https://root-forum.cern.ch/t/tmva-rmodelparser-onnx-not-recognized-in-namespace/59657/4 "2024-06-17T10:29:19Z")

</div>

I just managed to install (on lxplus) the latest stable version of root from source with SOFIE support using this cmake command: `cmake -DCMAKE_INSTALL_PREFIX=../root_install ../root_src -Dtmva-sofie=ON`. This short macro ran without complaining

```auto
#include <TMVA/RModelParser_ONNX.hxx>
TMVA::Experimental::SOFIE::RModelParser_ONNX parser;

```

I guess `-Drmva-sofie=On` is a typo and it should be “tmva” instead of “rmva”.

Cheers,  
Matej
