Skip to content

Commit f0f13f2

Browse files
lingyinwcopybara-github
authored andcommitted
Copybara import of the project:
-- bd20edd by lingyinw <[email protected]>: fix: regenerate pb2 files using grpcio-tools, add hybrid search -- 24f558a by lingyinw <[email protected]>: fix:regenerate pb2 files using grpcio-tools -- 6311ec9 by lingyinw <[email protected]>: fix: regenerate pb2 files using grpcio-tools COPYBARA_INTEGRATE_REVIEW=#3940 from lingyinw:main 6311ec9 PiperOrigin-RevId: 643048261
1 parent 3b03f9a commit f0f13f2

File tree

2 files changed

+58
-55
lines changed

2 files changed

+58
-55
lines changed

google/cloud/aiplatform/matching_engine/_protos/match_service.proto

+13-11
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,17 @@ service MatchService {
2020
returns (BatchGetEmbeddingsResponse) {}
2121
}
2222

23+
// Feature embedding vector for sparse index. An array of numbers whose values
24+
// are located in the specified dimensions.
25+
message SparseEmbedding {
26+
27+
// The list of embedding values of the sparse vector.
28+
repeated float float_val = 1;
29+
30+
// The list of indexes for the embedding values of the sparse vector.
31+
repeated int64 dimension = 2;
32+
}
33+
2334
// Parameters for a match query.
2435
message MatchRequest {
2536
// The ID of the DeploydIndex that will serve the request.
@@ -34,17 +45,6 @@ message MatchRequest {
3445
// The embedding values.
3546
repeated float float_val = 2;
3647

37-
// Feature embedding vector for sparse index. An array of numbers whose values
38-
// are located in the specified dimensions.
39-
message SparseEmbedding {
40-
41-
// The list of embedding values of the sparse vector.
42-
repeated float float_val = 1;
43-
44-
// The list of indexes for the embedding values of the sparse vector.
45-
repeated int64 dimension = 2;
46-
}
47-
4848
// Feature embedding vector for sparse index.
4949
SparseEmbedding sparse_embedding = 12;
5050

@@ -116,6 +116,8 @@ message Embedding {
116116
// The embedding values.
117117
repeated float float_val = 2;
118118

119+
// Feature embedding vector for sparse index.
120+
SparseEmbedding sparse_embedding = 6;
119121
// The list of restricts.
120122
repeated Namespace restricts = 3;
121123

google/cloud/aiplatform/matching_engine/_protos/match_service_pb2.py

+45-44
Original file line numberDiff line numberDiff line change
@@ -32,12 +32,12 @@
3232

3333

3434
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(
35-
b'\nCgoogle/cloud/aiplatform/matching_engine/_protos/match_service.proto\x12$google.cloud.aiplatform.container.v1\x1a\x17google/rpc/status.proto"\xc5\x05\n\x0cMatchRequest\x12\x19\n\x11\x64\x65ployed_index_id\x18\x01 \x01(\t\x12\x11\n\tfloat_val\x18\x02 \x03(\x02\x12\\\n\x10sparse_embedding\x18\x0c \x01(\x0b\x32\x42.google.cloud.aiplatform.container.v1.MatchRequest.SparseEmbedding\x12\x45\n\x03rrf\x18\r \x01(\x0b\x32\x36.google.cloud.aiplatform.container.v1.MatchRequest.RRFH\x00\x12\x15\n\rnum_neighbors\x18\x03 \x01(\x05\x12\x42\n\trestricts\x18\x04 \x03(\x0b\x32/.google.cloud.aiplatform.container.v1.Namespace\x12Q\n\x11numeric_restricts\x18\x0b \x03(\x0b\x32\x36.google.cloud.aiplatform.container.v1.NumericNamespace\x12,\n$per_crowding_attribute_num_neighbors\x18\x05 \x01(\x05\x12\x1c\n\x14\x61pprox_num_neighbors\x18\x06 \x01(\x05\x12-\n%leaf_nodes_to_search_percent_override\x18\x07 \x01(\x05\x12.\n&fraction_leaf_nodes_to_search_override\x18\t \x01(\x01\x12\x19\n\x11\x65mbedding_enabled\x18\x08 \x01(\x08\x12\x14\n\x0c\x65mbedding_id\x18\n \x01(\t\x1a\x37\n\x0fSparseEmbedding\x12\x11\n\tfloat_val\x18\x01 \x03(\x02\x12\x11\n\tdimension\x18\x02 \x03(\x03\x1a\x14\n\x03RRF\x12\r\n\x05\x61lpha\x18\x01 \x01(\x02\x42\t\n\x07ranking"\xdd\x01\n\tEmbedding\x12\n\n\x02id\x18\x01 \x01(\t\x12\x11\n\tfloat_val\x18\x02 \x03(\x02\x12\x42\n\trestricts\x18\x03 \x03(\x0b\x32/.google.cloud.aiplatform.container.v1.Namespace\x12Q\n\x11numeric_restricts\x18\x05 \x03(\x0b\x32\x36.google.cloud.aiplatform.container.v1.NumericNamespace\x12\x1a\n\x12\x63rowding_attribute\x18\x04 \x01(\x03"\x83\x02\n\rMatchResponse\x12N\n\x08neighbor\x18\x01 \x03(\x0b\x32<.google.cloud.aiplatform.container.v1.MatchResponse.Neighbor\x12\x43\n\nembeddings\x18\x02 \x03(\x0b\x32/.google.cloud.aiplatform.container.v1.Embedding\x1a]\n\x08Neighbor\x12\n\n\x02id\x18\x01 \x01(\t\x12\x10\n\x08\x64istance\x18\x02 \x01(\x01\x12\x17\n\x0fsparse_distance\x18\x04 \x01(\x01\x12\x1a\n\x12\x63rowding_attribute\x18\x03 \x01(\x03"B\n\x19\x42\x61tchGetEmbeddingsRequest\x12\x19\n\x11\x64\x65ployed_index_id\x18\x01 \x01(\t\x12\n\n\x02id\x18\x02 \x03(\t"a\n\x1a\x42\x61tchGetEmbeddingsResponse\x12\x43\n\nembeddings\x18\x01 \x03(\x0b\x32/.google.cloud.aiplatform.container.v1.Embedding"\x95\x02\n\x11\x42\x61tchMatchRequest\x12\x63\n\x08requests\x18\x01 \x03(\x0b\x32Q.google.cloud.aiplatform.container.v1.BatchMatchRequest.BatchMatchRequestPerIndex\x1a\x9a\x01\n\x19\x42\x61tchMatchRequestPerIndex\x12\x19\n\x11\x64\x65ployed_index_id\x18\x01 \x01(\t\x12\x44\n\x08requests\x18\x02 \x03(\x0b\x32\x32.google.cloud.aiplatform.container.v1.MatchRequest\x12\x1c\n\x14low_level_batch_size\x18\x03 \x01(\x05"\xa2\x02\n\x12\x42\x61tchMatchResponse\x12\x66\n\tresponses\x18\x01 \x03(\x0b\x32S.google.cloud.aiplatform.container.v1.BatchMatchResponse.BatchMatchResponsePerIndex\x1a\xa3\x01\n\x1a\x42\x61tchMatchResponsePerIndex\x12\x19\n\x11\x64\x65ployed_index_id\x18\x01 \x01(\t\x12\x46\n\tresponses\x18\x02 \x03(\x0b\x32\x33.google.cloud.aiplatform.container.v1.MatchResponse\x12"\n\x06status\x18\x03 \x01(\x0b\x32\x12.google.rpc.Status"D\n\tNamespace\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x14\n\x0c\x61llow_tokens\x18\x02 \x03(\t\x12\x13\n\x0b\x64\x65ny_tokens\x18\x03 \x03(\t"\xb4\x02\n\x10NumericNamespace\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x13\n\tvalue_int\x18\x02 \x01(\x03H\x00\x12\x15\n\x0bvalue_float\x18\x03 \x01(\x02H\x00\x12\x16\n\x0cvalue_double\x18\x04 \x01(\x01H\x00\x12K\n\x02op\x18\x05 \x01(\x0e\x32?.google.cloud.aiplatform.container.v1.NumericNamespace.Operator"x\n\x08Operator\x12\x18\n\x14OPERATOR_UNSPECIFIED\x10\x00\x12\x08\n\x04LESS\x10\x01\x12\x0e\n\nLESS_EQUAL\x10\x02\x12\t\n\x05\x45QUAL\x10\x03\x12\x11\n\rGREATER_EQUAL\x10\x04\x12\x0b\n\x07GREATER\x10\x05\x12\r\n\tNOT_EQUAL\x10\x06\x42\x07\n\x05Value2\xa2\x03\n\x0cMatchService\x12r\n\x05Match\x12\x32.google.cloud.aiplatform.container.v1.MatchRequest\x1a\x33.google.cloud.aiplatform.container.v1.MatchResponse"\x00\x12\x81\x01\n\nBatchMatch\x12\x37.google.cloud.aiplatform.container.v1.BatchMatchRequest\x1a\x38.google.cloud.aiplatform.container.v1.BatchMatchResponse"\x00\x12\x99\x01\n\x12\x42\x61tchGetEmbeddings\x12?.google.cloud.aiplatform.container.v1.BatchGetEmbeddingsRequest\x1a@.google.cloud.aiplatform.container.v1.BatchGetEmbeddingsResponse"\x00\x62\x06proto3'
35+
b'\nCgoogle/cloud/aiplatform/matching_engine/_protos/match_service.proto\x12$google.cloud.aiplatform.container.v1\x1a\x17google/rpc/status.proto"7\n\x0fSparseEmbedding\x12\x11\n\tfloat_val\x18\x01 \x03(\x02\x12\x11\n\tdimension\x18\x02 \x03(\x03"\xff\x04\n\x0cMatchRequest\x12\x19\n\x11\x64\x65ployed_index_id\x18\x01 \x01(\t\x12\x11\n\tfloat_val\x18\x02 \x03(\x02\x12O\n\x10sparse_embedding\x18\x0c \x01(\x0b\x32\x35.google.cloud.aiplatform.container.v1.SparseEmbedding\x12\x45\n\x03rrf\x18\r \x01(\x0b\x32\x36.google.cloud.aiplatform.container.v1.MatchRequest.RRFH\x00\x12\x15\n\rnum_neighbors\x18\x03 \x01(\x05\x12\x42\n\trestricts\x18\x04 \x03(\x0b\x32/.google.cloud.aiplatform.container.v1.Namespace\x12Q\n\x11numeric_restricts\x18\x0b \x03(\x0b\x32\x36.google.cloud.aiplatform.container.v1.NumericNamespace\x12,\n$per_crowding_attribute_num_neighbors\x18\x05 \x01(\x05\x12\x1c\n\x14\x61pprox_num_neighbors\x18\x06 \x01(\x05\x12-\n%leaf_nodes_to_search_percent_override\x18\x07 \x01(\x05\x12.\n&fraction_leaf_nodes_to_search_override\x18\t \x01(\x01\x12\x19\n\x11\x65mbedding_enabled\x18\x08 \x01(\x08\x12\x14\n\x0c\x65mbedding_id\x18\n \x01(\t\x1a\x14\n\x03RRF\x12\r\n\x05\x61lpha\x18\x01 \x01(\x02\x42\t\n\x07ranking"\xae\x02\n\tEmbedding\x12\n\n\x02id\x18\x01 \x01(\t\x12\x11\n\tfloat_val\x18\x02 \x03(\x02\x12O\n\x10sparse_embedding\x18\x06 \x01(\x0b\x32\x35.google.cloud.aiplatform.container.v1.SparseEmbedding\x12\x42\n\trestricts\x18\x03 \x03(\x0b\x32/.google.cloud.aiplatform.container.v1.Namespace\x12Q\n\x11numeric_restricts\x18\x05 \x03(\x0b\x32\x36.google.cloud.aiplatform.container.v1.NumericNamespace\x12\x1a\n\x12\x63rowding_attribute\x18\x04 \x01(\x03"\x83\x02\n\rMatchResponse\x12N\n\x08neighbor\x18\x01 \x03(\x0b\x32<.google.cloud.aiplatform.container.v1.MatchResponse.Neighbor\x12\x43\n\nembeddings\x18\x02 \x03(\x0b\x32/.google.cloud.aiplatform.container.v1.Embedding\x1a]\n\x08Neighbor\x12\n\n\x02id\x18\x01 \x01(\t\x12\x10\n\x08\x64istance\x18\x02 \x01(\x01\x12\x17\n\x0fsparse_distance\x18\x04 \x01(\x01\x12\x1a\n\x12\x63rowding_attribute\x18\x03 \x01(\x03"B\n\x19\x42\x61tchGetEmbeddingsRequest\x12\x19\n\x11\x64\x65ployed_index_id\x18\x01 \x01(\t\x12\n\n\x02id\x18\x02 \x03(\t"a\n\x1a\x42\x61tchGetEmbeddingsResponse\x12\x43\n\nembeddings\x18\x01 \x03(\x0b\x32/.google.cloud.aiplatform.container.v1.Embedding"\x95\x02\n\x11\x42\x61tchMatchRequest\x12\x63\n\x08requests\x18\x01 \x03(\x0b\x32Q.google.cloud.aiplatform.container.v1.BatchMatchRequest.BatchMatchRequestPerIndex\x1a\x9a\x01\n\x19\x42\x61tchMatchRequestPerIndex\x12\x19\n\x11\x64\x65ployed_index_id\x18\x01 \x01(\t\x12\x44\n\x08requests\x18\x02 \x03(\x0b\x32\x32.google.cloud.aiplatform.container.v1.MatchRequest\x12\x1c\n\x14low_level_batch_size\x18\x03 \x01(\x05"\xa2\x02\n\x12\x42\x61tchMatchResponse\x12\x66\n\tresponses\x18\x01 \x03(\x0b\x32S.google.cloud.aiplatform.container.v1.BatchMatchResponse.BatchMatchResponsePerIndex\x1a\xa3\x01\n\x1a\x42\x61tchMatchResponsePerIndex\x12\x19\n\x11\x64\x65ployed_index_id\x18\x01 \x01(\t\x12\x46\n\tresponses\x18\x02 \x03(\x0b\x32\x33.google.cloud.aiplatform.container.v1.MatchResponse\x12"\n\x06status\x18\x03 \x01(\x0b\x32\x12.google.rpc.Status"D\n\tNamespace\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x14\n\x0c\x61llow_tokens\x18\x02 \x03(\t\x12\x13\n\x0b\x64\x65ny_tokens\x18\x03 \x03(\t"\xb4\x02\n\x10NumericNamespace\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x13\n\tvalue_int\x18\x02 \x01(\x03H\x00\x12\x15\n\x0bvalue_float\x18\x03 \x01(\x02H\x00\x12\x16\n\x0cvalue_double\x18\x04 \x01(\x01H\x00\x12K\n\x02op\x18\x05 \x01(\x0e\x32?.google.cloud.aiplatform.container.v1.NumericNamespace.Operator"x\n\x08Operator\x12\x18\n\x14OPERATOR_UNSPECIFIED\x10\x00\x12\x08\n\x04LESS\x10\x01\x12\x0e\n\nLESS_EQUAL\x10\x02\x12\t\n\x05\x45QUAL\x10\x03\x12\x11\n\rGREATER_EQUAL\x10\x04\x12\x0b\n\x07GREATER\x10\x05\x12\r\n\tNOT_EQUAL\x10\x06\x42\x07\n\x05Value2\xa2\x03\n\x0cMatchService\x12r\n\x05Match\x12\x32.google.cloud.aiplatform.container.v1.MatchRequest\x1a\x33.google.cloud.aiplatform.container.v1.MatchResponse"\x00\x12\x81\x01\n\nBatchMatch\x12\x37.google.cloud.aiplatform.container.v1.BatchMatchRequest\x1a\x38.google.cloud.aiplatform.container.v1.BatchMatchResponse"\x00\x12\x99\x01\n\x12\x42\x61tchGetEmbeddings\x12?.google.cloud.aiplatform.container.v1.BatchGetEmbeddingsRequest\x1a@.google.cloud.aiplatform.container.v1.BatchGetEmbeddingsResponse"\x00\x62\x06proto3'
3636
)
3737

3838

39+
_SPARSEEMBEDDING = DESCRIPTOR.message_types_by_name["SparseEmbedding"]
3940
_MATCHREQUEST = DESCRIPTOR.message_types_by_name["MatchRequest"]
40-
_MATCHREQUEST_SPARSEEMBEDDING = _MATCHREQUEST.nested_types_by_name["SparseEmbedding"]
4141
_MATCHREQUEST_RRF = _MATCHREQUEST.nested_types_by_name["RRF"]
4242
_EMBEDDING = DESCRIPTOR.message_types_by_name["Embedding"]
4343
_MATCHRESPONSE = DESCRIPTOR.message_types_by_name["MatchResponse"]
@@ -59,19 +59,21 @@
5959
_NAMESPACE = DESCRIPTOR.message_types_by_name["Namespace"]
6060
_NUMERICNAMESPACE = DESCRIPTOR.message_types_by_name["NumericNamespace"]
6161
_NUMERICNAMESPACE_OPERATOR = _NUMERICNAMESPACE.enum_types_by_name["Operator"]
62+
SparseEmbedding = _reflection.GeneratedProtocolMessageType(
63+
"SparseEmbedding",
64+
(_message.Message,),
65+
{
66+
"DESCRIPTOR": _SPARSEEMBEDDING,
67+
"__module__": "google.cloud.aiplatform.matching_engine._protos.match_service_pb2"
68+
# @@protoc_insertion_point(class_scope:google.cloud.aiplatform.container.v1.SparseEmbedding)
69+
},
70+
)
71+
_sym_db.RegisterMessage(SparseEmbedding)
72+
6273
MatchRequest = _reflection.GeneratedProtocolMessageType(
6374
"MatchRequest",
6475
(_message.Message,),
6576
{
66-
"SparseEmbedding": _reflection.GeneratedProtocolMessageType(
67-
"SparseEmbedding",
68-
(_message.Message,),
69-
{
70-
"DESCRIPTOR": _MATCHREQUEST_SPARSEEMBEDDING,
71-
"__module__": "google.cloud.aiplatform.matching_engine._protos.match_service_pb2"
72-
# @@protoc_insertion_point(class_scope:google.cloud.aiplatform.container.v1.MatchRequest.SparseEmbedding)
73-
},
74-
),
7577
"RRF": _reflection.GeneratedProtocolMessageType(
7678
"RRF",
7779
(_message.Message,),
@@ -87,7 +89,6 @@
8789
},
8890
)
8991
_sym_db.RegisterMessage(MatchRequest)
90-
_sym_db.RegisterMessage(MatchRequest.SparseEmbedding)
9192
_sym_db.RegisterMessage(MatchRequest.RRF)
9293

9394
Embedding = _reflection.GeneratedProtocolMessageType(
@@ -212,36 +213,36 @@
212213
if _descriptor._USE_C_DESCRIPTORS == False:
213214

214215
DESCRIPTOR._options = None
215-
_MATCHREQUEST._serialized_start = 135
216-
_MATCHREQUEST._serialized_end = 844
217-
_MATCHREQUEST_SPARSEEMBEDDING._serialized_start = 756
218-
_MATCHREQUEST_SPARSEEMBEDDING._serialized_end = 811
219-
_MATCHREQUEST_RRF._serialized_start = 813
220-
_MATCHREQUEST_RRF._serialized_end = 833
221-
_EMBEDDING._serialized_start = 847
222-
_EMBEDDING._serialized_end = 1068
223-
_MATCHRESPONSE._serialized_start = 1071
224-
_MATCHRESPONSE._serialized_end = 1330
225-
_MATCHRESPONSE_NEIGHBOR._serialized_start = 1237
226-
_MATCHRESPONSE_NEIGHBOR._serialized_end = 1330
227-
_BATCHGETEMBEDDINGSREQUEST._serialized_start = 1332
228-
_BATCHGETEMBEDDINGSREQUEST._serialized_end = 1398
229-
_BATCHGETEMBEDDINGSRESPONSE._serialized_start = 1400
230-
_BATCHGETEMBEDDINGSRESPONSE._serialized_end = 1497
231-
_BATCHMATCHREQUEST._serialized_start = 1500
232-
_BATCHMATCHREQUEST._serialized_end = 1777
233-
_BATCHMATCHREQUEST_BATCHMATCHREQUESTPERINDEX._serialized_start = 1623
234-
_BATCHMATCHREQUEST_BATCHMATCHREQUESTPERINDEX._serialized_end = 1777
235-
_BATCHMATCHRESPONSE._serialized_start = 1780
236-
_BATCHMATCHRESPONSE._serialized_end = 2070
237-
_BATCHMATCHRESPONSE_BATCHMATCHRESPONSEPERINDEX._serialized_start = 1907
238-
_BATCHMATCHRESPONSE_BATCHMATCHRESPONSEPERINDEX._serialized_end = 2070
239-
_NAMESPACE._serialized_start = 2072
240-
_NAMESPACE._serialized_end = 2140
241-
_NUMERICNAMESPACE._serialized_start = 2143
242-
_NUMERICNAMESPACE._serialized_end = 2451
243-
_NUMERICNAMESPACE_OPERATOR._serialized_start = 2322
244-
_NUMERICNAMESPACE_OPERATOR._serialized_end = 2442
245-
_MATCHSERVICE._serialized_start = 2454
246-
_MATCHSERVICE._serialized_end = 2872
216+
_SPARSEEMBEDDING._serialized_start = 134
217+
_SPARSEEMBEDDING._serialized_end = 189
218+
_MATCHREQUEST._serialized_start = 192
219+
_MATCHREQUEST._serialized_end = 831
220+
_MATCHREQUEST_RRF._serialized_start = 800
221+
_MATCHREQUEST_RRF._serialized_end = 820
222+
_EMBEDDING._serialized_start = 834
223+
_EMBEDDING._serialized_end = 1136
224+
_MATCHRESPONSE._serialized_start = 1139
225+
_MATCHRESPONSE._serialized_end = 1398
226+
_MATCHRESPONSE_NEIGHBOR._serialized_start = 1305
227+
_MATCHRESPONSE_NEIGHBOR._serialized_end = 1398
228+
_BATCHGETEMBEDDINGSREQUEST._serialized_start = 1400
229+
_BATCHGETEMBEDDINGSREQUEST._serialized_end = 1466
230+
_BATCHGETEMBEDDINGSRESPONSE._serialized_start = 1468
231+
_BATCHGETEMBEDDINGSRESPONSE._serialized_end = 1565
232+
_BATCHMATCHREQUEST._serialized_start = 1568
233+
_BATCHMATCHREQUEST._serialized_end = 1845
234+
_BATCHMATCHREQUEST_BATCHMATCHREQUESTPERINDEX._serialized_start = 1691
235+
_BATCHMATCHREQUEST_BATCHMATCHREQUESTPERINDEX._serialized_end = 1845
236+
_BATCHMATCHRESPONSE._serialized_start = 1848
237+
_BATCHMATCHRESPONSE._serialized_end = 2138
238+
_BATCHMATCHRESPONSE_BATCHMATCHRESPONSEPERINDEX._serialized_start = 1975
239+
_BATCHMATCHRESPONSE_BATCHMATCHRESPONSEPERINDEX._serialized_end = 2138
240+
_NAMESPACE._serialized_start = 2140
241+
_NAMESPACE._serialized_end = 2208
242+
_NUMERICNAMESPACE._serialized_start = 2211
243+
_NUMERICNAMESPACE._serialized_end = 2519
244+
_NUMERICNAMESPACE_OPERATOR._serialized_start = 2390
245+
_NUMERICNAMESPACE_OPERATOR._serialized_end = 2510
246+
_MATCHSERVICE._serialized_start = 2522
247+
_MATCHSERVICE._serialized_end = 2940
247248
# @@protoc_insertion_point(module_scope)

0 commit comments

Comments
 (0)