Skip to content

Commit

Permalink
feat: Add updateSchedule method to ScheduleService (#4280)
Browse files Browse the repository at this point in the history
* feat: add examples to ExplanationParameters in aiplatform v1 explanation.proto

PiperOrigin-RevId: 532270918

Source-Link: googleapis/googleapis@d697c7f

Source-Link: googleapis/googleapis-gen@c28b8e9
Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLWFpcGxhdGZvcm0vLk93bEJvdC55YW1sIiwiaCI6ImMyOGI4ZTk3Zjk4MGU3NzVjMTk0NjQwNGE4MWQ0YjdjNjFhNTg4YWUifQ==

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

* feat: Add updateSchedule method to ScheduleService

PiperOrigin-RevId: 532625344

Source-Link: googleapis/googleapis@bd634c7

Source-Link: googleapis/googleapis-gen@51f9883
Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLWFpcGxhdGZvcm0vLk93bEJvdC55YW1sIiwiaCI6IjUxZjk4ODNkNjUxMzc2MTUxNjkzZGU5MDc3MWYyYjhhZTY3ODUyNjgifQ==

* 🦉 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: Denis DelGrosso <[email protected]>
  • Loading branch information
3 people authored May 17, 2023
1 parent 7b147b2 commit d1e67be
Show file tree
Hide file tree
Showing 13 changed files with 2,355 additions and 4 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 @@ -482,6 +482,7 @@ Samples are in the [`samples/`](https://github.com/googleapis/google-cloud-node/
| Schedule_service.list_schedules | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/schedule_service.list_schedules.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/schedule_service.list_schedules.js,packages/google-cloud-aiplatform/samples/README.md) |
| Schedule_service.pause_schedule | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/schedule_service.pause_schedule.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/schedule_service.pause_schedule.js,packages/google-cloud-aiplatform/samples/README.md) |
| Schedule_service.resume_schedule | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/schedule_service.resume_schedule.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/schedule_service.resume_schedule.js,packages/google-cloud-aiplatform/samples/README.md) |
| Schedule_service.update_schedule | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/schedule_service.update_schedule.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/schedule_service.update_schedule.js,packages/google-cloud-aiplatform/samples/README.md) |
| Specialist_pool_service.create_specialist_pool | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/specialist_pool_service.create_specialist_pool.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/specialist_pool_service.create_specialist_pool.js,packages/google-cloud-aiplatform/samples/README.md) |
| Specialist_pool_service.delete_specialist_pool | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/specialist_pool_service.delete_specialist_pool.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/specialist_pool_service.delete_specialist_pool.js,packages/google-cloud-aiplatform/samples/README.md) |
| Specialist_pool_service.get_specialist_pool | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-aiplatform/samples/generated/v1beta1/specialist_pool_service.get_specialist_pool.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/specialist_pool_service.get_specialist_pool.js,packages/google-cloud-aiplatform/samples/README.md) |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ package google.cloud.aiplatform.v1;

import "google/api/field_behavior.proto";
import "google/cloud/aiplatform/v1/explanation_metadata.proto";
import "google/cloud/aiplatform/v1/io.proto";
import "google/protobuf/struct.proto";

option csharp_namespace = "Google.Cloud.AIPlatform.V1";
Expand Down Expand Up @@ -241,6 +242,10 @@ message ExplanationParameters {
// like a lab or manufacturing line, or from diagnostic equipment, like
// x-rays or quality-control cameras, use Integrated Gradients instead.
XraiAttribution xrai_attribution = 3;

// Example-based explanations that returns the nearest neighbors from the
// provided dataset.
Examples examples = 7;
}

// If populated, returns attributions for top K indices of outputs
Expand Down Expand Up @@ -415,6 +420,86 @@ message BlurBaselineConfig {
float max_blur_sigma = 1;
}

