Skip to content

Commit

Permalink
fix: allow passing gax instance to client constructor (#365)
Browse files Browse the repository at this point in the history
* feat: add UpsertDatapoints and RemoveDatapoints rpcs to IndexService in aiplatform v1beta1 index_service.proto

PiperOrigin-RevId: 469481692

Source-Link: googleapis/googleapis@624cc45

Source-Link: googleapis/googleapis-gen@fd68808
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiZmQ2ODgwODEyY2FiNmIzNDM0YTdlMWQzMzlhOTk5MDc2OThmOTUwOCJ9

* feat: add UpsertDatapoints and RemoveDatapoints rpcs to IndexService in aiplatform v1 index_service.proto

PiperOrigin-RevId: 469481982

Source-Link: googleapis/googleapis@e4fe55a

Source-Link: googleapis/googleapis-gen@1ff3c40
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiMWZmM2M0MGQ4NWZlOGYxMzUzOGIwZjIyNjRkNjBmODA2ZDc0NGZkMiJ9

* 🦉 Updates from OwlBot post-processor

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

* feat: add read_mask to ListPipelineJobsRequest in aiplatform v1 pipeline_service
feat: add input_artifacts to PipelineJob.runtime_config in aiplatform v1 pipeline_job

PiperOrigin-RevId: 469843667

Source-Link: googleapis/googleapis@eb382ed

Source-Link: googleapis/googleapis-gen@7af72d7
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiN2FmNzJkNzFmMTYwNjBmMjI5Yjc3YWU3ZWRjNzRkYTVjZmI4ZWU3OSJ9

* 🦉 Updates from OwlBot post-processor

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

* feat: accept google-gax instance as a parameter

Please see the documentation of the client constructor for details.

PiperOrigin-RevId: 470332808

Source-Link: googleapis/googleapis@d4a2367

Source-Link: googleapis/googleapis-gen@e97a1ac
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiZTk3YTFhYzIwNGVhZDRmZTczNDFmOTFlNzJkYjdjNmFjNjAxNjM0MSJ9

* 🦉 Updates from OwlBot post-processor

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

* feat: add model_monitoring_stats_anomalies,model_monitoring_status to BatchPredictionJob in aiplatform v1beta1 batch_prediction_job.proto

PiperOrigin-RevId: 470845818

Source-Link: googleapis/googleapis@284389e

Source-Link: googleapis/googleapis-gen@29deb79
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiMjlkZWI3OWIwNGFlYTE2OWE1NjhlN2M1NDQ4NjgyNDNkNTE2MWRkZSJ9

* 🦉 Updates from OwlBot post-processor

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

* fix: use _gaxModule when accessing gax for bundling

PiperOrigin-RevId: 470911839

Source-Link: googleapis/googleapis@3527566

Source-Link: googleapis/googleapis-gen@f16a1d2
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiZjE2YTFkMjI0ZjAwYTYzMGVhNDNkNmE5YTFhMzFmNTY2ZjQ1Y2RlYSJ9

* 🦉 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 <55454395+sofisl@users.noreply.github.com>
Co-authored-by: gcf-merge-on-green[bot] <60162190+gcf-merge-on-green[bot]@users.noreply.github.com>
Co-authored-by: Alexander Fenster <fenster@google.com>
  • Loading branch information
5 people authored Sep 8, 2022
1 parent 29365f9 commit cdd6cc4
Show file tree
Hide file tree
Showing 70 changed files with 22,729 additions and 13,610 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -399,8 +399,7 @@ message ListSavedQueriesRequest {

// Response message for [DatasetService.ListSavedQueries][google.cloud.aiplatform.v1.DatasetService.ListSavedQueries].
message ListSavedQueriesResponse {
// A list of SavedQueries that matches the specified filter in the
// request.
// A list of SavedQueries that match the specified filter in the request.
repeated SavedQuery saved_queries = 1;

// The standard List next-page token.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -182,8 +182,8 @@ message ExplanationSpec {
// Required. Parameters that configure explaining of the Model's predictions.
ExplanationParameters parameters = 1 [(google.api.field_behavior) = REQUIRED];

// Required. Metadata describing the Model's input and output for explanation.
ExplanationMetadata metadata = 2 [(google.api.field_behavior) = REQUIRED];
// Optional. Metadata describing the Model's input and output for explanation.
ExplanationMetadata metadata = 2 [(google.api.field_behavior) = OPTIONAL];
}

// Parameters to configure explaining for Model's predictions.
Expand Down Expand Up @@ -224,7 +224,7 @@ message ExplanationParameters {
// explaining.
//
// If not populated, returns attributions for [top_k][google.cloud.aiplatform.v1.ExplanationParameters.top_k] indices of outputs.
// If neither top_k nor output_indeices is populated, returns the argmax
// If neither top_k nor output_indices is populated, returns the argmax
// index of the outputs.
//
// Only applicable to Models that predict multiple outputs (e,g, multi-class
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,21 @@ message Index {
pattern: "projects/{project}/locations/{location}/indexes/{index}"
};

// The update method of an Index.
enum IndexUpdateMethod {
// Should not be used.
INDEX_UPDATE_METHOD_UNSPECIFIED = 0;

// BatchUpdate: user can call UpdateIndex with files on Cloud Storage of
// datapoints to update.
BATCH_UPDATE = 1;

// StreamUpdate: user can call UpsertDatapoints/DeleteDatapoints to update
// the Index and the updates will be applied in corresponding
// DeployedIndexes in nearly real-time.
STREAM_UPDATE = 2;
}

// Output only. The resource name of the Index.
string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY];

Expand Down Expand Up @@ -93,4 +108,65 @@ message Index {
// in the Index. Result of any successfully completed Operation on the Index
// is reflected in it.
google.protobuf.Timestamp update_time = 11 [(google.api.field_behavior) = OUTPUT_ONLY];

// Output only. Stats of the index resource.
IndexStats index_stats = 14 [(google.api.field_behavior) = OUTPUT_ONLY];

// Immutable. The update method to use with this Index. If not set, BATCH_UPDATE will be
// used by default.
IndexUpdateMethod index_update_method = 16 [(google.api.field_behavior) = IMMUTABLE];
}

// A datapoint of Index.
message IndexDatapoint {
// Restriction of a datapoint which describe its attributes(tokens) from each
// of several attribute categories(namespaces).
message Restriction {
// The namespace of this restriction. eg: color.
string namespace = 1;

// The attributes to allow in this namespace. eg: 'red'
repeated string allow_list = 2;

// The attributes to deny in this namespace. eg: 'blue'
repeated string deny_list = 3;
}

// Crowding tag is a constraint on a neighbor list produced by nearest
// neighbor search requiring that no more than some value k' of the k
// neighbors returned have the same value of crowding_attribute.
message CrowdingTag {
// The attribute value used for crowding. The maximum number of neighbors
// to return per crowding attribute value
// (per_crowding_attribute_num_neighbors) is configured per-query. This
// field is ignored if per_crowding_attribute_num_neighbors is larger than
// the total number of neighbors to return for a given query.
string crowding_attribute = 1;
}

// Required. Unique identifier of the datapoint.
string datapoint_id = 1 [(google.api.field_behavior) = REQUIRED];

// Required. Feature embedding vector. An array of numbers with the length of
// [NearestNeighborSearchConfig.dimensions].
repeated float feature_vector = 2 [(google.api.field_behavior) = REQUIRED];

// Optional. List of Restrict of the datapoint, used to perform "restricted searches"
// where boolean rule are used to filter the subset of the database eligible
// for matching.
// See: https://cloud.google.com/vertex-ai/docs/matching-engine/filtering
repeated Restriction restricts = 4 [(google.api.field_behavior) = OPTIONAL];

// Optional. CrowdingTag of the datapoint, the number of neighbors to return in each
// crowding can be configured during query.
CrowdingTag crowding_tag = 5 [(google.api.field_behavior) = OPTIONAL];
}

// Stats of the Index.
message IndexStats {
// Output only. The number of vectors in the Index.
int64 vectors_count = 1 [(google.api.field_behavior) = OUTPUT_ONLY];

// Output only. The number of shards in the Index.
int32 shards_count = 2 [(google.api.field_behavior) = OUTPUT_ONLY];
}
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,22 @@ service IndexService {
metadata_type: "DeleteOperationMetadata"
};
}

// Add/update Datapoints into an Index.
rpc UpsertDatapoints(UpsertDatapointsRequest) returns (UpsertDatapointsResponse) {
option (google.api.http) = {
post: "/v1/{index=projects/*/locations/*/indexes/*}:upsertDatapoints"
body: "*"
};
}

// Remove Datapoints from an Index.
rpc RemoveDatapoints(RemoveDatapointsRequest) returns (RemoveDatapointsResponse) {
option (google.api.http) = {
post: "/v1/{index=projects/*/locations/*/indexes/*}:removeDatapoints"
body: "*"
};
}
}

