FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

fix: Fixed integration tests for qdrant and milvus by ntkathole · Pull Request #5224 · feast-dev/feast · GitHub

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension .py  (4) All 1 file type selected
Viewed files
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Unified
Split
Hide whitespace
Diff view
Unified
Split
Hide whitespace
4 changes: 0 additions & 4 deletions sdk/python/feast/feature_store.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -2020,10 +2020,6 @@ def _retrieve_from_online_store(
"""
Search and return document features from the online document store.
"""
vector_field_metadata = _get_feature_view_vector_field_metadata(table)
if vector_field_metadata:
distance_metric = vector_field_metadata.vector_search_metric

documents = provider.retrieve_online_documents(
config=self.config,
table=table,
Expand Down
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,11 @@ def online_write_batch(
encoded_value = base64.b64encode(value.SerializeToString()).decode(
"utf-8"
)
vector_val = json.loads(get_list_val_str(value))
vector_val = get_list_val_str(value)
if vector_val:
vector = {config.online_store.vector_name: json.loads(vector_val)}
else:
vector = {}
points.append(
models.PointStruct(
id=uuid.uuid4().hex,
Expand All @@ -126,7 +130,7 @@ def online_write_batch(
"timestamp": timestamp,
"created_ts": created_ts,
},
vector={config.online_store.vector_name: vector_val},
vector=vector,
)
)

Expand Down
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -565,9 +565,13 @@ def construct_test_environment(
cache_ttl_seconds=1,
)

if isinstance(
test_repo_config.online_store, dict
) and test_repo_config.online_store.get("type") in ["milvus", "pgvector", "qdrant"]:
online_store = (
test_repo_config.online_store.get("type")
if isinstance(test_repo_config.online_store, dict)
else test_repo_config.online_store
)

if online_store in ["milvus", "pgvector", "qdrant"]:
entity_key_serialization_version = 3

environment_params = {
Expand Down
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -870,7 +870,7 @@ def test_retrieve_online_documents(environment, fake_document_data):
fs.write_to_online_store("item_embeddings", df)

documents = fs.retrieve_online_documents(
features=["item_embeddings:embedding_float"],
features=["item_embeddings:embedding_float", "item_embeddings:item_id"],
query=[1.0, 2.0],
top_k=2,
distance_metric="L2",
Expand Down

Back | FazBrowse Home | New Git URL