Belle II Software development
TestMultiplePython Class Reference
Inheritance diagram for TestMultiplePython:

Public Member Functions

 test_multiple_sklearn (self)
 

Detailed Description

Test if we can run multiple python methods for the same framework at the same time (MR !4244)

Definition at line 109 of file test_multiple_python.py.

Member Function Documentation

◆ test_multiple_sklearn()

test_multiple_sklearn ( self)
Try if we can run a sklearn bdt and a sklear mlp at the same time

Definition at line 114 of file test_multiple_python.py.

114 def test_multiple_sklearn(self):
115 """
116 Try if we can run a sklearn bdt and a sklear mlp at the same time
117 """
118 import ROOT
119 from ROOT import vector
120
121 variables = ["var1", "var2"]
122 write_dummy_file(variables)
123 train_bdt()
124 train_mlp()
125
126 # test by explicitly initializing two experts to provoke clashes
127 bdt_expert = get_expert("SKLearn-BDT.xml")
128 mlp_expert = get_expert("SKLearn-MLP.xml")
129
130 inputs = vector[vector[float]]([vector[float]([1, 2])])
131 spectators = vector[vector[float]]()
132
133 general_options = basf2_mva.GeneralOptions()
134 general_options.m_variables = basf2_mva.vector(*variables)
135 dataset = ROOT.Belle2.MVA.MultiDataset(general_options, inputs, spectators)
136
137 bdt_expert.apply(dataset)
138 mlp_expert.apply(dataset)
139
140

The documentation for this class was generated from the following file: