-
Notifications
You must be signed in to change notification settings - Fork 597
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add model_garden_service.proto and publisher_model.proto to BUI…
…LD.bazel (#4225) * feat: support for Model Garden -- A single place to search, discover, and interact with a wide variety of foundation models from Google and Google partners, available on Vertex AI PiperOrigin-RevId: 528513667 Source-Link: googleapis/googleapis@542f312 Source-Link: googleapis/googleapis-gen@8a9766c Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLWFpcGxhdGZvcm0vLk93bEJvdC55YW1sIiwiaCI6IjhhOTc2NmMzNGMwY2YxNzkxZmUxNGUzZjIzM2ViNWQ4M2IxNTAzZWQifQ== * 🦉 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 model_garden_service.proto and publisher_model.proto to BUILD.bazel PiperOrigin-RevId: 528571215 Source-Link: googleapis/googleapis@11f62e7 Source-Link: googleapis/googleapis-gen@5cc6276 Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLWFpcGxhdGZvcm0vLk93bEJvdC55YW1sIiwiaCI6IjVjYzYyNzYzOTQ3OWNlOGQxMzQxZDZjMDRmNDg2MTc5NDk1ZmUwZjgifQ== * 🦉 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
1 parent
840390b
commit 5367d25
Showing
70 changed files
with
13,836 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
83 changes: 83 additions & 0 deletions
83
...google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/model_garden_service.proto
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,83 @@ | ||
// Copyright 2023 Google LLC | ||
// | ||
// Licensed under the Apache License, Version 2.0 (the "License"); | ||
// you may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// | ||
// http://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
|
||
syntax = "proto3"; | ||
|
||
package google.cloud.aiplatform.v1beta1; | ||
|
||
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/publisher_model.proto"; | ||
|
||
option csharp_namespace = "Google.Cloud.AIPlatform.V1Beta1"; | ||
option go_package = "cloud.google.com/go/aiplatform/apiv1beta1/aiplatformpb;aiplatformpb"; | ||
option java_multiple_files = true; | ||
option java_outer_classname = "ModelGardenServiceProto"; | ||
option java_package = "com.google.cloud.aiplatform.v1beta1"; | ||
option php_namespace = "Google\\Cloud\\AIPlatform\\V1beta1"; | ||
option ruby_package = "Google::Cloud::AIPlatform::V1beta1"; | ||
|
||
// The interface of Model Garden Service. | ||
service ModelGardenService { | ||
option (google.api.default_host) = "aiplatform.googleapis.com"; | ||
option (google.api.oauth_scopes) = | ||
"https://www.googleapis.com/auth/cloud-platform"; | ||
|
||
// Gets a Model Garden publisher model. | ||
rpc GetPublisherModel(GetPublisherModelRequest) returns (PublisherModel) { | ||
option (google.api.http) = { | ||
get: "/v1beta1/{name=publishers/*/models/*}" | ||
}; | ||
option (google.api.method_signature) = "name"; | ||
} | ||
} | ||
|
||
// View enumeration of PublisherModel. | ||
enum PublisherModelView { | ||
// The default / unset value. The API will default to the BASIC view. | ||
PUBLISHER_MODEL_VIEW_UNSPECIFIED = 0; | ||
|
||
// Include basic metadata about the publisher model, but not the full | ||
// contents. | ||
PUBLISHER_MODEL_VIEW_BASIC = 1; | ||
|
||
// Include everything. | ||
PUBLISHER_MODEL_VIEW_FULL = 2; | ||
|
||
// Include: VersionId, ModelVersionExternalName, and SupportedActions. | ||
PUBLISHER_MODEL_VERSION_VIEW_BASIC = 3; | ||
} | ||
|
||
// Request message for | ||
// [ModelGardenService.GetPublisherModel][google.cloud.aiplatform.v1beta1.ModelGardenService.GetPublisherModel] | ||
message GetPublisherModelRequest { | ||
// Required. The name of the PublisherModel resource. | ||
// Format: | ||
// `publishers/{publisher}/models/{publisher_model}` | ||
string name = 1 [ | ||
(google.api.field_behavior) = REQUIRED, | ||
(google.api.resource_reference) = { | ||
type: "aiplatform.googleapis.com/PublisherModel" | ||
} | ||
]; | ||
|
||
// Optional. The IETF BCP-47 language code representing the language in which | ||
// the publisher model's text information should be written in (see go/bcp47). | ||
string language_code = 2 [(google.api.field_behavior) = OPTIONAL]; | ||
|
||
// Optional. PublisherModel view specifying which fields to read. | ||
PublisherModelView view = 3 [(google.api.field_behavior) = OPTIONAL]; | ||
} |
214 changes: 214 additions & 0 deletions
214
...ages/google-cloud-aiplatform/protos/google/cloud/aiplatform/v1beta1/publisher_model.proto
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,214 @@ | ||
// Copyright 2023 Google LLC | ||
// | ||
// Licensed under the Apache License, Version 2.0 (the "License"); | ||
// you may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// | ||
// http://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
|
||
syntax = "proto3"; | ||
|
||
package google.cloud.aiplatform.v1beta1; | ||
|
||
import "google/api/field_behavior.proto"; | ||
import "google/api/resource.proto"; | ||
import "google/cloud/aiplatform/v1beta1/machine_resources.proto"; | ||
import "google/cloud/aiplatform/v1beta1/model.proto"; | ||
|
||
option csharp_namespace = "Google.Cloud.AIPlatform.V1Beta1"; | ||
option go_package = "cloud.google.com/go/aiplatform/apiv1beta1/aiplatformpb;aiplatformpb"; | ||
option java_multiple_files = true; | ||
option java_outer_classname = "PublisherModelProto"; | ||
option java_package = "com.google.cloud.aiplatform.v1beta1"; | ||
option php_namespace = "Google\\Cloud\\AIPlatform\\V1beta1"; | ||
option ruby_package = "Google::Cloud::AIPlatform::V1beta1"; | ||
|
||
// A Model Garden Publisher Model. | ||
message PublisherModel { | ||
option (google.api.resource) = { | ||
type: "aiplatform.googleapis.com/PublisherModel" | ||
pattern: "publishers/{publisher}/models/{model}" | ||
}; | ||
|
||
// Reference to a resource. | ||
message ResourceReference { | ||
oneof reference { | ||
// The URI of the resource. | ||
string uri = 1; | ||
|
||
// The resource name of the GCP resource. | ||
string resource_name = 2; | ||
} | ||
} | ||
|
||
// A named piece of documentation. | ||
message Documentation { | ||
// Required. E.g., OVERVIEW, USE CASES, DOCUMENTATION, SDK & SAMPLES, JAVA, | ||
// NODE.JS, etc.. | ||
string title = 1 [(google.api.field_behavior) = REQUIRED]; | ||
|
||
// Required. Content of this piece of document (in Markdown format). | ||
string content = 2 [(google.api.field_behavior) = REQUIRED]; | ||
} | ||
|
||
// Actions could take on this Publisher Model. | ||
message CallToAction { | ||
// The regional resource name or the URI. Key is region, e.g., | ||
// us-central1, europe-west2, global, etc.. | ||
message RegionalResourceReferences { | ||
// Required. | ||
map<string, ResourceReference> references = 1 | ||
[(google.api.field_behavior) = REQUIRED]; | ||
|
||
// Required. The title of the regional resource reference. | ||
string title = 2 [(google.api.field_behavior) = REQUIRED]; | ||
} | ||
|
||
// Rest API docs. | ||
message ViewRestApi { | ||
// Required. | ||
repeated Documentation documentations = 1 | ||
[(google.api.field_behavior) = REQUIRED]; | ||
|
||
// Required. The title of the view rest API. | ||
string title = 2 [(google.api.field_behavior) = REQUIRED]; | ||
} | ||
|
||
// Model metadata that is needed for UploadModel or | ||
// DeployModel/CreateEndpoint requests. | ||
message Deploy { | ||
// The prediction (for example, the machine) resources that the | ||
// DeployedModel uses. | ||
oneof prediction_resources { | ||
// A description of resources that are dedicated to the DeployedModel, | ||
// and that need a higher degree of manual configuration. | ||
DedicatedResources dedicated_resources = 5; | ||
|
||
// A description of resources that to large degree are decided by Vertex | ||
// AI, and require only a modest additional configuration. | ||
AutomaticResources automatic_resources = 6; | ||
|
||
// The resource name of the shared DeploymentResourcePool to deploy on. | ||
// Format: | ||
// `projects/{project}/locations/{location}/deploymentResourcePools/{deployment_resource_pool}` | ||
string shared_resources = 7; | ||
} | ||
|
||
// Optional. Default model display name. | ||
string model_display_name = 1 [(google.api.field_behavior) = OPTIONAL]; | ||
|
||
// Optional. Large model reference. When this is set, model_artifact_spec | ||
// is not needed. | ||
LargeModelReference large_model_reference = 2 | ||
[(google.api.field_behavior) = OPTIONAL]; | ||
|
||
// Optional. The specification of the container that is to be used when | ||
// deploying this Model in Vertex AI. Not present for Large Models. | ||
ModelContainerSpec container_spec = 3 | ||
[(google.api.field_behavior) = OPTIONAL]; | ||
|
||
// Optional. The path to the directory containing the Model artifact and | ||
// any of its supporting files. | ||
string artifact_uri = 4 [(google.api.field_behavior) = OPTIONAL]; | ||
|
||
// Required. The title of the regional resource reference. | ||
string title = 8 [(google.api.field_behavior) = REQUIRED]; | ||
} | ||
|
||
// Optional. To view Rest API docs. | ||
ViewRestApi view_rest_api = 1 [(google.api.field_behavior) = OPTIONAL]; | ||
|
||
// Optional. Open notebook of the PublisherModel. | ||
RegionalResourceReferences open_notebook = 2 | ||
[(google.api.field_behavior) = OPTIONAL]; | ||
|
||
// Optional. Create application using the PublisherModel. | ||
RegionalResourceReferences create_application = 3 | ||
[(google.api.field_behavior) = OPTIONAL]; | ||
|
||
// Optional. Open fine-tuning pipeline of the PublisherModel. | ||
RegionalResourceReferences open_fine_tuning_pipeline = 4 | ||
[(google.api.field_behavior) = OPTIONAL]; | ||
|
||
// Optional. Open prompt-tuning pipeline of the PublisherModel. | ||
RegionalResourceReferences open_prompt_tuning_pipeline = 5 | ||
[(google.api.field_behavior) = OPTIONAL]; | ||
|
||
// Optional. Open Genie / Playground. | ||
RegionalResourceReferences open_genie = 6 | ||
[(google.api.field_behavior) = OPTIONAL]; | ||
|
||
// Optional. Deploy the PublisherModel to Vertex Endpoint. | ||
Deploy deploy = 7 [(google.api.field_behavior) = OPTIONAL]; | ||
|
||
// Optional. Open in Generation AI Studio. | ||
RegionalResourceReferences open_generation_ai_studio = 8 | ||
[(google.api.field_behavior) = OPTIONAL]; | ||
} | ||
|
||
// An enum representing the open source category of a PublisherModel. | ||
enum OpenSourceCategory { | ||
// The open source category is unspecified, which should not be used. | ||
OPEN_SOURCE_CATEGORY_UNSPECIFIED = 0; | ||
|
||
// Used to indicate the PublisherModel is not open sourced. | ||
PROPRIETARY = 1; | ||
|
||
// Used to indicate the PublisherModel is a Google-owned open source model | ||
// w/ Google checkpoint. | ||
GOOGLE_OWNED_OSS_WITH_GOOGLE_CHECKPOINT = 2; | ||
|
||
// Used to indicate the PublisherModel is a 3p-owned open source model w/ | ||
// Google checkpoint. | ||
THIRD_PARTY_OWNED_OSS_WITH_GOOGLE_CHECKPOINT = 3; | ||
|
||
// Used to indicate the PublisherModel is a Google-owned pure open source | ||
// model. | ||
GOOGLE_OWNED_OSS = 4; | ||
|
||
// Used to indicate the PublisherModel is a 3p-owned pure open source model. | ||
THIRD_PARTY_OWNED_OSS = 5; | ||
} | ||
|
||
// Output only. The resource name of the PublisherModel. | ||
string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; | ||
|
||
// Output only. Immutable. The version ID of the PublisherModel. | ||
// A new version is committed when a new model version is uploaded under an | ||
// existing model id. It is an auto-incrementing decimal number in string | ||
// representation. | ||
string version_id = 2 [ | ||
(google.api.field_behavior) = IMMUTABLE, | ||
(google.api.field_behavior) = OUTPUT_ONLY | ||
]; | ||
|
||
// Required. Indicates the open source category of the publisher model. | ||
OpenSourceCategory open_source_category = 7 | ||
[(google.api.field_behavior) = REQUIRED]; | ||
|
||
// Optional. Supported call-to-action options. | ||
CallToAction supported_actions = 19 [(google.api.field_behavior) = OPTIONAL]; | ||
|
||
// Optional. Additional information about the model's Frameworks. | ||
repeated string frameworks = 23 [(google.api.field_behavior) = OPTIONAL]; | ||
|
||
// Optional. Output only. Immutable. Used to indicate this model has a | ||
// publisher model and provide the template of the publisher model resource | ||
// name. | ||
string publisher_model_template = 30 [ | ||
(google.api.field_behavior) = IMMUTABLE, | ||
(google.api.field_behavior) = OUTPUT_ONLY | ||
]; | ||
|
||
// Optional. The schemata that describes formats of the PublisherModel's | ||
// predictions and explanations as given and returned via | ||
// [PredictionService.Predict][google.cloud.aiplatform.v1beta1.PredictionService.Predict]. | ||
PredictSchemata predict_schemata = 31 | ||
[(google.api.field_behavior) = OPTIONAL]; | ||
} |
Oops, something went wrong.