deepset-ai / haystack

:mag: AI orchestration framework to build customizable, production-ready LLM applications. Connect components (models, vector DBs, file converters) to pipelines or agents that can interact with your data. With advanced retrieval methods, it's best suited for building RAG, question answering, semantic search or conversational agent chatbots.
https://haystack.deepset.ai
Apache License 2.0
16.93k stars 1.85k forks source link

chore: Deprecate connecting a Component to itself #8368

Closed silvanocerza closed 3 days ago

silvanocerza commented 1 week ago

Calling Pipeline.connect() with the same Component both as sender and receiver will now emit a warning.

This will change in 2.7.0 and raise an exception. This change will come together with the internal Pipeline.run() rework release.

coveralls commented 1 week ago

Pull Request Test Coverage Report for Build 11029754959

Warning: This coverage report may be inaccurate.

This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.

Details


Files with Coverage Reduction New Missed Lines %
components/classifiers/zero_shot_document_classifier.py 3 91.07%
components/generators/openai.py 3 96.43%
utils/filters.py 3 96.91%
components/evaluators/llm_evaluator.py 5 95.08%
components/generators/chat/openai.py 13 79.28%
core/pipeline/base.py 25 92.29%
<!-- Total: 52 -->
Totals Coverage Status
Change from base Build 10881433761: 0.09%
Covered Lines: 7341
Relevant Lines: 8124

💛 - Coveralls
vblagoje commented 3 days ago

Hey @silvanocerza looks good except that warn message is bit incongruent with PR description i.e. we say an exception will be raised in PR description while the warn message doesn't say that. Also a wording in release note is a bit odd - seems like its missing a word somewhere in "it will raise in version 2.7.0"