Skip to content

Conversation

@georschi
Copy link

@georschi georschi commented Nov 25, 2025

Thank you for opening a Pull Request! Before submitting your PR, there are a few things you can do to make sure it goes smoothly:

  • Make sure to open an issue as a bug/issue before writing your code! That way we can discuss the change, evaluate designs, and agree on the general idea
  • Ensure the tests and linter pass
  • Code coverage does not decrease (if any source code was changed)
  • Appropriate docs were updated (if necessary)
  • Get the necessary approvals
  • Once the last commit on the PR has been approved, add the "ready to pull" label to the Pull Request

Note: do not merge your PR from GitHub. Adding the "ready to pull" label is the final step in the review process.
After approvals, the changes in your PR will be committed to the main branch and this PR will be closed.

Fixes #6145 🦕

@product-auto-label product-auto-label bot added size: xs Pull request size is extra small. api: vertex-ai Issues related to the googleapis/python-aiplatform API. labels Nov 25, 2025
@ericgribkoff
Copy link

Thanks for the update! Can you also add the embedding_metadata to the dataclass definition/comments, e.g., something like:

from google.cloud.aiplatform.aiplatform.matching_engine._protos import (
    match_service_pb2_grpc,
)
+from google3.google.protobuf import field_mask_pb2
from google3.google.protobuf import struct_pb2

import grpc
        sparse_embedding_dimensions (List[int]):
            Optional. The corresponding dimensions of the sparse values.
            For example, values [1,2,3] with dimensions [4,5,6] means value 1 is
            of the 4th dimension, value 2 is of the 4th dimension, and value 3 is
            of the 6th dimension.
+        embedding_metadata (struct_pb2.Struct):
+            Optional. The metadata of the matching datapoint.

    """

    id: str
    distance: Optional[float] = None
    sparse_distance: Optional[float] = None
    feature_vector: Optional[List[float]] = None
    crowding_tag: Optional[str] = None
    restricts: Optional[List[Namespace]] = None
    numeric_restricts: Optional[List[NumericNamespace]] = None
    sparse_embedding_values: Optional[List[float]] = None
    sparse_embedding_dimensions: Optional[List[int]] = None
+    embedding_metadata: Optional[struct_pb2.Struct] = None

    def from_index_datapoint(
        self, index_datapoint: gca_index_v1beta1.IndexDatapoint
    ) -> "MatchNeighbor":

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api: vertex-ai Issues related to the googleapis/python-aiplatform API. size: xs Pull request size is extra small.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Missing embedding_metadata in response - matching engine - Vector Store

2 participants