mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-12-03 09:53:45 +00:00
Added tests + docs + CI for Elasticsearch
This commit is contained in:
parent
f1c8a200c8
commit
12f8d96f48
9 changed files with 209 additions and 115 deletions
|
|
@ -371,18 +371,7 @@ def vector_provider_wrapper(func):
|
|||
inference_mode = os.environ.get("LLAMA_STACK_TEST_INFERENCE_MODE")
|
||||
if inference_mode == "live":
|
||||
# For live tests, try all providers (they'll skip if not available)
|
||||
all_providers = [
|
||||
"faiss",
|
||||
"sqlite-vec",
|
||||
"milvus",
|
||||
"chromadb",
|
||||
"pgvector",
|
||||
"weaviate",
|
||||
"qdrant",
|
||||
]
|
||||
else:
|
||||
# For CI tests (replay/record), only use providers that are available in ci-tests environment
|
||||
all_providers = ["faiss", "sqlite-vec"]
|
||||
all_providers = ["faiss", "sqlite-vec", "milvus", "chromadb", "pgvector", "weaviate", "qdrant", "elasticsearch"]
|
||||
|
||||
return pytest.mark.parametrize("vector_io_provider_id", all_providers)(wrapper)
|
||||
|
||||
|
|
|
|||
|
|
@ -34,6 +34,7 @@ def skip_if_provider_doesnt_support_openai_vector_stores(client_with_models):
|
|||
"remote::pgvector",
|
||||
"remote::qdrant",
|
||||
"remote::weaviate",
|
||||
"remote::elasticsearch",
|
||||
]:
|
||||
return
|
||||
|
||||
|
|
@ -54,6 +55,7 @@ def skip_if_provider_doesnt_support_openai_vector_stores_search(client_with_mode
|
|||
"remote::pgvector",
|
||||
"remote::qdrant",
|
||||
"remote::weaviate",
|
||||
"remote::elasticsearch",
|
||||
],
|
||||
"keyword": [
|
||||
"inline::milvus",
|
||||
|
|
@ -61,6 +63,7 @@ def skip_if_provider_doesnt_support_openai_vector_stores_search(client_with_mode
|
|||
"remote::milvus",
|
||||
"remote::pgvector",
|
||||
"remote::weaviate",
|
||||
"remote::elasticsearch",
|
||||
],
|
||||
"hybrid": [
|
||||
"inline::milvus",
|
||||
|
|
@ -68,6 +71,7 @@ def skip_if_provider_doesnt_support_openai_vector_stores_search(client_with_mode
|
|||
"remote::milvus",
|
||||
"remote::pgvector",
|
||||
"remote::weaviate",
|
||||
"remote::elasticsearch",
|
||||
],
|
||||
}
|
||||
supported_providers = search_mode_support.get(search_mode, [])
|
||||
|
|
|
|||
|
|
@ -164,6 +164,7 @@ def test_insert_chunks_with_precomputed_embeddings(
|
|||
"inline::milvus": {"score_threshold": -1.0},
|
||||
"inline::qdrant": {"score_threshold": -1.0},
|
||||
"remote::qdrant": {"score_threshold": -1.0},
|
||||
"remote::elasticsearch": {"score_threshold": -1.0},
|
||||
}
|
||||
vector_store_name = "test_precomputed_embeddings_db"
|
||||
register_response = client_with_empty_registry.vector_stores.create(
|
||||
|
|
@ -214,6 +215,7 @@ def test_query_returns_valid_object_when_identical_to_embedding_in_vdb(
|
|||
"inline::milvus": {"score_threshold": 0.0},
|
||||
"remote::qdrant": {"score_threshold": 0.0},
|
||||
"inline::qdrant": {"score_threshold": 0.0},
|
||||
"remote::elasticsearch": {"score_threshold": 0.0},
|
||||
}
|
||||
vector_store_name = "test_precomputed_embeddings_db"
|
||||
register_response = client_with_empty_registry.vector_stores.create(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue