Skip to content

Commit

Permalink
feat: add v1beta1 StreamingFetchFeatureValues API (#5128)
Browse files Browse the repository at this point in the history
* feat: add v1beta1 StreamingFetchFeatureValues API

PiperOrigin-RevId: 615281865

Source-Link: googleapis/googleapis@f9f3c04

Source-Link: googleapis/googleapis-gen@1351a69
Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLWFpcGxhdGZvcm0vLk93bEJvdC55YW1sIiwiaCI6IjEzNTFhNjk4MWM5MDFjMjljNDQ2YmIzYzlkMDgzYzBlN2RiODUxMDgifQ==

* 🦉 Updates from OwlBot post-processor

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

* 🦉 Updates from OwlBot post-processor

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

---------

Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
  • Loading branch information
gcf-owl-bot[bot] and gcf-owl-bot[bot] authored Mar 13, 2024
1 parent 753f434 commit 4849a58
Show file tree
Hide file tree
Showing 12 changed files with 1,330 additions and 2 deletions.
1 change: 1 addition & 0 deletions packages/google-cloud-aiplatform/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -417,6 +417,7 @@ Samples are in the [`samples/`](https://github.com/googleapis/google-cloud-node/
| Feature_online_store_admin_service.update_feature_view | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/feature_online_store_admin_service.update_feature_view.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/feature_online_store_admin_service.update_feature_view.js,packages/google-cloud-aiplatform/samples/README.md) |
| Feature_online_store_service.fetch_feature_values | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/feature_online_store_service.fetch_feature_values.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/feature_online_store_service.fetch_feature_values.js,packages/google-cloud-aiplatform/samples/README.md) |
| Feature_online_store_service.search_nearest_entities | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/feature_online_store_service.search_nearest_entities.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/feature_online_store_service.search_nearest_entities.js,packages/google-cloud-aiplatform/samples/README.md) |
| Feature_online_store_service.streaming_fetch_feature_values | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/feature_online_store_service.streaming_fetch_feature_values.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/feature_online_store_service.streaming_fetch_feature_values.js,packages/google-cloud-aiplatform/samples/README.md) |
| Feature_registry_service.create_feature | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/feature_registry_service.create_feature.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/feature_registry_service.create_feature.js,packages/google-cloud-aiplatform/samples/README.md) |
| Feature_registry_service.create_feature_group | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/feature_registry_service.create_feature_group.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/feature_registry_service.create_feature_group.js,packages/google-cloud-aiplatform/samples/README.md) |
| Feature_registry_service.delete_feature | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/feature_registry_service.delete_feature.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-aiplatform/samples/generated/v1beta1/feature_registry_service.delete_feature.js,packages/google-cloud-aiplatform/samples/README.md) |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import "google/api/field_behavior.proto";
import "google/api/resource.proto";
import "google/cloud/aiplatform/v1beta1/featurestore_online_service.proto";
import "google/protobuf/struct.proto";
import "google/rpc/status.proto";

option csharp_namespace = "Google.Cloud.AIPlatform.V1Beta1";
option go_package = "cloud.google.com/go/aiplatform/apiv1beta1/aiplatformpb;aiplatformpb";
Expand All @@ -47,6 +48,18 @@ service FeatureOnlineStoreService {
option (google.api.method_signature) = "feature_view, data_key";
}

// Bidirectional streaming RPC to fetch feature values under a FeatureView.
// Requests may not have a one-to-one mapping to responses and responses may
// be returned out-of-order to reduce latency.
rpc StreamingFetchFeatureValues(stream StreamingFetchFeatureValuesRequest)
returns (stream StreamingFetchFeatureValuesResponse) {
option (google.api.http) = {
post: "/v1beta1/{feature_view=projects/*/locations/*/featureOnlineStores/*/featureViews/*}:streamingFetchFeatureValues"
body: "*"
};
option (google.api.method_signature) = "feature_view, data_keys";
}

// Search the nearest entities under a FeatureView.
// Search only works for indexable feature view; if a feature view isn't
// indexable, returns Invalid argument response.
Expand Down Expand Up @@ -169,6 +182,50 @@ message FetchFeatureValuesResponse {
// Feature values in proto Struct format.
google.protobuf.Struct proto_struct = 2;
}

// The data key associated with this response.
// Will only be populated for
// [FeatureOnlineStoreService.StreamingFetchFeatureValues][google.cloud.aiplatform.v1beta1.FeatureOnlineStoreService.StreamingFetchFeatureValues]
// RPCs.
FeatureViewDataKey data_key = 4;
}

// Request message for
// [FeatureOnlineStoreService.StreamingFetchFeatureValues][google.cloud.aiplatform.v1beta1.FeatureOnlineStoreService.StreamingFetchFeatureValues].
// For the entities requested, all features under the requested feature view
// will be returned.
message StreamingFetchFeatureValuesRequest {
// Required. FeatureView resource format
// `projects/{project}/locations/{location}/featureOnlineStores/{featureOnlineStore}/featureViews/{featureView}`
string feature_view = 1 [
(google.api.field_behavior) = REQUIRED,
(google.api.resource_reference) = {
type: "aiplatform.googleapis.com/FeatureView"
}
];

repeated FeatureViewDataKey data_keys = 2;

// Specify response data format. If not set, KeyValue format will be used.
FeatureViewDataFormat data_format = 3;
}

// Response message for
// [FeatureOnlineStoreService.StreamingFetchFeatureValues][google.cloud.aiplatform.v1beta1.FeatureOnlineStoreService.StreamingFetchFeatureValues].
message StreamingFetchFeatureValuesResponse {
// Response status.
// If OK, then
// [StreamingFetchFeatureValuesResponse.data][google.cloud.aiplatform.v1beta1.StreamingFetchFeatureValuesResponse.data]
// will be populated. Otherwise
// [StreamingFetchFeatureValuesResponse.data_keys_with_error][google.cloud.aiplatform.v1beta1.StreamingFetchFeatureValuesResponse.data_keys_with_error]
// will be populated with the appropriate data keys. The error only applies to
// the listed data keys - the stream will remain open for further
// [FeatureOnlineStoreService.StreamingFetchFeatureValuesRequest][] requests.
google.rpc.Status status = 1;

repeated FetchFeatureValuesResponse data = 2;

repeated FeatureViewDataKey data_keys_with_error = 3;
}

// A query to find a number of similar entities.
Expand Down
Loading

0 comments on commit 4849a58

Please sign in to comment.