Dear all,
I’m having trouble importing a model using TMVA::SOFIE.
The model was been trained with pytorch and I exported it to onnx following the recommendations found in the examples/forum.
However when I try to parse it with SOFIE I get the error below [1]
I’m using a standard LCG view (similar to the current default in swan) [2]
I put the original torch and onnx files here, if needed [3].
Any help is appreciated,
thanks a lot,
Pedro
[1]
Fill RModel with operators...
0 0 parsing operator Constant
Parsing an operator Constant
Traceback (most recent call last):
File "/eos/home-p/psilva/SWAN_projects/sdanalysis/notebooks/trainPzRegression.py", line 59, in <module>
main()
File "/eos/home-p/psilva/SWAN_projects/sdanalysis/notebooks/trainPzRegression.py", line 47, in main
onnx2sofie(onnxfile)
File "/eos/home-p/psilva/SWAN_projects/sdanalysis/notebooks/trainPzRegression.py", line 23, in onnx2sofie
model=parser.Parse(onnxfile,True)
cppyy.gbl.std.runtime_error: TMVA::Experimental::SOFIE::RModel TMVA::Experimental::SOFIE::RModelParser_ONNX::Parse(string filename, bool verbose = false) =>
runtime_error: TMVA::SOFIE Operator type Constant is not yet supported
The operator 'Constant` is not currently support. It is however a trivial operator and we are going to add it soon. I will let you know when is included so you can try it using the nightly build of ROOT.
I am sorry for this trouble
I have created a PR, which now fixes the problems found parsing your model. root-project/root#15837
I have tested with your model and it works.
I will let you know when is merged
The Constant operator is now available and the nightly builds should be able to parse the model you posted. See Nightlies - ROOT to use the nightly version