diff --git a/haystack/pipelines/base.py b/haystack/pipelines/base.py index a60206bfb..3e8ff547e 100644 --- a/haystack/pipelines/base.py +++ b/haystack/pipelines/base.py @@ -647,7 +647,12 @@ class Pipeline(BasePipeline): # Apply debug attributes to the node input params # NOTE: global debug attributes will override the value specified # in each node's params dictionary. + if debug is None and node_input: + if node_input.get("params", {}): + debug = params.get("debug", None) # type: ignore if debug is not None: + if not node_input.get("params", None): + node_input["params"] = {} if node_id not in node_input["params"].keys(): node_input["params"][node_id] = {} node_input["params"][node_id]["debug"] = debug