chore: Deprecate the debug parameter in Pipeline.run (#8075)

This commit is contained in:
Madeesh Kannan 2024-07-25 11:58:57 +02:00 committed by GitHub
parent 4dde6fbaec
commit f9e4d5dc58
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 8 additions and 2 deletions

View File

@ -48,14 +48,14 @@ class Pipeline(PipelineBase):
"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
@ -155,6 +155,8 @@ class Pipeline(PipelineBase):
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

View File

@ -0,0 +1,4 @@
---
deprecations:
- |
Deprecate the unused `debug` parameter in the `Pipeline.run` method.