mirror of
https://github.com/deepset-ai/haystack.git
synced 2025-11-07 21:33:39 +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
|
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
|
# 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.
|
# end up with different indices. The same applies for InMemoryDocumentStore. The check below prevents creation of
|
||||||
is_faiss_present = False
|
# Indexing Pipelines with FAISSDocumentStore or InMemoryDocumentStore.
|
||||||
|
is_faiss_or_inmemory_present = False
|
||||||
for node in pipeline_config["nodes"]:
|
for node in pipeline_config["nodes"]:
|
||||||
if definitions[node["name"]]["type"] == "FAISSDocumentStore":
|
if definitions[node["name"]]["type"] == "FAISSDocumentStore" or definitions[node["name"]]["type"] == "InMemoryDocumentStore":
|
||||||
is_faiss_present = True
|
is_faiss_or_inmemory_present = True
|
||||||
break
|
break
|
||||||
if is_faiss_present:
|
if is_faiss_or_inmemory_present:
|
||||||
logger.warning("Indexing Pipeline with FAISSDocumentStore is not supported with the REST APIs.")
|
logger.warning("Indexing Pipeline with FAISSDocumentStore or InMemoryDocumentStore is not supported with the REST APIs.")
|
||||||
INDEXING_PIPELINE = None
|
INDEXING_PIPELINE = None
|
||||||
else:
|
else:
|
||||||
INDEXING_PIPELINE = Pipeline.load_from_yaml(Path(PIPELINE_YAML_PATH), pipeline_name=INDEXING_PIPELINE_NAME)
|
INDEXING_PIPELINE = Pipeline.load_from_yaml(Path(PIPELINE_YAML_PATH), pipeline_name=INDEXING_PIPELINE_NAME)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user