1// Copyright 2023 Google LLC 2// 3// Licensed under the Apache License, Version 2.0 (the "License"); 4// you may not use this file except in compliance with the License. 5// You may obtain a copy of the License at 6// 7// http://www.apache.org/licenses/LICENSE-2.0 8// 9// Unless required by applicable law or agreed to in writing, software 10// distributed under the License is distributed on an "AS IS" BASIS, 11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12// See the License for the specific language governing permissions and 13// limitations under the License. 14 15syntax = "proto3"; 16 17package google.cloud.aiplatform.v1; 18 19import "google/api/field_behavior.proto"; 20import "google/api/resource.proto"; 21import "google/cloud/aiplatform/v1/machine_resources.proto"; 22import "google/cloud/aiplatform/v1/model.proto"; 23 24option csharp_namespace = "Google.Cloud.AIPlatform.V1"; 25option go_package = "cloud.google.com/go/aiplatform/apiv1/aiplatformpb;aiplatformpb"; 26option java_multiple_files = true; 27option java_outer_classname = "PublisherModelProto"; 28option java_package = "com.google.cloud.aiplatform.v1"; 29option php_namespace = "Google\\Cloud\\AIPlatform\\V1"; 30option ruby_package = "Google::Cloud::AIPlatform::V1"; 31 32// A Model Garden Publisher Model. 33message PublisherModel { 34 option (google.api.resource) = { 35 type: "aiplatform.googleapis.com/PublisherModel" 36 pattern: "publishers/{publisher}/models/{model}" 37 }; 38 39 // Reference to a resource. 40 message ResourceReference { 41 oneof reference { 42 // The URI of the resource. 43 string uri = 1; 44 45 // The resource name of the Google Cloud resource. 46 string resource_name = 2; 47 48 // Use case (CUJ) of the resource. 49 string use_case = 3 [deprecated = true]; 50 51 // Description of the resource. 52 string description = 4 [deprecated = true]; 53 } 54 } 55 56 // A named piece of documentation. 57 message Documentation { 58 // Required. E.g., OVERVIEW, USE CASES, DOCUMENTATION, SDK & SAMPLES, JAVA, 59 // NODE.JS, etc.. 60 string title = 1 [(google.api.field_behavior) = REQUIRED]; 61 62 // Required. Content of this piece of document (in Markdown format). 63 string content = 2 [(google.api.field_behavior) = REQUIRED]; 64 } 65 66 // Actions could take on this Publisher Model. 67 message CallToAction { 68 // The regional resource name or the URI. Key is region, e.g., 69 // us-central1, europe-west2, global, etc.. 70 message RegionalResourceReferences { 71 // Required. 72 map<string, ResourceReference> references = 1 73 [(google.api.field_behavior) = REQUIRED]; 74 75 // Required. 76 string title = 2 [(google.api.field_behavior) = REQUIRED]; 77 78 // Optional. Title of the resource. 79 optional string resource_title = 3 80 [(google.api.field_behavior) = OPTIONAL]; 81 82 // Optional. Use case (CUJ) of the resource. 83 optional string resource_use_case = 4 84 [(google.api.field_behavior) = OPTIONAL]; 85 86 // Optional. Description of the resource. 87 optional string resource_description = 5 88 [(google.api.field_behavior) = OPTIONAL]; 89 } 90 91 // Rest API docs. 92 message ViewRestApi { 93 // Required. 94 repeated Documentation documentations = 1 95 [(google.api.field_behavior) = REQUIRED]; 96 97 // Required. The title of the view rest API. 98 string title = 2 [(google.api.field_behavior) = REQUIRED]; 99 } 100 101 // Open notebooks. 102 message OpenNotebooks { 103 // Required. Regional resource references to notebooks. 104 repeated RegionalResourceReferences notebooks = 1 105 [(google.api.field_behavior) = REQUIRED]; 106 } 107 108 // Open fine tuning pipelines. 109 message OpenFineTuningPipelines { 110 // Required. Regional resource references to fine tuning pipelines. 111 repeated RegionalResourceReferences fine_tuning_pipelines = 1 112 [(google.api.field_behavior) = REQUIRED]; 113 } 114 115 // Model metadata that is needed for UploadModel or 116 // DeployModel/CreateEndpoint requests. 117 message Deploy { 118 // The prediction (for example, the machine) resources that the 119 // DeployedModel uses. 120 oneof prediction_resources { 121 // A description of resources that are dedicated to the DeployedModel, 122 // and that need a higher degree of manual configuration. 123 DedicatedResources dedicated_resources = 5; 124 125 // A description of resources that to large degree are decided by Vertex 126 // AI, and require only a modest additional configuration. 127 AutomaticResources automatic_resources = 6; 128 129 // The resource name of the shared DeploymentResourcePool to deploy on. 130 // Format: 131 // `projects/{project}/locations/{location}/deploymentResourcePools/{deployment_resource_pool}` 132 string shared_resources = 7; 133 } 134 135 // Optional. Default model display name. 136 string model_display_name = 1 [(google.api.field_behavior) = OPTIONAL]; 137 138 // Optional. Large model reference. When this is set, model_artifact_spec 139 // is not needed. 140 LargeModelReference large_model_reference = 2 141 [(google.api.field_behavior) = OPTIONAL]; 142 143 // Optional. The specification of the container that is to be used when 144 // deploying this Model in Vertex AI. Not present for Large Models. 145 ModelContainerSpec container_spec = 3 146 [(google.api.field_behavior) = OPTIONAL]; 147 148 // Optional. The path to the directory containing the Model artifact and 149 // any of its supporting files. 150 string artifact_uri = 4 [(google.api.field_behavior) = OPTIONAL]; 151 152 // Required. The title of the regional resource reference. 153 string title = 8 [(google.api.field_behavior) = REQUIRED]; 154 155 // Optional. The signed URI for ephemeral Cloud Storage access to model 156 // artifact. 157 string public_artifact_uri = 9 [(google.api.field_behavior) = OPTIONAL]; 158 } 159 160 // Configurations for PublisherModel GKE deployment 161 message DeployGke { 162 // Optional. GKE deployment configuration in yaml format. 163 repeated string gke_yaml_configs = 1 164 [(google.api.field_behavior) = OPTIONAL]; 165 } 166 167 // Optional. To view Rest API docs. 168 ViewRestApi view_rest_api = 1 [(google.api.field_behavior) = OPTIONAL]; 169 170 // Optional. Open notebook of the PublisherModel. 171 RegionalResourceReferences open_notebook = 2 172 [(google.api.field_behavior) = OPTIONAL]; 173 174 // Optional. Open notebooks of the PublisherModel. 175 optional OpenNotebooks open_notebooks = 12 176 [(google.api.field_behavior) = OPTIONAL]; 177 178 // Optional. Create application using the PublisherModel. 179 RegionalResourceReferences create_application = 3 180 [(google.api.field_behavior) = OPTIONAL]; 181 182 // Optional. Open fine-tuning pipeline of the PublisherModel. 183 RegionalResourceReferences open_fine_tuning_pipeline = 4 184 [(google.api.field_behavior) = OPTIONAL]; 185 186 // Optional. Open fine-tuning pipelines of the PublisherModel. 187 optional OpenFineTuningPipelines open_fine_tuning_pipelines = 13 188 [(google.api.field_behavior) = OPTIONAL]; 189 190 // Optional. Open prompt-tuning pipeline of the PublisherModel. 191 RegionalResourceReferences open_prompt_tuning_pipeline = 5 192 [(google.api.field_behavior) = OPTIONAL]; 193 194 // Optional. Open Genie / Playground. 195 RegionalResourceReferences open_genie = 6 196 [(google.api.field_behavior) = OPTIONAL]; 197 198 // Optional. Deploy the PublisherModel to Vertex Endpoint. 199 Deploy deploy = 7 [(google.api.field_behavior) = OPTIONAL]; 200 201 // Optional. Deploy PublisherModel to Google Kubernetes Engine. 202 DeployGke deploy_gke = 14 [(google.api.field_behavior) = OPTIONAL]; 203 204 // Optional. Open in Generation AI Studio. 205 RegionalResourceReferences open_generation_ai_studio = 8 206 [(google.api.field_behavior) = OPTIONAL]; 207 208 // Optional. Request for access. 209 RegionalResourceReferences request_access = 9 210 [(google.api.field_behavior) = OPTIONAL]; 211 212 // Optional. Open evaluation pipeline of the PublisherModel. 213 RegionalResourceReferences open_evaluation_pipeline = 11 214 [(google.api.field_behavior) = OPTIONAL]; 215 } 216 217 // An enum representing the open source category of a PublisherModel. 218 enum OpenSourceCategory { 219 // The open source category is unspecified, which should not be used. 220 OPEN_SOURCE_CATEGORY_UNSPECIFIED = 0; 221 222 // Used to indicate the PublisherModel is not open sourced. 223 PROPRIETARY = 1; 224 225 // Used to indicate the PublisherModel is a Google-owned open source model 226 // w/ Google checkpoint. 227 GOOGLE_OWNED_OSS_WITH_GOOGLE_CHECKPOINT = 2; 228 229 // Used to indicate the PublisherModel is a 3p-owned open source model w/ 230 // Google checkpoint. 231 THIRD_PARTY_OWNED_OSS_WITH_GOOGLE_CHECKPOINT = 3; 232 233 // Used to indicate the PublisherModel is a Google-owned pure open source 234 // model. 235 GOOGLE_OWNED_OSS = 4; 236 237 // Used to indicate the PublisherModel is a 3p-owned pure open source model. 238 THIRD_PARTY_OWNED_OSS = 5; 239 } 240 241 // An enum representing the launch stage of a PublisherModel. 242 enum LaunchStage { 243 // The model launch stage is unspecified. 244 LAUNCH_STAGE_UNSPECIFIED = 0; 245 246 // Used to indicate the PublisherModel is at Experimental launch stage, 247 // available to a small set of customers. 248 EXPERIMENTAL = 1; 249 250 // Used to indicate the PublisherModel is at Private Preview launch stage, 251 // only available to a small set of customers, although a larger set of 252 // customers than an Experimental launch. Previews are the first launch 253 // stage used to get feedback from customers. 254 PRIVATE_PREVIEW = 2; 255 256 // Used to indicate the PublisherModel is at Public Preview launch stage, 257 // available to all customers, although not supported for production 258 // workloads. 259 PUBLIC_PREVIEW = 3; 260 261 // Used to indicate the PublisherModel is at GA launch stage, available to 262 // all customers and ready for production workload. 263 GA = 4; 264 } 265 266 // An enum representing the state of the PublicModelVersion. 267 enum VersionState { 268 // The version state is unspecified. 269 VERSION_STATE_UNSPECIFIED = 0; 270 271 // Used to indicate the version is stable. 272 VERSION_STATE_STABLE = 1; 273 274 // Used to indicate the version is unstable. 275 VERSION_STATE_UNSTABLE = 2; 276 } 277 278 // Output only. The resource name of the PublisherModel. 279 string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; 280 281 // Output only. Immutable. The version ID of the PublisherModel. 282 // A new version is committed when a new model version is uploaded under an 283 // existing model id. It is an auto-incrementing decimal number in string 284 // representation. 285 string version_id = 2 [ 286 (google.api.field_behavior) = IMMUTABLE, 287 (google.api.field_behavior) = OUTPUT_ONLY 288 ]; 289 290 // Required. Indicates the open source category of the publisher model. 291 OpenSourceCategory open_source_category = 7 292 [(google.api.field_behavior) = REQUIRED]; 293 294 // Optional. Supported call-to-action options. 295 CallToAction supported_actions = 19 [(google.api.field_behavior) = OPTIONAL]; 296 297 // Optional. Additional information about the model's Frameworks. 298 repeated string frameworks = 23 [(google.api.field_behavior) = OPTIONAL]; 299 300 // Optional. Indicates the launch stage of the model. 301 LaunchStage launch_stage = 29 [(google.api.field_behavior) = OPTIONAL]; 302 303 // Optional. Indicates the state of the model version. 304 VersionState version_state = 37 [(google.api.field_behavior) = OPTIONAL]; 305 306 // Optional. Output only. Immutable. Used to indicate this model has a 307 // publisher model and provide the template of the publisher model resource 308 // name. 309 string publisher_model_template = 30 [ 310 (google.api.field_behavior) = IMMUTABLE, 311 (google.api.field_behavior) = OUTPUT_ONLY 312 ]; 313 314 // Optional. The schemata that describes formats of the PublisherModel's 315 // predictions and explanations as given and returned via 316 // [PredictionService.Predict][google.cloud.aiplatform.v1.PredictionService.Predict]. 317 PredictSchemata predict_schemata = 31 318 [(google.api.field_behavior) = OPTIONAL]; 319} 320