Belle II Software prerelease-10-00-00a
TestMultiplePython Class Reference
Inheritance diagram for TestMultiplePython:
Collaboration 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 107 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 112 of file test_multiple_python.py.

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

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