mirror of
https://github.com/deepset-ai/haystack.git
synced 2025-11-01 18:29:32 +00:00
disable file upload for InMemoryDocStore (#1677)
This commit is contained in:
parent
efdcd24d70
commit
c8df4763f8
@ -21,14 +21,15 @@ try:
|
||||
path=Path(PIPELINE_YAML_PATH), pipeline_name=INDEXING_PIPELINE_NAME, overwrite_with_env_variables=True
|
||||
)
|
||||
# Since each instance of FAISSDocumentStore creates an in-memory FAISS index, the Indexing & Query Pipelines would
|
||||
# end up with different indices. The check below prevents creation of Indexing Pipelines with FAISSDocumentStore.
|
||||
is_faiss_present = False
|
||||
# end up with different indices. The same applies for InMemoryDocumentStore. The check below prevents creation of
|
||||
# Indexing Pipelines with FAISSDocumentStore or InMemoryDocumentStore.
|
||||
is_faiss_or_inmemory_present = False
|
||||
for node in pipeline_config["nodes"]:
|
||||
if definitions[node["name"]]["type"] == "FAISSDocumentStore":
|
||||
is_faiss_present = True
|
||||
if definitions[node["name"]]["type"] == "FAISSDocumentStore" or definitions[node["name"]]["type"] == "InMemoryDocumentStore":
|
||||
is_faiss_or_inmemory_present = True
|
||||
break
|
||||
if is_faiss_present:
|
||||
logger.warning("Indexing Pipeline with FAISSDocumentStore is not supported with the REST APIs.")
|
||||
if is_faiss_or_inmemory_present:
|
||||
logger.warning("Indexing Pipeline with FAISSDocumentStore or InMemoryDocumentStore is not supported with the REST APIs.")
|
||||
INDEXING_PIPELINE = None
|
||||
else:
|
||||
INDEXING_PIPELINE = Pipeline.load_from_yaml(Path(PIPELINE_YAML_PATH), pipeline_name=INDEXING_PIPELINE_NAME)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user