googleapis / googleapis/python-aiplatform
Missing embedding_metadata in response - matching engine - Vector Store
- 主要语言
- Python
- 星标
- 905
- 派生
- 465
- 平均合并
- 1 天 13 小时
- 30 天内合并 PR
- 44
描述
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
贡献指南
调研方向
从 matching_engine.matching_engine_index_endpoint.py 中的 MatchingEngineIndexEndpoint.find_neighbors 和 MatchNeighbor 响应转换开始。检查 return_full_datapoint 响应的映射方式,然后验证当 API 提供 embedding_metadata 时,它是否会保留在返回的 MatchNeighbor 中。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- python
- 领域
- machine-learning
- Issue 类型
- 缺陷
- 难度
- 2/5
- 预计耗时
- 1-3 小时
- 活跃度
- 停滞
- 描述清晰度
- 描述清楚
- 新手友好度
- 55/100