-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Document Store test refactoring #3449
Changes from all commits
4043b24
e5bf12b
9a04f42
b1dc799
a86fca8
04b8a7c
0275f29
6628ca4
f39d76e
d7946ac
c2e5c6e
e042a88
3b35aaa
f6ed55c
5efd316
3875abb
092ae11
f012fc4
3655c8d
71374be
1f96f37
8f4b6aa
00aa020
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -152,7 +152,6 @@ def pytest_collection_modifyitems(config, items): | |
"pinecone": [pytest.mark.pinecone], | ||
# FIXME GraphDB can't be treated as a regular docstore, it fails most of their tests | ||
"graphdb": [pytest.mark.integration], | ||
"opensearch": [pytest.mark.opensearch], | ||
} | ||
for item in items: | ||
for name, markers in name_to_markers.items(): | ||
|
@@ -196,17 +195,7 @@ def infer_required_doc_store(item, keywords): | |
# 2. if the test name contains the docstore name, we use that | ||
# 3. use an arbitrary one by calling set.pop() | ||
required_doc_store = None | ||
all_doc_stores = { | ||
"elasticsearch", | ||
"faiss", | ||
"sql", | ||
"memory", | ||
"milvus1", | ||
"milvus", | ||
"weaviate", | ||
"pinecone", | ||
"opensearch", | ||
} | ||
all_doc_stores = {"elasticsearch", "faiss", "sql", "memory", "milvus1", "milvus", "weaviate", "pinecone"} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. So as we add test_memory.py, it will get removed from these existing "references"? We'll do that one-by-one for each document store @masci ? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @vblagoje correct, up to the point where we can remove |
||
docstore_markers = set(keywords).intersection(all_doc_stores) | ||
if len(docstore_markers) > 1: | ||
# if parameterized infer the docstore from the parameter | ||
|
@@ -1099,18 +1088,6 @@ def get_document_store( | |
knn_engine="faiss", | ||
) | ||
|
||
elif document_store_type == "opensearch": | ||
document_store = OpenSearchDocumentStore( | ||
index=index, | ||
return_embedding=True, | ||
embedding_dim=embedding_dim, | ||
embedding_field=embedding_field, | ||
similarity=similarity, | ||
recreate_index=recreate_index, | ||
port=9201, | ||
knn_engine="nmslib", | ||
) | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We have There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Elasticsearch keeps being used in some tests in |
||
else: | ||
raise Exception(f"No document store fixture for '{document_store_type}'") | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Aha, this needs to match the test directory, we add a small comment perhaps?