Skip to content

Commit

Permalink
Update _debug as well when there are more than two streams being joined.
Browse files Browse the repository at this point in the history
  • Loading branch information
sjrl committed Apr 10, 2024
1 parent d07e238 commit 8991c12
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions haystack/pipelines/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -610,6 +610,11 @@ def run( # type: ignore
updated_input["meta"] = meta
else:
existing_input["inputs"].append(node_output)
if "_debug" in node_output.keys():
existing_input["_debug"] = {
**existing_input.get("_debug", {}),
**node_output.get("_debug", {}),
}
additional_input = self._combine_node_outputs(existing_input, node_output)
updated_input = {**additional_input, **existing_input}
queue[n] = updated_input
Expand Down Expand Up @@ -767,6 +772,11 @@ async def _arun( # noqa: C901,PLR0912 type: ignore
updated_input["meta"] = meta
else:
existing_input["inputs"].append(node_output)
if "_debug" in node_output.keys():
existing_input["_debug"] = {
**existing_input.get("_debug", {}),
**node_output.get("_debug", {}),
}
additional_input = self._combine_node_outputs(existing_input, node_output)
updated_input = {**additional_input, **existing_input}
queue[n] = updated_input
Expand Down

0 comments on commit 8991c12

Please sign in to comment.