// Example-based explainability that returns the nearest neighbors from the
// provided dataset.
message Examples {
// The Cloud Storage input instances.
message ExampleGcsSource {
// The format of the input example instances.
enum DataFormat {
// Format unspecified, used when unset.
DATA_FORMAT_UNSPECIFIED = 0;

// Examples are stored in JSONL files.
JSONL = 1;
}

// The format in which instances are given, if not specified, assume it's
// JSONL format. Currently only JSONL format is supported.
DataFormat data_format = 1;

// The Cloud Storage location for the input instances.
GcsSource gcs_source = 2;
}

oneof source {
// The Cloud Storage input instances.
ExampleGcsSource example_gcs_source = 5;
}

oneof config {
// The full configuration for the generated index, the semantics are the
// same as [metadata][google.cloud.aiplatform.v1.Index.metadata] and should
// match
// [NearestNeighborSearchConfig](https://cloud.google.com/vertex-ai/docs/explainable-ai/configuring-explanations-example-based#nearest-neighbor-search-config).
google.protobuf.Value nearest_neighbor_search_config = 2;

// Simplified preset configuration, which automatically sets configuration
// values based on the desired query speed-precision trade-off and modality.
Presets presets = 4;
}

// The number of neighbors to return when querying for examples.
int32 neighbor_count = 3;
}

// Preset configuration for example-based explanations
message Presets {
// Preset option controlling parameters for query speed-precision trade-off
enum Query {
// More precise neighbors as a trade-off against slower response.
PRECISE = 0;

// Faster response as a trade-off against less precise neighbors.
FAST = 1;
}

// Preset option controlling parameters for different modalities
enum Modality {
// Should not be set. Added as a recommended best practice for enums
MODALITY_UNSPECIFIED = 0;

// IMAGE modality
IMAGE = 1;

// TEXT modality
TEXT = 2;

// TABULAR modality
TABULAR = 3;
}

// Preset option controlling parameters for speed-precision trade-off when
// querying for examples. If omitted, defaults to `PRECISE`.
optional Query query = 1;

// The modality of the uploaded model, which automatically configures the
// distance measurement and feature normalization for the underlying example
// index and queries. If your model does not precisely fit one of these types,
// it is okay to choose the closest type.
Modality modality = 2;
}

// The [ExplanationSpec][google.cloud.aiplatform.v1.ExplanationSpec] entries
// that can be overridden at [online
// explanation][google.cloud.aiplatform.v1.PredictionService.Explain] time.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ import "google/cloud/aiplatform/v1beta1/operation.proto";
import "google/cloud/aiplatform/v1beta1/schedule.proto";
import "google/longrunning/operations.proto";
import "google/protobuf/empty.proto";
import "google/protobuf/field_mask.proto";

option csharp_namespace = "Google.Cloud.AIPlatform.V1Beta1";
option go_package = "cloud.google.com/go/aiplatform/apiv1beta1/aiplatformpb;aiplatformpb";
Expand Down Expand Up @@ -106,6 +107,21 @@ service ScheduleService {
option (google.api.method_signature) = "name";
option (google.api.method_signature) = "name,catch_up";
}

// Updates an active or paused Schedule.
//
// When the Schedule is updated, new runs will be scheduled starting from the
// updated next execution time after the update time based on the
// time_specification in the updated Schedule. All unstarted runs before the
// update time will be skipped while already created runs will NOT be paused
// or canceled.
rpc UpdateSchedule(UpdateScheduleRequest) returns (Schedule) {
option (google.api.http) = {
patch: "/v1beta1/{schedule.name=projects/*/locations/*/schedules/*}"
body: "schedule"
};
option (google.api.method_signature) = "schedule,update_mask";
}
}

// Request message for
Expand Down Expand Up @@ -274,3 +290,18 @@ message ResumeScheduleRequest {
// field. Default to false.
bool catch_up = 2 [(google.api.field_behavior) = OPTIONAL];
}

// Request message for
// [ScheduleService.UpdateSchedule][google.cloud.aiplatform.v1beta1.ScheduleService.UpdateSchedule].
message UpdateScheduleRequest {
// Required. The Schedule which replaces the resource on the server.
// The following restrictions will be applied:
// * The scheduled request type cannot be changed.
// * The output_only fields will be ignored if specified.
Schedule schedule = 1 [(google.api.field_behavior) = REQUIRED];

// Required. The update mask applies to the resource. See
// [google.protobuf.FieldMask][google.protobuf.FieldMask].
google.protobuf.FieldMask update_mask = 2
[(google.api.field_behavior) = REQUIRED];
}
Loading

0 comments on commit d1e67be

Please sign in to comment.