// Request message for [IndexService.CreateIndex][google.cloud.aiplatform.v1.IndexService.CreateIndex].
Expand Down Expand Up @@ -201,6 +217,48 @@ message DeleteIndexRequest {
];
}

// Request message for [IndexService.UpsertDatapoints][google.cloud.aiplatform.v1.IndexService.UpsertDatapoints]
message UpsertDatapointsRequest {
// Required. The name of the Index resource to be updated.
// Format:
// `projects/{project}/locations/{location}/indexes/{index}`
string index = 1 [
(google.api.field_behavior) = REQUIRED,
(google.api.resource_reference) = {
type: "aiplatform.googleapis.com/Index"
}
];

// A list of datapoints to be created/updated.
repeated IndexDatapoint datapoints = 2;
}

// Response message for [IndexService.UpsertDatapoints][google.cloud.aiplatform.v1.IndexService.UpsertDatapoints]
message UpsertDatapointsResponse {

}

// Request message for [IndexService.RemoveDatapoints][google.cloud.aiplatform.v1.IndexService.RemoveDatapoints]
message RemoveDatapointsRequest {
// Required. The name of the Index resource to be updated.
// Format:
// `projects/{project}/locations/{location}/indexes/{index}`
string index = 1 [
(google.api.field_behavior) = REQUIRED,
(google.api.resource_reference) = {
type: "aiplatform.googleapis.com/Index"
}
];

// A list of datapoint ids to be deleted.
repeated string datapoint_ids = 2;
}

