googleapis / googleapis/python-aiplatform

Missing embedding_metadata in response - matching engine - Vector Store

Ouverte
#6,145 1 commentaire 0 réactions 0 personnes assignées Voir sur GitHub
api: vertex-ai
Langage dominant
Python
Étoiles
905
Forks
465
Merge moyen
1 j 13 h
PR mergées (30 j)
44

Description

I am using the preview feature of vertexai vector store that support `embedding_metadata`.
When using the curl command I can retrieve the metadata associated with a datapoint.

However, this doesn't work with the python SDK.

The `find_neighbors` method of `MatchingEngineIndexEndpoint` accepts the parameter `return_full_datapoint` which then correctly adds the param to the api endpoint.
The issue is that when the response is cast into the class `MatchNeighbor`, which does not contain a field for `embedding_metadata`, this information is lost even though it was retrieved.

Solution is to correctly cast it and/or update the definition of `MatchNeighbor`.

The solution I'm currently using in my own fork is to add

```python
if (index_datapoint.embedding_metadata is not None):
self.embedding_metadata = index_datapoint.embedding_metadata
```

in line 280 of matching_engine.matching_engine_index_endpoint.py

Guide de contribution

Ouvrir le guide de contribution

Évaluation

Cette issue n'a pas encore été évaluée.

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.