From fa31954b2960a2b4d8656c59d76276c457d403ea Mon Sep 17 00:00:00 2001 From: Mathis Frahm Date: Fri, 4 Aug 2023 10:55:17 +0200 Subject: [PATCH] bugfix in default producer setup --- hbw/config/defaults_and_groups.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hbw/config/defaults_and_groups.py b/hbw/config/defaults_and_groups.py index 00bd013d..547815ca 100644 --- a/hbw/config/defaults_and_groups.py +++ b/hbw/config/defaults_and_groups.py @@ -43,11 +43,12 @@ def default_ml_model(cls, container, task_params): def default_producers(cls, container, task_params): """ Default producers chosen based on the Inference model and the ML Model """ + dataset_inst = task_params.get("dataset_inst", None) # per default, use the ml_inputs and event_weights # TODO: we might need two ml_inputs producers in the future (sl vs dl) default_producers = ["ml_inputs"] - if task_params["dataset_inst"].is_mc: + if dataset_inst and dataset_inst.is_mc: # run event weights producer only if it's a MC dataset default_producers.append("event_weights")