Skip to content

Commit

Permalink
fix: improve retry logic for streaming API calls (#4942)
Browse files Browse the repository at this point in the history
* fix: Fix rpc tensorboard_service.proto definitions for BatchCreateTensorboardTimeSeries and BatchReadTensorboardTimeSeriesData
feat: add models to CustomJobSpec
feat: add max_wait_duration to Scheduling
docs: minor changes to comments

PiperOrigin-RevId: 597666793

Source-Link: googleapis/googleapis@84ee19c

Source-Link: googleapis/googleapis-gen@8dc3e3e
Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLWFpcGxhdGZvcm0vLk93bEJvdC55YW1sIiwiaCI6IjhkYzNlM2UzMjA0M2FjZDY4OTNiZWQ5NmE2YjQ1NjZmMDA4NDMzMjkifQ==

* fix!: Fix rpc tensorboard_service.proto definitions for BatchCreateTensorboardTimeSeries and BatchReadTensorboardTimeSeriesData
feat: add models to CustomJobSpec
feat: add max_wait_duration to Scheduling
feat: add CountTokens method to llm_utility_service
docs: minor changes to comments

PiperOrigin-RevId: 597667108

Source-Link: googleapis/googleapis@714ab03

Source-Link: googleapis/googleapis-gen@3ff71b3
Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLWFpcGxhdGZvcm0vLk93bEJvdC55YW1sIiwiaCI6IjNmZjcxYjM5ZDJhZDJlZWI1MTEzOTQwYzVkZTU1OTNkYTA1MjdiMjYifQ==

* 🦉 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

* 🦉 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

* fix: improve retry logic for streaming API calls
build: update typescript generator version to 4.3.0

The streaming API call retry logic has changed, which in some rare cases may require code changes. Please feel free to reach out to us in the issues if you experience new problems with retrying streaming calls after this update.

PiperOrigin-RevId: 599622271

Source-Link: googleapis/googleapis@6239c21

Source-Link: googleapis/googleapis-gen@da13d82
Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLWFpcGxhdGZvcm0vLk93bEJvdC55YW1sIiwiaCI6ImRhMTNkODIyMmQzYmEzMzczNDUwMTk5OTg2NDQ1ODY0MGYxNDA1YWUifQ==

* 🦉 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>
Co-authored-by: sofisl <[email protected]>
  • Loading branch information
3 people authored Jan 23, 2024
1 parent 7fbf16c commit 0bca99d
Show file tree
Hide file tree
Showing 73 changed files with 53,572 additions and 48,020 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 @@ -495,6 +495,7 @@ Samples are in the [`samples/`](https://github.com/googleapis/google-cloud-node/
| Job_service.search_model_deployment_monitoring_stats_anomalies | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/job_service.search_model_deployment_monitoring_stats_anomalies.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/job_service.search_model_deployment_monitoring_stats_anomalies.js,packages/google-cloud-aiplatform/samples/README.md) |
| Job_service.update_model_deployment_monitoring_job | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/job_service.update_model_deployment_monitoring_job.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/job_service.update_model_deployment_monitoring_job.js,packages/google-cloud-aiplatform/samples/README.md) |
| Llm_utility_service.compute_tokens | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/llm_utility_service.compute_tokens.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/llm_utility_service.compute_tokens.js,packages/google-cloud-aiplatform/samples/README.md) |
| Llm_utility_service.count_tokens | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/llm_utility_service.count_tokens.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/llm_utility_service.count_tokens.js,packages/google-cloud-aiplatform/samples/README.md) |
| Match_service.find_neighbors | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/match_service.find_neighbors.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/match_service.find_neighbors.js,packages/google-cloud-aiplatform/samples/README.md) |
| Match_service.read_index_datapoints | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/match_service.read_index_datapoints.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/match_service.read_index_datapoints.js,packages/google-cloud-aiplatform/samples/README.md) |
| Metadata_service.add_context_artifacts_and_executions | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/metadata_service.add_context_artifacts_and_executions.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/metadata_service.add_context_artifacts_and_executions.js,packages/google-cloud-aiplatform/samples/README.md) |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -242,6 +242,26 @@ message CustomJobSpec {
type: "aiplatform.googleapis.com/Context"
}
];

