Skip to content

Commit e6e3082

Browse files
authored
Fix do_syst_ml condition (alisw#976)
* Fix do_syst_ml condition * Disable pylint errors
1 parent 239ad72 commit e6e3082

File tree

1 file changed

+12
-7
lines changed

1 file changed

+12
-7
lines changed

machine_learning_hep/steer_analysis.py

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,10 @@
3232
from .utilities_files import checkdirs, checkmakedir, checkmakedirlist, delete_dirlist
3333

3434

35-
def do_entire_analysis(
35+
def do_entire_analysis( # pylint: disable=too-many-locals, too-many-statements, too-many-branches
3636
data_config: dict,
3737
data_param: dict,
38-
data_param_overwrite: dict, # pylint: disable=too-many-locals, too-many-statements, too-many-branches
38+
data_param_overwrite: dict,
3939
data_model: dict,
4040
run_param: dict,
4141
args,
@@ -293,11 +293,16 @@ def mlhepmod(name):
293293

294294
analyzers = ana_mgr.get_analyzers()
295295
# For ML WP systematics
296-
if mltype == "MultiClassification":
297-
syst_ml_pt_cl0 = syst_class(data_param[case], case, typean, analyzers, mymultiprocessmc, mymultiprocessdata, 0)
298-
syst_ml_pt_cl1 = syst_class(data_param[case], case, typean, analyzers, mymultiprocessmc, mymultiprocessdata, 1)
299-
else:
300-
syst_ml_pt = syst_class(data_param[case], case, typean, analyzers, mymultiprocessmc, mymultiprocessdata)
296+
if do_syst_ml:
297+
if mltype == "MultiClassification":
298+
syst_ml_pt_cl0 = syst_class(
299+
data_param[case], case, typean, analyzers, mymultiprocessmc, mymultiprocessdata, 0
300+
)
301+
syst_ml_pt_cl1 = syst_class(
302+
data_param[case], case, typean, analyzers, mymultiprocessmc, mymultiprocessdata, 1
303+
)
304+
else:
305+
syst_ml_pt = syst_class(data_param[case], case, typean, analyzers, mymultiprocessmc, mymultiprocessdata)
301306

302307
# perform the analysis flow
303308
if dodownloadalice:

0 commit comments

Comments
 (0)