Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix do_syst_ml condition #976

Merged
merged 2 commits into from
Feb 21, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 12 additions & 7 deletions machine_learning_hep/steer_analysis.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,10 @@
from .utilities_files import checkdirs, checkmakedir, checkmakedirlist, delete_dirlist


def do_entire_analysis(
def do_entire_analysis( # pylint: disable=too-many-locals, too-many-statements, too-many-branches
data_config: dict,
data_param: dict,
data_param_overwrite: dict, # pylint: disable=too-many-locals, too-many-statements, too-many-branches
data_param_overwrite: dict,
data_model: dict,
run_param: dict,
args,
Expand Down Expand Up @@ -293,11 +293,16 @@ def mlhepmod(name):

analyzers = ana_mgr.get_analyzers()
# For ML WP systematics
if mltype == "MultiClassification":
syst_ml_pt_cl0 = syst_class(data_param[case], case, typean, analyzers, mymultiprocessmc, mymultiprocessdata, 0)
syst_ml_pt_cl1 = syst_class(data_param[case], case, typean, analyzers, mymultiprocessmc, mymultiprocessdata, 1)
else:
syst_ml_pt = syst_class(data_param[case], case, typean, analyzers, mymultiprocessmc, mymultiprocessdata)
if do_syst_ml:
if mltype == "MultiClassification":
syst_ml_pt_cl0 = syst_class(
data_param[case], case, typean, analyzers, mymultiprocessmc, mymultiprocessdata, 0
)
syst_ml_pt_cl1 = syst_class(
data_param[case], case, typean, analyzers, mymultiprocessmc, mymultiprocessdata, 1
)
else:
syst_ml_pt = syst_class(data_param[case], case, typean, analyzers, mymultiprocessmc, mymultiprocessdata)

# perform the analysis flow
if dodownloadalice:
Expand Down
Loading