// Optional. The name of the Model resources for which to generate a mapping
// to artifact URIs. Applicable only to some of the Google-provided custom
// jobs. Format: `projects/{project}/locations/{location}/models/{model}`
//
// In order to retrieve a specific version of the model, also provide
// the version ID or version alias.
// Example: `projects/{project}/locations/{location}/models/{model}@2`
// or
// `projects/{project}/locations/{location}/models/{model}@golden`
// If no version ID or alias is specified, the "default" version will be
// returned. The "default" version alias is created for the first version of
// the model, and can be moved to other versions later on. There will be
// exactly one default version.
repeated string models = 20 [
(google.api.field_behavior) = OPTIONAL,
(google.api.resource_reference) = {
type: "aiplatform.googleapis.com/Model"
}
];
}

// Represents the spec of a worker pool in a job.
Expand Down Expand Up @@ -329,4 +349,9 @@ message Scheduling {
// job starts running. If true, overrides
// `Scheduling.restart_job_on_worker_restart` to false.
bool disable_retries = 5 [(google.api.field_behavior) = OPTIONAL];

// Optional. This is the maximum time a user will wait in the QRM queue for
// resources. Default is 1 day
google.protobuf.Duration max_wait_duration = 6
[(google.api.field_behavior) = OPTIONAL];
}
Original file line number Diff line number Diff line change
Expand Up @@ -414,8 +414,9 @@ message ExportDataRequest {
// [DatasetService.ExportData][google.cloud.aiplatform.v1.DatasetService.ExportData].
message ExportDataResponse {
// All of the files that are exported in this export operation. For custom
// code training export, only three (training, validation and test) GCS paths
// in wildcard format are populated (e.g., gs://.../training-*).
// code training export, only three (training, validation and test)
// Cloud Storage paths in wildcard format are populated
// (for example, gs://.../training-*).
repeated string exported_files = 1;

// Only present for custom code training export use case. Records data stats,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ message Feature {
[(google.api.field_behavior) = OUTPUT_ONLY];

// Only applicable for Vertex AI Feature Store.
// The name of the BigQuery Table/View columnn hosting data for this version.
// The name of the BigQuery Table/View column hosting data for this version.
// If no value is provided, will use feature_id.
string version_column_name = 106;
}
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ service FeatureOnlineStoreAdminService {
message CreateFeatureOnlineStoreRequest {
// Required. The resource name of the Location to create FeatureOnlineStores.
// Format:
// `projects/{project}/locations/{location}'`
// `projects/{project}/locations/{location}`
string parent = 1 [
(google.api.field_behavior) = REQUIRED,
(google.api.resource_reference) = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,6 @@ message ModelEvaluation {
// The metadata of the ModelEvaluation.
// For the ModelEvaluation uploaded from Managed Pipeline, metadata contains a
// structured value with keys of "pipeline_job_id", "evaluation_dataset_type",
// "evaluation_dataset_path".
// "evaluation_dataset_path", "row_based_metrics_path".
google.protobuf.Value metadata = 11;
}
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ service TensorboardService {
rpc BatchCreateTensorboardTimeSeries(BatchCreateTensorboardTimeSeriesRequest)
returns (BatchCreateTensorboardTimeSeriesResponse) {
option (google.api.http) = {
post: "/v1/{parent=projects/*/locations/*/tensorboards/*/experiments/*}/runs/*/timeSeries:batchCreate"
post: "/v1/{parent=projects/*/locations/*/tensorboards/*/experiments/*}:batchCreate"
body: "*"
};
option (google.api.method_signature) = "parent,requests";
Expand Down Expand Up @@ -305,7 +305,7 @@ service TensorboardService {
BatchReadTensorboardTimeSeriesDataRequest)
returns (BatchReadTensorboardTimeSeriesDataResponse) {
option (google.api.http) = {
get: "/v1/{tensorboard=projects/*/locations/*/tensorboards/*}/experiments/*/runs/*/timeSeries:batchRead"
get: "/v1/{tensorboard=projects/*/locations/*/tensorboards/*}:batchRead"
};
option (google.api.method_signature) = "tensorboard";
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -256,6 +256,26 @@ message CustomJobSpec {
type: "aiplatform.googleapis.com/Context"
}
];

// Optional. The name of the Model resources for which to generate a mapping
// to artifact URIs. Applicable only to some of the Google-provided custom
// jobs. Format: `projects/{project}/locations/{location}/models/{model}`
//
// In order to retrieve a specific version of the model, also provide
// the version ID or version alias.
// Example: `projects/{project}/locations/{location}/models/{model}@2`
// or
// `projects/{project}/locations/{location}/models/{model}@golden`
// If no version ID or alias is specified, the "default" version will be
// returned. The "default" version alias is created for the first version of
// the model, and can be moved to other versions later on. There will be
// exactly one default version.
repeated string models = 20 [
(google.api.field_behavior) = OPTIONAL,
(google.api.resource_reference) = {
type: "aiplatform.googleapis.com/Model"
}
];
}

// Represents the spec of a worker pool in a job.
Expand Down Expand Up @@ -343,4 +363,9 @@ message Scheduling {
// job starts running. If true, overrides
// `Scheduling.restart_job_on_worker_restart` to false.
bool disable_retries = 5 [(google.api.field_behavior) = OPTIONAL];

// Optional. This is the maximum time a user will wait in the QRM queue for
// resources. Default is 1 day
google.protobuf.Duration max_wait_duration = 6
[(google.api.field_behavior) = OPTIONAL];
}
Original file line number Diff line number Diff line change
Expand Up @@ -413,8 +413,9 @@ message ExportDataRequest {
// [DatasetService.ExportData][google.cloud.aiplatform.v1beta1.DatasetService.ExportData].
message ExportDataResponse {
// All of the files that are exported in this export operation. For custom
// code training export, only three (training, validation and test) GCS paths
// in wildcard format are populated (e.g., gs://.../training-*).
// code training export, only three (training, validation and test)
// Cloud Storage paths in wildcard format are populated
// (for example, gs://.../training-*).
repeated string exported_files = 1;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ message Feature {
[(google.api.field_behavior) = OUTPUT_ONLY];

// Only applicable for Vertex AI Feature Store.
// The name of the BigQuery Table/View columnn hosting data for this version.
// The name of the BigQuery Table/View column hosting data for this version.
// If no value is provided, will use feature_id.
string version_column_name = 106;
}
Original file line number Diff line number Diff line change
Expand Up @@ -66,15 +66,18 @@ message FeatureOnlineStore {

// The dedicated serving endpoint for this FeatureOnlineStore. Only need to
// set when you choose Optimized storage type or enable EmbeddingManagement.
// Will use public endpoint by default.
// Will use public endpoint by default. Note, for EmbeddingManagement use
// case, only [DedicatedServingEndpoint.public_endpoint_domain_name] is
// available now.
message DedicatedServingEndpoint {
// Output only. This field will be populated with the domain name to use for
// this FeatureOnlineStore
string public_endpoint_domain_name = 2
[(google.api.field_behavior) = OUTPUT_ONLY];

// Optional. Private service connect config.
// If
// Optional. Private service connect config. The private service connection
// is available only for Optimized storage type, not for embedding
// management now. If
// [PrivateServiceConnectConfig.enable_private_service_connect][google.cloud.aiplatform.v1beta1.PrivateServiceConnectConfig.enable_private_service_connect]
// set to true, customers will use private service connection to send
// request. Otherwise, the connection will set to public endpoint.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ service FeatureOnlineStoreAdminService {
message CreateFeatureOnlineStoreRequest {
// Required. The resource name of the Location to create FeatureOnlineStores.
// Format:
// `projects/{project}/locations/{location}'`
// `projects/{project}/locations/{location}`
string parent = 1 [
(google.api.field_behavior) = REQUIRED,
(google.api.resource_reference) = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import "google/api/annotations.proto";
import "google/api/client.proto";
import "google/api/field_behavior.proto";
import "google/api/resource.proto";
import "google/cloud/aiplatform/v1beta1/prediction_service.proto";
import "google/protobuf/struct.proto";

option csharp_namespace = "Google.Cloud.AIPlatform.V1Beta1";
Expand All @@ -36,6 +37,19 @@ service LlmUtilityService {
option (google.api.oauth_scopes) =
"https://www.googleapis.com/auth/cloud-platform";

// Perform a token counting.
rpc CountTokens(CountTokensRequest) returns (CountTokensResponse) {
option (google.api.http) = {
post: "/v1beta1/{endpoint=projects/*/locations/*/endpoints/*}:countTokens"
body: "*"
additional_bindings {
post: "/v1beta1/{endpoint=projects/*/locations/*/publishers/*/models/*}:countTokens"
body: "*"
}
};
option (google.api.method_signature) = "endpoint,instances";
}

// Return a list of tokens based on the input text.
rpc ComputeTokens(ComputeTokensRequest) returns (ComputeTokensResponse) {
option (google.api.http) = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ message ModelEvaluation {
// The metadata of the ModelEvaluation.
// For the ModelEvaluation uploaded from Managed Pipeline, metadata contains a
// structured value with keys of "pipeline_job_id", "evaluation_dataset_type",
// "evaluation_dataset_path".
// "evaluation_dataset_path", "row_based_metrics_path".
google.protobuf.Value metadata = 11;

// Specify the configuration for bias detection.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,14 +50,14 @@ message PersistentResource {
// created.
PROVISIONING = 1;

// The RUNNING state indicates the persistent resources is healthy and fully
// The RUNNING state indicates the persistent resource is healthy and fully
// usable.
RUNNING = 3;

// The STOPPING state indicates the persistent resources is being deleted.
// The STOPPING state indicates the persistent resource is being deleted.
STOPPING = 4;

// The ERROR state indicates the persistent resources may be unusable.
// The ERROR state indicates the persistent resource may be unusable.
// Details can be found in the `error` field.
ERROR = 5;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ service TensorboardService {
rpc BatchCreateTensorboardTimeSeries(BatchCreateTensorboardTimeSeriesRequest)
returns (BatchCreateTensorboardTimeSeriesResponse) {
option (google.api.http) = {
post: "/v1beta1/{parent=projects/*/locations/*/tensorboards/*/experiments/*}/runs/*/timeSeries:batchCreate"
post: "/v1beta1/{parent=projects/*/locations/*/tensorboards/*/experiments/*}:batchCreate"
body: "*"
};
option (google.api.method_signature) = "parent,requests";
Expand Down Expand Up @@ -304,7 +304,7 @@ service TensorboardService {
BatchReadTensorboardTimeSeriesDataRequest)
returns (BatchReadTensorboardTimeSeriesDataResponse) {
option (google.api.http) = {
get: "/v1beta1/{tensorboard=projects/*/locations/*/tensorboards/*}/experiments/*/runs/*/timeSeries:batchRead"
get: "/v1beta1/{tensorboard=projects/*/locations/*/tensorboards/*}:batchRead"
};
option (google.api.method_signature) = "tensorboard";
}
Expand Down
Loading

0 comments on commit 0bca99d

Please sign in to comment.