Skip to content

Commit d81d0b9

Browse files
Google APIscopybara-github
authored andcommitted
feat: Add Optimized feature store proto
feat: Add data_key field in feature online store service feat: Add dedicated_serving_endpoint feat: Add index_config field PiperOrigin-RevId: 618280080
1 parent 0bf3720 commit d81d0b9

3 files changed

Lines changed: 115 additions & 0 deletions

File tree

google/cloud/aiplatform/v1/feature_online_store.proto

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,19 @@ message FeatureOnlineStore {
6060
AutoScaling auto_scaling = 1 [(google.api.field_behavior) = REQUIRED];
6161
}
6262

63+
// Optimized storage type
64+
message Optimized {}
65+
66+
// The dedicated serving endpoint for this FeatureOnlineStore. Only need to
67+
// set when you choose Optimized storage type. Public endpoint is provisioned
68+
// by default.
69+
message DedicatedServingEndpoint {
70+
// Output only. This field will be populated with the domain name to use for
71+
// this FeatureOnlineStore
72+
string public_endpoint_domain_name = 2
73+
[(google.api.field_behavior) = OUTPUT_ONLY];
74+
}
75+
6376
// Possible states a featureOnlineStore can have.
6477
enum State {
6578
// Default value. This value is unused.
@@ -82,6 +95,13 @@ message FeatureOnlineStore {
8295
// to serve featureValues for all FeatureViews under this
8396
// FeatureOnlineStore.
8497
Bigtable bigtable = 8;
98+
99+
// Contains settings for the Optimized store that will be created
100+
// to serve featureValues for all FeatureViews under this
101+
// FeatureOnlineStore. When choose Optimized storage type, need to set
102+
// [PrivateServiceConnectConfig.enable_private_service_connect][google.cloud.aiplatform.v1.PrivateServiceConnectConfig.enable_private_service_connect]
103+
// to use private endpoint. Otherwise will use public endpoint by default.
104+
Optimized optimized = 12;
85105
}
86106

87107
// Identifier. Name of the FeatureOnlineStore. Format:
@@ -115,4 +135,9 @@ message FeatureOnlineStore {
115135

116136
// Output only. State of the featureOnlineStore.
117137
State state = 7 [(google.api.field_behavior) = OUTPUT_ONLY];
138+
139+
// Optional. The dedicated serving endpoint for this FeatureOnlineStore, which
140+
// is different from common Vertex service endpoint.
141+
DedicatedServingEndpoint dedicated_serving_endpoint = 10
142+
[(google.api.field_behavior) = OPTIONAL];
118143
}

google/cloud/aiplatform/v1/feature_online_store_service.proto

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,11 @@ message FetchFeatureValuesResponse {
141141
// Feature values in proto Struct format.
142142
google.protobuf.Struct proto_struct = 2;
143143
}
144+
145+
// The data key associated with this response.
146+
// Will only be populated for
147+
// [FeatureOnlineStoreService.StreamingFetchFeatureValues][] RPCs.
148+
FeatureViewDataKey data_key = 4;
144149
}
145150

146151
// A query to find a number of similar entities.

google/cloud/aiplatform/v1/feature_view.proto

Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,85 @@ message FeatureView {
5757
string cron = 1;
5858
}
5959

