googleapis / googleapis/python-aiplatform

Missing embedding_metadata in response - matching engine - Vector Store

Abierto
#6,145 1 comentario 0 reacciones 0 asignados Ver en GitHub
api: vertex-ai
Lenguaje dominante
Python
Estrellas
905
Forks
465
Merge medio
1 d 13 h
PR fusionados (30 d)
44

Descripción

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

Guía de contribución

Abrir la guía de contribución

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.