From b54fdd3fa00aaa5e9f2b5c5952862460845aaeab Mon Sep 17 00:00:00 2001 From: Massimiliano Pippi Date: Wed, 26 Apr 2023 12:16:43 +0200 Subject: [PATCH] docs: add deprecation notes to docstrings (#4708) --- haystack/document_stores/base.py | 2 ++ haystack/document_stores/graphdb.py | 2 ++ haystack/document_stores/memory_knowledgegraph.py | 2 ++ haystack/nodes/retriever/text2sparql.py | 2 ++ 4 files changed, 8 insertions(+) diff --git a/haystack/document_stores/base.py b/haystack/document_stores/base.py index 9ec3df9d5..8ed029894 100644 --- a/haystack/document_stores/base.py +++ b/haystack/document_stores/base.py @@ -35,6 +35,8 @@ except (ImportError, ModuleNotFoundError): class BaseKnowledgeGraph(BaseComponent): """ Base class for implementing Knowledge Graphs. + + The BaseKnowledgeGraph component is deprecated and will be removed in future versions. """ def __init__(self): diff --git a/haystack/document_stores/graphdb.py b/haystack/document_stores/graphdb.py index 48984a9b9..10996b676 100644 --- a/haystack/document_stores/graphdb.py +++ b/haystack/document_stores/graphdb.py @@ -31,6 +31,8 @@ class GraphDBKnowledgeGraph(BaseKnowledgeGraph): prefixes: str = "", ): """ + The GraphDBKnowledgeGraph component is deprecated and will be removed in future versions. + Init the knowledge graph by defining the settings to connect with a GraphDB instance :param host: address of server where the GraphDB instance is running diff --git a/haystack/document_stores/memory_knowledgegraph.py b/haystack/document_stores/memory_knowledgegraph.py index ae1755118..c1aad7e36 100644 --- a/haystack/document_stores/memory_knowledgegraph.py +++ b/haystack/document_stores/memory_knowledgegraph.py @@ -19,6 +19,8 @@ class InMemoryKnowledgeGraph(BaseKnowledgeGraph): def __init__(self, index: str = "document"): """ + The InMemoryKnowledgeGraph component is deprecated and will be removed in future versions. + Init the in memory knowledge graph :param index: name of the index diff --git a/haystack/nodes/retriever/text2sparql.py b/haystack/nodes/retriever/text2sparql.py index c295019e6..3148a07e2 100644 --- a/haystack/nodes/retriever/text2sparql.py +++ b/haystack/nodes/retriever/text2sparql.py @@ -27,6 +27,8 @@ class Text2SparqlRetriever(BaseGraphRetriever): use_auth_token: Optional[Union[str, bool]] = None, ): """ + The Text2SparqlRetriever component is deprecated and will be removed in future versions. + Init the Retriever by providing a knowledge graph and a pre-trained BART model :param knowledge_graph: An instance of BaseKnowledgeGraph on which to execute SPARQL queries.