60+
// Configuration for vector indexing.
61+
message IndexConfig {
62+
// Configuration options for using brute force search.
63+
message BruteForceConfig {}
64+
65+
// Configuration options for the tree-AH algorithm.
66+
message TreeAHConfig {
67+
// Optional. Number of embeddings on each leaf node. The default value is
68+
// 1000 if not set.
69+
optional int64 leaf_node_embedding_count = 1
70+
[(google.api.field_behavior) = OPTIONAL];
71+
}
72+
73+
// The distance measure used in nearest neighbor search.
74+
enum DistanceMeasureType {
75+
// Should not be set.
76+
DISTANCE_MEASURE_TYPE_UNSPECIFIED = 0;
77+
78+
// Euclidean (L_2) Distance.
79+
SQUARED_L2_DISTANCE = 1;
80+
81+
// Cosine Distance. Defined as 1 - cosine similarity.
82+
//
83+
// We strongly suggest using DOT_PRODUCT_DISTANCE + UNIT_L2_NORM instead
84+
// of COSINE distance. Our algorithms have been more optimized for
85+
// DOT_PRODUCT distance which, when combined with UNIT_L2_NORM, is
86+
// mathematically equivalent to COSINE distance and results in the same
87+
// ranking.
88+
COSINE_DISTANCE = 2;
89+
90+
// Dot Product Distance. Defined as a negative of the dot product.
91+
DOT_PRODUCT_DISTANCE = 3;
92+
}
93+
94+
// The configuration with regard to the algorithms used for efficient
95+
// search.
96+
oneof algorithm_config {
97+
// Optional. Configuration options for the tree-AH algorithm (Shallow tree
98+
// + Asymmetric Hashing). Please refer to this paper for more details:
99+
// https://arxiv.org/abs/1908.10396
100+
TreeAHConfig tree_ah_config = 6 [(google.api.field_behavior) = OPTIONAL];
101+
102+
// Optional. Configuration options for using brute force search, which
103+
// simply implements the standard linear search in the database for each
104+
// query. It is primarily meant for benchmarking and to generate the
105+
// ground truth for approximate search.
106+
BruteForceConfig brute_force_config = 7
107+
[(google.api.field_behavior) = OPTIONAL];
108+
}
109+
110+
// Optional. Column of embedding. This column contains the source data to
111+
// create index for vector search. embedding_column must be set when using
112+
// vector search.
113+
string embedding_column = 1 [(google.api.field_behavior) = OPTIONAL];
114+
115+
// Optional. Columns of features that're used to filter vector search
116+
// results.
117+
repeated string filter_columns = 2 [(google.api.field_behavior) = OPTIONAL];
118+
119+
// Optional. Column of crowding. This column contains crowding attribute
120+
// which is a constraint on a neighbor list produced by
121+
// [FeatureOnlineStoreService.SearchNearestEntities][google.cloud.aiplatform.v1.FeatureOnlineStoreService.SearchNearestEntities]
122+
// to diversify search results. If
123+
// [NearestNeighborQuery.per_crowding_attribute_neighbor_count][google.cloud.aiplatform.v1.NearestNeighborQuery.per_crowding_attribute_neighbor_count]
124+
// is set to K in
125+
// [SearchNearestEntitiesRequest][google.cloud.aiplatform.v1.SearchNearestEntitiesRequest],
126+
// it's guaranteed that no more than K entities of the same crowding
127+
// attribute are returned in the response.
128+
string crowding_column = 3 [(google.api.field_behavior) = OPTIONAL];
129+
130+
// Optional. The number of dimensions of the input embedding.
131+
optional int32 embedding_dimension = 4
132+
[(google.api.field_behavior) = OPTIONAL];
133+
134+
// Optional. The distance measure used in nearest neighbor search.
135+
DistanceMeasureType distance_measure_type = 5
136+
[(google.api.field_behavior) = OPTIONAL];
137+
}
138+
60139
// A Feature Registry source for features that need to be synced to Online
61140
// Store.
62141
message FeatureRegistrySource {
@@ -123,4 +202,10 @@ message FeatureView {
123202
// end of the sync the latest featureValues for each entityId of this
124203
// FeatureView are made ready for online serving.
125204
SyncConfig sync_config = 7;
205+
206+
// Optional. Configuration for index preparation for vector search. It
207+
// contains the required configurations to create an index from source data,
208+
// so that approximate nearest neighbor (a.k.a ANN) algorithms search can be
209+
// performed during online serving.
210+
IndexConfig index_config = 15 [(google.api.field_behavior) = OPTIONAL];
126211
}

0 commit comments

Comments
 (0)