Skip to content

Commit

Permalink
chore: Deprecate the debug parameter in Pipeline.run (#8075)
Browse files Browse the repository at this point in the history
  • Loading branch information
shadeMe committed Jul 25, 2024
1 parent 4dde6fb commit f9e4d5d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
6 changes: 4 additions & 2 deletions haystack/core/pipeline/pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,14 +48,14 @@ def _run_component(self, name: str, inputs: Dict[str, Any]) -> Dict[str, Any]:
"haystack.component.input_types": {k: type(v).__name__ for k, v in inputs.items()},
"haystack.component.input_spec": {
key: {
"type": value.type.__name__ if isinstance(value.type, type) else str(value.type),
"type": (value.type.__name__ if isinstance(value.type, type) else str(value.type)),
"senders": value.senders,
}
for key, value in instance.__haystack_input__._sockets_dict.items() # type: ignore
},
"haystack.component.output_spec": {
key: {
"type": value.type.__name__ if isinstance(value.type, type) else str(value.type),
"type": (value.type.__name__ if isinstance(value.type, type) else str(value.type)),
"receivers": value.receivers,
}
for key, value in instance.__haystack_output__._sockets_dict.items() # type: ignore
Expand Down Expand Up @@ -155,6 +155,8 @@ def run(self, word: str):
The pipeline resolves inputs to the correct components, returning
{'hello2': {'output': 'Hello, Hello, world!!'}}.
"""
warn("The 'debug' parameter is deprecated and will be removed in Haystack 2.5.0.", DeprecationWarning)

pipeline_running(self)

# Reset the visits count for each component
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---
deprecations:
- |
Deprecate the unused `debug` parameter in the `Pipeline.run` method.

0 comments on commit f9e4d5d

Please sign in to comment.