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