Skip to content

Commit 2e87835

Browse files
committed
Correctly inject RModelParser_Keras class into Python interfaces
1 parent 0c13fc5 commit 2e87835

File tree

2 files changed

+2
-6
lines changed
  • bindings/pyroot/pythonizations/python/ROOT

2 files changed

+2
-6
lines changed

bindings/pyroot/pythonizations/python/ROOT/_facade.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -427,6 +427,7 @@ def TMVA(self):
427427
from ._pythonization import _tmva # noqa: F401
428428

429429
ns = self._fallback_getattr("TMVA")
430+
setattr(ns.Experimental.SOFIE, "RModelParser_Keras", _tmva.RModelParser_Keras)
430431
hasRDF = "dataframe" in self.gROOT.GetConfigFeatures()
431432
if hasRDF:
432433
try:

bindings/pyroot/pythonizations/python/ROOT/_pythonization/_tmva/_sofie/_parser/_keras/parser.py

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -539,9 +539,4 @@ def Parse(filename, batch_size=1): # If a model does not have a defined batch s
539539
outputNames.append(output_layer_name)
540540
rmodel.AddOutputTensorNameList(outputNames)
541541
return rmodel
542-
543-
@pythonization("RModelParser_Keras", ns="TMVA::Experimental::SOFIE")
544-
def pythonize_rmodelparser_keras(klass):
545-
# Parameters:
546-
# klass: class to be pythonized
547-
setattr(klass, "Parse", RModelParser_Keras.Parse)
542+

0 commit comments

Comments
 (0)