// Response message for [IndexService.RemoveDatapoints][google.cloud.aiplatform.v1.IndexService.RemoveDatapoints]
message RemoveDatapointsResponse {

}

// Runtime operation metadata with regard to Matching Engine Index.
message NearestNeighborSearchOperationMetadata {
message RecordError {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@ option java_package = "com.google.cloud.aiplatform.v1";
option php_namespace = "Google\\Cloud\\AIPlatform\\V1";
option ruby_package = "Google::Cloud::AIPlatform::V1";

// Next ID: 8
// The objective configuration for model monitoring, including the information
// needed to detect anomalies for one particular model.
message ModelMonitoringObjectiveConfig {
// Training Dataset information.
message TrainingDataset {
Expand Down Expand Up @@ -162,7 +163,6 @@ message ModelMonitoringObjectiveConfig {
ExplanationConfig explanation_config = 5;
}

// Next ID: 3
message ModelMonitoringAlertConfig {
// The config for email alert.
message EmailAlertConfig {
Expand All @@ -184,7 +184,6 @@ message ModelMonitoringAlertConfig {
}

// The config for feature monitoring threshold.
// Next ID: 3
message ThresholdConfig {
oneof threshold {
// Specify a threshold value that can trigger the alert.
Expand All @@ -201,7 +200,6 @@ message ThresholdConfig {

// Sampling Strategy for logging, can be for both training and prediction
// dataset.
// Next ID: 2
message SamplingStrategy {
// Requests are randomly selected.
message RandomSampleConfig {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -439,7 +439,7 @@ message MergeVersionAliasesRequest {

// Required. The set of version aliases to merge.
// The alias should be at most 128 characters, and match
// `[a-z][a-z0-9-]{0,126}[a-z-0-9]`.
// `[a-z][a-zA-Z0-9-]{0,126}[a-z-0-9]`.
// Add the `-` prefix to an alias means removing that alias from the version.
// `-` is NOT counted in the 128 characters. Example: `-golden` means removing
// the `golden` alias from the version.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,18 @@ message PipelineJob {

// The runtime config of a PipelineJob.
message RuntimeConfig {
// The type of an input artifact.
message InputArtifact {
oneof kind {
// Artifact resource id from MLMD. Which is the last portion of an
// artifact resource
// name(projects/{project}/locations/{location}/metadataStores/default/artifacts/{artifact_id}).
// The artifact must stay within the same project, location and default
// metadatastore as the pipeline.
string artifact_id = 1;
}
}

// Deprecated. Use [RuntimeConfig.parameter_values][google.cloud.aiplatform.v1.PipelineJob.RuntimeConfig.parameter_values] instead. The runtime
// parameters of the PipelineJob. The parameters will be passed into
// [PipelineJob.pipeline_spec][google.cloud.aiplatform.v1.PipelineJob.pipeline_spec] to replace the placeholders at runtime.
Expand Down Expand Up @@ -81,6 +93,10 @@ message PipelineJob {
// will stop scheduling any new tasks when a task has failed. Any scheduled
// tasks will continue to completion.
PipelineFailurePolicy failure_policy = 4;

// The runtime artifacts of the PipelineJob. The key will be the input
// artifact name and the value would be one of the InputArtifact.
map<string, InputArtifact> input_artifacts = 5;
}

// Output only. The resource name of the PipelineJob.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -366,6 +366,9 @@ message ListPipelineJobsRequest {
// * `end_time`
// * `start_time`
string order_by = 6;

// Mask specifying which fields to read.
google.protobuf.FieldMask read_mask = 7;
}

// Response message for [PipelineService.ListPipelineJobs][google.cloud.aiplatform.v1.PipelineService.ListPipelineJobs]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ message SavedQuery {

// Required. Problem type of the SavedQuery.
// Allowed values:
//
// * IMAGE_CLASSIFICATION_SINGLE_LABEL
// * IMAGE_CLASSIFICATION_MULTI_LABEL
// * IMAGE_BOUNDING_POLY
Expand All @@ -74,7 +75,7 @@ message SavedQuery {
// Output only. Number of AnnotationSpecs in the context of the SavedQuery.
int32 annotation_spec_count = 10 [(google.api.field_behavior) = OUTPUT_ONLY];

// Used to perform consistent read-modify-write updates. If not set, a blind
// Used to perform a consistent read-modify-write update. If not set, a blind
// "overwrite" update happens.
string etag = 8;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,7 @@ message SuggestTrialsRequest {
}
];

// Required. The number of suggestions requested.
// Required. The number of suggestions requested. It must be positive.
int32 suggestion_count = 2 [(google.api.field_behavior) = REQUIRED];

// Required. The identifier of the client that is requesting the suggestion.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ import "google/cloud/aiplatform/v1beta1/io.proto";
import "google/cloud/aiplatform/v1beta1/job_state.proto";
import "google/cloud/aiplatform/v1beta1/machine_resources.proto";
import "google/cloud/aiplatform/v1beta1/manual_batch_tuning_parameters.proto";
import "google/cloud/aiplatform/v1beta1/model_deployment_monitoring_job.proto";
import "google/cloud/aiplatform/v1beta1/model_monitoring.proto";
import "google/cloud/aiplatform/v1beta1/unmanaged_container_model.proto";
import "google/protobuf/struct.proto";
Expand Down Expand Up @@ -304,4 +305,10 @@ message BatchPredictionJob {
// the input and output to the batch prediction job, as well as the provided
// training dataset.
ModelMonitoringConfig model_monitoring_config = 26;

// Get batch prediction job monitoring statistics.
repeated ModelMonitoringStatsAnomalies model_monitoring_stats_anomalies = 31;

// Output only. The running status of the model monitoring pipeline.
google.rpc.Status model_monitoring_status = 32 [(google.api.field_behavior) = OUTPUT_ONLY];
}
Original file line number Diff line number Diff line change
Expand Up @@ -399,8 +399,7 @@ message ListSavedQueriesRequest {

// Response message for [DatasetService.ListSavedQueries][google.cloud.aiplatform.v1beta1.DatasetService.ListSavedQueries].
message ListSavedQueriesResponse {
// A list of SavedQueries that matches the specified filter in the
// request.
// A list of SavedQueries that match the specified filter in the request.
repeated SavedQuery saved_queries = 1;

// The standard List next-page token.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -183,8 +183,8 @@ message ExplanationSpec {
// Required. Parameters that configure explaining of the Model's predictions.
ExplanationParameters parameters = 1 [(google.api.field_behavior) = REQUIRED];

// Required. Metadata describing the Model's input and output for explanation.
ExplanationMetadata metadata = 2 [(google.api.field_behavior) = REQUIRED];
// Optional. Metadata describing the Model's input and output for explanation.
ExplanationMetadata metadata = 2 [(google.api.field_behavior) = OPTIONAL];
}

// Parameters to configure explaining for Model's predictions.
Expand Down Expand Up @@ -229,7 +229,7 @@ message ExplanationParameters {
// explaining.
//
// If not populated, returns attributions for [top_k][google.cloud.aiplatform.v1beta1.ExplanationParameters.top_k] indices of outputs.
// If neither top_k nor output_indeices is populated, returns the argmax
// If neither top_k nor output_indices is populated, returns the argmax
// index of the outputs.
//
// Only applicable to Models that predict multiple outputs (e,g, multi-class
Expand Down
Loading

0 comments on commit cdd6cc4

Please sign in to comment.