google.cloud.aiplatform API v1beta1

PiperOrigin-RevId: 332493036
pull/620/head
Google APIs 5 years ago committed by Copybara-Service
parent e0b66d4e7b
commit 39821aa838
  1. 432
      google/cloud/aiplatform/v1beta1/BUILD.bazel
  2. 51
      google/cloud/aiplatform/v1beta1/accelerator_type.proto
  3. 18
      google/cloud/aiplatform/v1beta1/aiplatform_gapic.yaml
  4. 279
      google/cloud/aiplatform/v1beta1/aiplatform_grpc_service_config.json
  5. 104
      google/cloud/aiplatform/v1beta1/aiplatform_v1beta1.yaml
  6. 88
      google/cloud/aiplatform/v1beta1/annotation.proto
  7. 53
      google/cloud/aiplatform/v1beta1/annotation_spec.proto
  8. 267
      google/cloud/aiplatform/v1beta1/batch_prediction_job.proto
  9. 43
      google/cloud/aiplatform/v1beta1/completion_stats.proto
  10. 182
      google/cloud/aiplatform/v1beta1/custom_job.proto
  11. 68
      google/cloud/aiplatform/v1beta1/data_item.proto
  12. 194
      google/cloud/aiplatform/v1beta1/data_labeling_job.proto
  13. 133
      google/cloud/aiplatform/v1beta1/dataset.proto
  14. 401
      google/cloud/aiplatform/v1beta1/dataset_service.proto
  15. 40
      google/cloud/aiplatform/v1beta1/deployed_model_ref.proto
  16. 147
      google/cloud/aiplatform/v1beta1/endpoint.proto
  17. 302
      google/cloud/aiplatform/v1beta1/endpoint_service.proto
  18. 40
      google/cloud/aiplatform/v1beta1/env_var.proto
  19. 177
      google/cloud/aiplatform/v1beta1/explanation.proto
  20. 107
      google/cloud/aiplatform/v1beta1/explanation_metadata.proto
  21. 102
      google/cloud/aiplatform/v1beta1/hyperparameter_tuning_job.proto
  22. 75
      google/cloud/aiplatform/v1beta1/io.proto
  23. 699
      google/cloud/aiplatform/v1beta1/job_service.proto
  24. 55
      google/cloud/aiplatform/v1beta1/job_state.proto
  25. 156
      google/cloud/aiplatform/v1beta1/machine_resources.proto
  26. 37
      google/cloud/aiplatform/v1beta1/manual_batch_tuning_parameters.proto
  27. 378
      google/cloud/aiplatform/v1beta1/model.proto
  28. 66
      google/cloud/aiplatform/v1beta1/model_evaluation.proto
  29. 69
      google/cloud/aiplatform/v1beta1/model_evaluation_slice.proto
  30. 418
      google/cloud/aiplatform/v1beta1/model_service.proto
  31. 48
      google/cloud/aiplatform/v1beta1/operation.proto
  32. 202
      google/cloud/aiplatform/v1beta1/pipeline_service.proto
  33. 57
      google/cloud/aiplatform/v1beta1/pipeline_state.proto
  34. 150
      google/cloud/aiplatform/v1beta1/prediction_service.proto
  35. 57
      google/cloud/aiplatform/v1beta1/specialist_pool.proto
  36. 209
      google/cloud/aiplatform/v1beta1/specialist_pool_service.proto
  37. 246
      google/cloud/aiplatform/v1beta1/study.proto
  38. 307
      google/cloud/aiplatform/v1beta1/training_pipeline.proto
  39. 47
      google/cloud/aiplatform/v1beta1/user_action_reference.proto

@ -0,0 +1,432 @@
# This file was automatically generated by BuildFileGenerator
# https://github.com/googleapis/gapic-generator/tree/master/rules_gapic/bazel
# Most of the manual changes to this file will be overwritten.
# It's **only** allowed to change the following rule attribute values:
# - names of *_gapic_assembly_* rules
# - certain parameters of *_gapic_library rules, including but not limited to:
# * extra_protoc_parameters
# * extra_protoc_file_parameters
# The complete list of preserved parameters can be found in the source code.
# This is an API workspace, having public visibility by default makes perfect sense.
package(default_visibility = ["//visibility:public"])
##############################################################################
# Common
##############################################################################
load("@rules_proto//proto:defs.bzl", "proto_library")
load("@com_google_googleapis_imports//:imports.bzl", "proto_library_with_info")
proto_library(
name = "aiplatform_proto",
srcs = [
"accelerator_type.proto",
"annotation.proto",
"annotation_spec.proto",
"batch_prediction_job.proto",
"completion_stats.proto",
"custom_job.proto",
"data_item.proto",
"data_labeling_job.proto",
"dataset.proto",
"dataset_service.proto",
"deployed_model_ref.proto",
"endpoint.proto",
"endpoint_service.proto",
"env_var.proto",
"explanation.proto",
"explanation_metadata.proto",
"hyperparameter_tuning_job.proto",
"io.proto",
"job_service.proto",
"job_state.proto",
"machine_resources.proto",
"manual_batch_tuning_parameters.proto",
"model.proto",
"model_evaluation.proto",
"model_evaluation_slice.proto",
"model_service.proto",
"operation.proto",
"pipeline_service.proto",
"pipeline_state.proto",
"prediction_service.proto",
"specialist_pool.proto",
"specialist_pool_service.proto",
"study.proto",
"training_pipeline.proto",
"user_action_reference.proto",
],
deps = [
"//google/api:annotations_proto",
"//google/api:client_proto",
"//google/api:field_behavior_proto",
"//google/api:resource_proto",
"//google/longrunning:operations_proto",
"//google/rpc:status_proto",
"//google/type:money_proto",
"@com_google_protobuf//:duration_proto",
"@com_google_protobuf//:empty_proto",
"@com_google_protobuf//:field_mask_proto",
"@com_google_protobuf//:struct_proto",
"@com_google_protobuf//:timestamp_proto",
],
)
proto_library_with_info(
name = "aiplatform_proto_with_info",
deps = [
":aiplatform_proto",
"//google/cloud:common_resources_proto",
],
)
##############################################################################
# Java
##############################################################################
load(
"@com_google_googleapis_imports//:imports.bzl",
"java_gapic_assembly_gradle_pkg",
"java_gapic_library",
"java_gapic_test",
"java_grpc_library",
"java_proto_library",
)
java_proto_library(
name = "aiplatform_java_proto",
deps = [":aiplatform_proto"],
)
java_grpc_library(
name = "aiplatform_java_grpc",
srcs = [":aiplatform_proto"],
deps = [":aiplatform_java_proto"],
)
java_gapic_library(
name = "aiplatform_java_gapic",
src = ":aiplatform_proto_with_info",
gapic_yaml = "aiplatform_gapic.yaml",
grpc_service_config = "aiplatform_grpc_service_config.json",
package = "google.cloud.aiplatform.v1beta1",
service_yaml = "aiplatform_v1beta1.yaml",
test_deps = [
":aiplatform_java_grpc",
],
deps = [
":aiplatform_java_proto",
],
)
java_gapic_test(
name = "aiplatform_java_gapic_test_suite",
test_classes = [
"com.google.cloud.aiplatform.v1beta1.DatasetServiceClientTest",
"com.google.cloud.aiplatform.v1beta1.EndpointServiceClientTest",
"com.google.cloud.aiplatform.v1beta1.JobServiceClientTest",
"com.google.cloud.aiplatform.v1beta1.ModelServiceClientTest",
"com.google.cloud.aiplatform.v1beta1.PipelineServiceClientTest",
"com.google.cloud.aiplatform.v1beta1.PredictionServiceClientTest",
"com.google.cloud.aiplatform.v1beta1.SpecialistPoolServiceClientTest",
],
runtime_deps = [":aiplatform_java_gapic_test"],
)
# Open Source Packages
java_gapic_assembly_gradle_pkg(
name = "google-cloud-aiplatform-v1beta1-java",
deps = [
":aiplatform_java_gapic",
":aiplatform_java_grpc",
":aiplatform_java_proto",
":aiplatform_proto",
],
)
##############################################################################
# Go
##############################################################################
load(
"@com_google_googleapis_imports//:imports.bzl",
"go_gapic_assembly_pkg",
"go_gapic_library",
"go_proto_library",
"go_test",
)
go_proto_library(
name = "aiplatform_go_proto",
compilers = ["@io_bazel_rules_go//proto:go_grpc"],
importpath = "google.golang.org/genproto/googleapis/cloud/aiplatform/v1beta1",
protos = [":aiplatform_proto"],
deps = [
"//google/api:annotations_go_proto",
"//google/longrunning:longrunning_go_proto",
"//google/rpc:status_go_proto",
"//google/type:money_go_proto",
],
)
go_gapic_library(
name = "aiplatform_go_gapic",
srcs = [":aiplatform_proto_with_info"],
grpc_service_config = "aiplatform_grpc_service_config.json",
importpath = "cloud.google.com/go/aiplatform/apiv1beta1;aiplatform",
service_yaml = "aiplatform_v1beta1.yaml",
deps = [
":aiplatform_go_proto",
"//google/longrunning:longrunning_go_gapic",
"//google/longrunning:longrunning_go_proto",
"@com_google_cloud_go//longrunning:go_default_library",
"@io_bazel_rules_go//proto/wkt:duration_go_proto",
"@io_bazel_rules_go//proto/wkt:struct_go_proto",
],
)
go_test(
name = "aiplatform_go_gapic_test",
srcs = [":aiplatform_go_gapic_srcjar_test"],
embed = [":aiplatform_go_gapic"],
importpath = "cloud.google.com/go/aiplatform/apiv1beta1",
)
# Open Source Packages
go_gapic_assembly_pkg(
name = "gapi-cloud-aiplatform-v1beta1-go",
deps = [
":aiplatform_go_gapic",
":aiplatform_go_gapic_srcjar-test.srcjar",
":aiplatform_go_proto",
],
)
##############################################################################
# Python
##############################################################################
load(
"@com_google_googleapis_imports//:imports.bzl",
"moved_proto_library",
"py_gapic_assembly_pkg",
"py_gapic_library",
"py_grpc_library",
"py_proto_library",
)
moved_proto_library(
name = "aiplatform_moved_proto",
srcs = [":aiplatform_proto"],
deps = [
"//google/api:annotations_proto",
"//google/api:client_proto",
"//google/api:field_behavior_proto",
"//google/api:resource_proto",
"//google/longrunning:operations_proto",
"//google/rpc:status_proto",
"//google/type:money_proto",
"@com_google_protobuf//:duration_proto",
"@com_google_protobuf//:empty_proto",
"@com_google_protobuf//:field_mask_proto",
"@com_google_protobuf//:struct_proto",
"@com_google_protobuf//:timestamp_proto",
],
)
py_proto_library(
name = "aiplatform_py_proto",
plugin = "@protoc_docs_plugin//:docs_plugin",
deps = [":aiplatform_moved_proto"],
)
py_grpc_library(
name = "aiplatform_py_grpc",
srcs = [":aiplatform_moved_proto"],
deps = [":aiplatform_py_proto"],
)
py_gapic_library(
name = "aiplatform_py_gapic",
src = ":aiplatform_proto_with_info",
gapic_yaml = "aiplatform_gapic.yaml",
grpc_service_config = "aiplatform_grpc_service_config.json",
package = "google.cloud.aiplatform.v1beta1",
service_yaml = "aiplatform_v1beta1.yaml",
deps = [
":aiplatform_py_grpc",
":aiplatform_py_proto",
],
)
# Open Source Packages
py_gapic_assembly_pkg(
name = "aiplatform-v1beta1-py",
deps = [
":aiplatform_py_gapic",
":aiplatform_py_grpc",
":aiplatform_py_proto",
],
)
##############################################################################
# PHP
##############################################################################
load(
"@com_google_googleapis_imports//:imports.bzl",
"php_gapic_assembly_pkg",
"php_gapic_library",
"php_grpc_library",
"php_proto_library",
)
php_proto_library(
name = "aiplatform_php_proto",
deps = [":aiplatform_proto"],
)
php_grpc_library(
name = "aiplatform_php_grpc",
srcs = [":aiplatform_proto"],
deps = [":aiplatform_php_proto"],
)
php_gapic_library(
name = "aiplatform_php_gapic",
src = ":aiplatform_proto_with_info",
gapic_yaml = "aiplatform_gapic.yaml",
grpc_service_config = "aiplatform_grpc_service_config.json",
package = "google.cloud.aiplatform.v1beta1",
service_yaml = "aiplatform_v1beta1.yaml",
deps = [
":aiplatform_php_grpc",
":aiplatform_php_proto",
],
)
# Open Source Packages
php_gapic_assembly_pkg(
name = "google-cloud-aiplatform-v1beta1-php",
deps = [
":aiplatform_php_gapic",
":aiplatform_php_grpc",
":aiplatform_php_proto",
],
)
##############################################################################
# Node.js
##############################################################################
load(
"@com_google_googleapis_imports//:imports.bzl",
"nodejs_gapic_assembly_pkg",
"nodejs_gapic_library",
)
nodejs_gapic_library(
name = "aiplatform_nodejs_gapic",
src = ":aiplatform_proto_with_info",
grpc_service_config = "aiplatform_grpc_service_config.json",
package = "google.cloud.aiplatform.v1beta1",
service_yaml = "aiplatform_v1beta1.yaml",
deps = [],
)
nodejs_gapic_assembly_pkg(
name = "aiplatform-v1beta1-nodejs",
deps = [
":aiplatform_nodejs_gapic",
":aiplatform_proto",
],
)
##############################################################################
# Ruby
##############################################################################
load(
"@com_google_googleapis_imports//:imports.bzl",
"ruby_gapic_assembly_pkg",
"ruby_gapic_library",
"ruby_grpc_library",
"ruby_proto_library",
)
ruby_proto_library(
name = "aiplatform_ruby_proto",
deps = [":aiplatform_proto"],
)
ruby_grpc_library(
name = "aiplatform_ruby_grpc",
srcs = [":aiplatform_proto"],
deps = [":aiplatform_ruby_proto"],
)
ruby_gapic_library(
name = "aiplatform_ruby_gapic",
src = ":aiplatform_proto_with_info",
gapic_yaml = "aiplatform_gapic.yaml",
grpc_service_config = "aiplatform_grpc_service_config.json",
package = "google.cloud.aiplatform.v1beta1",
service_yaml = "aiplatform_v1beta1.yaml",
deps = [
":aiplatform_ruby_grpc",
":aiplatform_ruby_proto",
],
)
# Open Source Packages
ruby_gapic_assembly_pkg(
name = "google-cloud-aiplatform-v1beta1-ruby",
deps = [
":aiplatform_ruby_gapic",
":aiplatform_ruby_grpc",
":aiplatform_ruby_proto",
],
)
##############################################################################
# C#
##############################################################################
load(
"@com_google_googleapis_imports//:imports.bzl",
"csharp_gapic_assembly_pkg",
"csharp_gapic_library",
"csharp_grpc_library",
"csharp_proto_library",
)
csharp_proto_library(
name = "aiplatform_csharp_proto",
deps = [":aiplatform_proto"],
)
csharp_grpc_library(
name = "aiplatform_csharp_grpc",
srcs = [":aiplatform_proto"],
deps = [":aiplatform_csharp_proto"],
)
csharp_gapic_library(
name = "aiplatform_csharp_gapic",
srcs = [":aiplatform_proto_with_info"],
grpc_service_config = "aiplatform_grpc_service_config.json",
common_resources_config = "@gax_dotnet//:Google.Api.Gax/ResourceNames/CommonResourcesConfig.json",
deps = [
":aiplatform_csharp_grpc",
":aiplatform_csharp_proto",
],
)
# Open Source Packages
csharp_gapic_assembly_pkg(
name = "google-cloud-aiplatform-v1beta1-csharp",
deps = [
":aiplatform_csharp_gapic",
":aiplatform_csharp_grpc",
":aiplatform_csharp_proto",
],
)
##############################################################################
# C++
##############################################################################
# Put your C++ rules here

@ -0,0 +1,51 @@
// Copyright 2020 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";
option go_package = "google.golang.org/genproto/googleapis/cloud/aiplatform/v1beta1;aiplatform";
option java_multiple_files = true;
option java_outer_classname = "AcceleratorTypeProto";
option java_package = "com.google.cloud.aiplatform.v1beta1";
// Represents a hardware accelerator type.
enum AcceleratorType {
// Unspecified accelerator type, which means no accelerator.
ACCELERATOR_TYPE_UNSPECIFIED = 0;
// Nvidia Tesla K80 GPU.
NVIDIA_TESLA_K80 = 1;
// Nvidia Tesla P100 GPU.
NVIDIA_TESLA_P100 = 2;
// Nvidia Tesla V100 GPU.
NVIDIA_TESLA_V100 = 3;
// Nvidia Tesla P4 GPU.
NVIDIA_TESLA_P4 = 4;
// Nvidia Tesla T4 GPU.
NVIDIA_TESLA_T4 = 5;
// TPU v2.
TPU_V2 = 6;
// TPU v3.
TPU_V3 = 7;
}

@ -0,0 +1,18 @@
type: com.google.api.codegen.ConfigProto
config_schema_version: 2.0.0
language_settings:
java:
package_name: com.google.cloud.aiplatform.v1beta1
python:
package_name: google.cloud.aiplatform_v1beta1.gapic
go:
package_name: cloud.google.com/go/aiplatform/apiv1beta1
csharp:
package_name: Google.Aiplatform.V1Beta1
ruby:
package_name: Google::Cloud::Aiplatform::V1Beta1
php:
package_name: Google\Cloud\Aiplatform\V1Beta1
nodejs:
package_name: aiplatform.v1beta1
domain_layer_location: google-cloud

@ -0,0 +1,279 @@
{
"methodConfig": [
{
"name": [
{
"service": "google.cloud.aiplatform.v1beta1.DatasetService",
"method": "CreateDataset"
},
{
"service": "google.cloud.aiplatform.v1beta1.DatasetService",
"method": "GetDataset"
},
{
"service": "google.cloud.aiplatform.v1beta1.DatasetService",
"method": "UpdateDataset"
},
{
"service": "google.cloud.aiplatform.v1beta1.DatasetService",
"method": "ListDatasets"
},
{
"service": "google.cloud.aiplatform.v1beta1.DatasetService",
"method": "DeleteDataset"
},
{
"service": "google.cloud.aiplatform.v1beta1.DatasetService",
"method": "ImportData"
},
{
"service": "google.cloud.aiplatform.v1beta1.DatasetService",
"method": "ExportData"
},
{
"service": "google.cloud.aiplatform.v1beta1.DatasetService",
"method": "ListDataItems"
},
{
"service": "google.cloud.aiplatform.v1beta1.DatasetService",
"method": "GetAnnotationSpec"
},
{
"service": "google.cloud.aiplatform.v1beta1.DatasetService",
"method": "ListAnnotations"
}
],
"timeout": "5s"
},
{
"name":[
{
"service": "google.cloud.aiplatform.v1beta1.EndpointService",
"method": "CreateEndpoint"
},
{
"service": "google.cloud.aiplatform.v1beta1.EndpointService",
"method": "GetEndpoint"
},
{
"service": "google.cloud.aiplatform.v1beta1.EndpointService",
"method": "ListEndpoints"
},
{
"service": "google.cloud.aiplatform.v1beta1.EndpointService",
"method": "UpdateEndpoint"
},
{
"service": "google.cloud.aiplatform.v1beta1.EndpointService",
"method": "DeleteEndpoint"
},
{
"service": "google.cloud.aiplatform.v1beta1.EndpointService",
"method": "DeployModel"
},
{
"service": "google.cloud.aiplatform.v1beta1.EndpointService",
"method": "UndeployModel"
}
],
"timeout": "5s"
},
{
"name":[
{
"service": "google.cloud.aiplatform.v1beta1.JobService",
"method": "CreateCustomJob"
},
{
"service": "google.cloud.aiplatform.v1beta1.JobService",
"method": "GetCustomJob"
},
{
"service": "google.cloud.aiplatform.v1beta1.JobService",
"method": "ListCustomJobs"
},
{
"service": "google.cloud.aiplatform.v1beta1.JobService",
"method": "DeleteCustomJob"
},
{
"service": "google.cloud.aiplatform.v1beta1.JobService",
"method": "CancelCustomJob"
},
{
"service": "google.cloud.aiplatform.v1beta1.JobService",
"method": "CreateDataLabelingJob"
},
{
"service": "google.cloud.aiplatform.v1beta1.JobService",
"method": "GetDataLabelingJob"
},
{
"service": "google.cloud.aiplatform.v1beta1.JobService",
"method": "ListDataLabelingJobs"
},
{
"service": "google.cloud.aiplatform.v1beta1.JobService",
"method": "DeleteDataLabelingJob"
},
{
"service": "google.cloud.aiplatform.v1beta1.JobService",
"method": "CancelDataLabelingJob"
},
{
"service": "google.cloud.aiplatform.v1beta1.JobService",
"method": "CreateHyperparameterTuningJob"
},
{
"service": "google.cloud.aiplatform.v1beta1.JobService",
"method": "GetHyperparameterTuningJob"
},
{
"service": "google.cloud.aiplatform.v1beta1.JobService",
"method": "ListHyperparameterTuningJobs"
},
{
"service": "google.cloud.aiplatform.v1beta1.JobService",
"method": "DeleteHyperparameterTuningJob"
},
{
"service": "google.cloud.aiplatform.v1beta1.JobService",
"method": "CancelHyperparameterTuningJob"
},
{
"service": "google.cloud.aiplatform.v1beta1.JobService",
"method": "CreateBatchPredictionJob"
},
{
"service": "google.cloud.aiplatform.v1beta1.JobService",
"method": "GetBatchPredictionJob"
},
{
"service": "google.cloud.aiplatform.v1beta1.JobService",
"method": "ListBatchPredictionJobs"
},
{
"service": "google.cloud.aiplatform.v1beta1.JobService",
"method": "DeleteBatchPredictionJob"
},
{
"service": "google.cloud.aiplatform.v1beta1.JobService",
"method": "CancelBatchPredictionJob"
}
],
"timeout": "5s"
},
{
"name":[
{
"service": "google.cloud.aiplatform.v1beta1.ModelService",
"method": "UploadModel"
},
{
"service": "google.cloud.aiplatform.v1beta1.ModelService",
"method": "GetModel"
},
{
"service": "google.cloud.aiplatform.v1beta1.ModelService",
"method": "ListModels"
},
{
"service": "google.cloud.aiplatform.v1beta1.ModelService",
"method": "UpdateModel"
},
{
"service": "google.cloud.aiplatform.v1beta1.ModelService",
"method": "DeleteModel"
},
{
"service": "google.cloud.aiplatform.v1beta1.ModelService",
"method": "ExportModel"
},
{
"service": "google.cloud.aiplatform.v1beta1.ModelService",
"method": "GetModelEvaluation"
},
{
"service": "google.cloud.aiplatform.v1beta1.ModelService",
"method": "ListModelEvaluations"
},
{
"service": "google.cloud.aiplatform.v1beta1.ModelService",
"method": "GetModelEvaluationSlice"
},
{
"service": "google.cloud.aiplatform.v1beta1.ModelService",
"method": "ListModelEvaluationSlices"
},
{
"service": "google.cloud.aiplatform.v1beta1.ModelService",
"method": "ExportEvaluatedDataItems"
}
],
"timeout": "5s"
},
{
"name":[
{
"service": "google.cloud.aiplatform.v1beta1.PipelineService",
"method": "CreateTrainingPipeline"
},
{
"service": "google.cloud.aiplatform.v1beta1.PipelineService",
"method": "GetTrainingPipeline"
},
{
"service": "google.cloud.aiplatform.v1beta1.PipelineService",
"method": "ListTrainingPipelines"
},
{
"service": "google.cloud.aiplatform.v1beta1.PipelineService",
"method": "DeleteTrainingPipeline"
},
{
"service": "google.cloud.aiplatform.v1beta1.PipelineService",
"method": "CancelTrainingPipeline"
}
],
"timeout": "5s"
},
{
"name":[
{
"service": "google.cloud.aiplatform.v1beta1.PredictionService",
"method": "Predict"
},
{
"service": "google.cloud.aiplatform.v1beta1.PredictionService",
"method": "Explain"
}
],
"timeout": "5s"
},
{
"name":[
{
"service": "google.cloud.aiplatform.v1beta1.SpecialistPoolService",
"method": "CreateSpecialistPool"
},
{
"service": "google.cloud.aiplatform.v1beta1.SpecialistPoolService",
"method": "GetSpecialistPool"
},
{
"service": "google.cloud.aiplatform.v1beta1.SpecialistPoolService",
"method": "ListSpecialistPools"
},
{
"service": "google.cloud.aiplatform.v1beta1.SpecialistPoolService",
"method": "DeleteSpecialistPool"
},
{
"service": "google.cloud.aiplatform.v1beta1.SpecialistPoolService",
"method": "UpdateSpecialistPool"
}
],
"timeout": "5s"
}
]
}

@ -0,0 +1,104 @@
type: google.api.Service
config_version: 3
name: aiplatform.googleapis.com
title: Cloud AI Platform API
apis:
- name: google.cloud.aiplatform.v1beta1.DatasetService
- name: google.cloud.aiplatform.v1beta1.EndpointService
- name: google.cloud.aiplatform.v1beta1.JobService
- name: google.cloud.aiplatform.v1beta1.ModelService
- name: google.cloud.aiplatform.v1beta1.PipelineService
- name: google.cloud.aiplatform.v1beta1.PredictionService
- name: google.cloud.aiplatform.v1beta1.SpecialistPoolService
types:
- name: google.cloud.aiplatform.v1beta1.CreateDatasetOperationMetadata
- name: google.cloud.aiplatform.v1beta1.CreateEndpointOperationMetadata
- name: google.cloud.aiplatform.v1beta1.CreateSpecialistPoolOperationMetadata
- name: google.cloud.aiplatform.v1beta1.DeleteOperationMetadata
- name: google.cloud.aiplatform.v1beta1.DeployModelOperationMetadata
- name: google.cloud.aiplatform.v1beta1.DeployModelResponse
- name: google.cloud.aiplatform.v1beta1.ExportDataOperationMetadata
- name: google.cloud.aiplatform.v1beta1.ExportDataResponse
- name: google.cloud.aiplatform.v1beta1.ExportModelOperationMetadata
- name: google.cloud.aiplatform.v1beta1.ExportModelResponse
- name: google.cloud.aiplatform.v1beta1.ImportDataOperationMetadata
- name: google.cloud.aiplatform.v1beta1.ImportDataResponse
- name: google.cloud.aiplatform.v1beta1.SpecialistPool
- name: google.cloud.aiplatform.v1beta1.UndeployModelOperationMetadata
- name: google.cloud.aiplatform.v1beta1.UndeployModelResponse
- name: google.cloud.aiplatform.v1beta1.UpdateSpecialistPoolOperationMetadata
- name: google.cloud.aiplatform.v1beta1.UploadModelOperationMetadata
- name: google.cloud.aiplatform.v1beta1.UploadModelResponse
documentation:
summary: |-
Train high-quality custom machine learning models with minimum effort and
machine learning expertise.
overview: |-
Cloud AI Platform is a suite of machine learning tools that enables
developers to train high-quality models specific to their business needs.
It offers both novices and experts the best workbench for machine learning
development by leveraging Google's state-of-the-art transfer learning and
Neural Architecture Search technology.
backend:
rules:
- selector: 'google.cloud.aiplatform.v1beta1.DatasetService.*'
deadline: 60.0
- selector: 'google.cloud.aiplatform.v1beta1.EndpointService.*'
deadline: 60.0
- selector: 'google.cloud.aiplatform.v1beta1.JobService.*'
deadline: 60.0
- selector: 'google.cloud.aiplatform.v1beta1.ModelService.*'
deadline: 60.0
- selector: 'google.cloud.aiplatform.v1beta1.PipelineService.*'
deadline: 60.0
- selector: google.cloud.aiplatform.v1beta1.PredictionService.Explain
deadline: 600.0
- selector: google.cloud.aiplatform.v1beta1.PredictionService.Predict
deadline: 600.0
- selector: 'google.cloud.aiplatform.v1beta1.SpecialistPoolService.*'
deadline: 60.0
- selector: 'google.longrunning.Operations.*'
deadline: 60.0
authentication:
rules:
- selector: 'google.cloud.aiplatform.v1beta1.DatasetService.*'
oauth:
canonical_scopes: |-
https://www.googleapis.com/auth/cloud-platform
- selector: 'google.cloud.aiplatform.v1beta1.EndpointService.*'
oauth:
canonical_scopes: |-
https://www.googleapis.com/auth/cloud-platform
- selector: 'google.cloud.aiplatform.v1beta1.JobService.*'
oauth:
canonical_scopes: |-
https://www.googleapis.com/auth/cloud-platform
- selector: 'google.cloud.aiplatform.v1beta1.ModelService.*'
oauth:
canonical_scopes: |-
https://www.googleapis.com/auth/cloud-platform
- selector: 'google.cloud.aiplatform.v1beta1.PipelineService.*'
oauth:
canonical_scopes: |-
https://www.googleapis.com/auth/cloud-platform
- selector: google.cloud.aiplatform.v1beta1.PredictionService.Explain
oauth:
canonical_scopes: |-
https://www.googleapis.com/auth/cloud-platform
- selector: google.cloud.aiplatform.v1beta1.PredictionService.Predict
oauth:
canonical_scopes: |-
https://www.googleapis.com/auth/cloud-platform
- selector: 'google.cloud.aiplatform.v1beta1.SpecialistPoolService.*'
oauth:
canonical_scopes: |-
https://www.googleapis.com/auth/cloud-platform
- selector: 'google.longrunning.Operations.*'
oauth:
canonical_scopes: |-
https://www.googleapis.com/auth/cloud-platform

@ -0,0 +1,88 @@
// Copyright 2020 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/user_action_reference.proto";
import "google/protobuf/struct.proto";
import "google/protobuf/timestamp.proto";
import "google/api/annotations.proto";
option go_package = "google.golang.org/genproto/googleapis/cloud/aiplatform/v1beta1;aiplatform";
option java_multiple_files = true;
option java_outer_classname = "AnnotationProto";
option java_package = "com.google.cloud.aiplatform.v1beta1";
// Used to assign specific AnnotationSpec to a particular area of a DataItem or
// the whole part of the DataItem.
message Annotation {
option (google.api.resource) = {
type: "aiplatform.googleapis.com/Annotation"
pattern: "projects/{project}/locations/{location}/datasets/{dataset}/dataItems/{data_item}/annotations/{annotation}"
};
// Output only. Resource name of the Annotation.
string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
// Required. Google Cloud Storage URI points to a YAML file describing [payload][google.cloud.aiplatform.v1beta1.Annotation.payload]. The
// schema is defined as an
// [OpenAPI 3.0.2 Schema Object](https://tinyurl.com/y538mdwt).
// The schema files that can be used here are found in
// gs://google-cloud-aiplatform/schema/dataset/annotation/, note that the
// chosen schema must be consistent with the parent Dataset's
// [metadata][google.cloud.aiplatform.v1beta1.Dataset.metadata_schema_uri].
string payload_schema_uri = 2 [(google.api.field_behavior) = REQUIRED];
// Required. The schema of the payload can be found in
// [payload_schema][google.cloud.aiplatform.v1beta1.Annotation.payload_schema_uri].
google.protobuf.Value payload = 3 [(google.api.field_behavior) = REQUIRED];
// Output only. Timestamp when this Annotation was created.
google.protobuf.Timestamp create_time = 4 [(google.api.field_behavior) = OUTPUT_ONLY];
// Output only. Timestamp when this Annotation was last updated.
google.protobuf.Timestamp update_time = 7 [(google.api.field_behavior) = OUTPUT_ONLY];
// Optional. Used to perform a consistent read-modify-write updates. If not set, a blind
// "overwrite" update happens.
string etag = 8 [(google.api.field_behavior) = OPTIONAL];
// Output only. The source of the Annotation.
UserActionReference annotation_source = 5 [(google.api.field_behavior) = OUTPUT_ONLY];
// Optional. The labels with user-defined metadata to organize your Annotations.
//
// Label keys and values can be no longer than 64 characters
// (Unicode codepoints), can only contain lowercase letters, numeric
// characters, underscores and dashes. International characters are allowed.
// No more than 64 user labels can be associated with one Annotation(System
// labels are excluded).
//
// See https://goo.gl/xmQnxf for more information and examples of labels.
// System reserved label keys are prefixed with "aiplatform.googleapis.com/"
// and are immutable. Following system labels exist for each Annotation:
//
// * "aiplatform.googleapis.com/annotation_set_name":
// optional, name of the UI's annotation set this Annotation belongs to.
// If not set the Annotation is not visible in the UI.
//
// * "aiplatform.googleapis.com/payload_schema":
// output only, its value is the [payload_schema's][google.cloud.aiplatform.v1beta1.Annotation.payload_schema_uri]
// title.
map<string, string> labels = 6 [(google.api.field_behavior) = OPTIONAL];
}

@ -0,0 +1,53 @@
// Copyright 2020 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/protobuf/timestamp.proto";
import "google/api/annotations.proto";
option go_package = "google.golang.org/genproto/googleapis/cloud/aiplatform/v1beta1;aiplatform";
option java_multiple_files = true;
option java_outer_classname = "AnnotationSpecProto";
option java_package = "com.google.cloud.aiplatform.v1beta1";
// Identifies a concept with which DataItems may be annotated with.
message AnnotationSpec {
option (google.api.resource) = {
type: "aiplatform.googleapis.com/AnnotationSpec"
pattern: "projects/{project}/locations/{location}/datasets/{dataset}/annotationSpecs/{annotation_spec}"
};
// Output only. Resource name of the AnnotationSpec.
string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
// Required. The user-defined name of the AnnotationSpec.
// The name can be up to 128 characters long and can be consist of any UTF-8
// characters.
string display_name = 2 [(google.api.field_behavior) = REQUIRED];
// Output only. Timestamp when this AnnotationSpec was created.
google.protobuf.Timestamp create_time = 3 [(google.api.field_behavior) = OUTPUT_ONLY];
// Output only. Timestamp when AnnotationSpec was last updated.
google.protobuf.Timestamp update_time = 4 [(google.api.field_behavior) = OUTPUT_ONLY];
// Optional. Used to perform a consistent read-modify-write updates. If not set, a blind
// "overwrite" update happens.
string etag = 5 [(google.api.field_behavior) = OPTIONAL];
}

@ -0,0 +1,267 @@
// Copyright 2020 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/completion_stats.proto";
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/protobuf/struct.proto";
import "google/protobuf/timestamp.proto";
import "google/rpc/status.proto";
import "google/api/annotations.proto";
option go_package = "google.golang.org/genproto/googleapis/cloud/aiplatform/v1beta1;aiplatform";
option java_multiple_files = true;
option java_outer_classname = "BatchPredictionJobProto";
option java_package = "com.google.cloud.aiplatform.v1beta1";
// A job that uses a [Model][google.cloud.aiplatform.v1beta1.BatchPredictionJob.model] to produce predictions
// on multiple [input instances][google.cloud.aiplatform.v1beta1.BatchPredictionJob.input_config]. If
// predictions for significant portion of the instances fail, the job may finish
// without attempting predictions for all remaining instances.
message BatchPredictionJob {
option (google.api.resource) = {
type: "aiplatform.googleapis.com/BatchPredictionJob"
pattern: "projects/{project}/locations/{location}/batchPredictionJobs/{batch_prediction_job}"
};
// Configures the input to [BatchPredictionJob][google.cloud.aiplatform.v1beta1.BatchPredictionJob].
// See [Model.supported_input_storage_formats][google.cloud.aiplatform.v1beta1.Model.supported_input_storage_formats] for Model's supported input
// formats, and how instances should be expressed via any of them.
message InputConfig {
// Required. The source of the input.
oneof source {
// The Google Cloud Storage location for the input instances.
GcsSource gcs_source = 2;
// The BigQuery location of the input table.
// The schema of the table should be in the format described by the given
// context OpenAPI Schema, if one is provided. The table may contain
// additional columns that are not described by the schema, and they will
// be ignored.
BigQuerySource bigquery_source = 3;
}
// Required. The format in which instances are given, must be one of the
// [Model's][google.cloud.aiplatform.v1beta1.BatchPredictionJob.model]
// [supported_input_storage_formats][google.cloud.aiplatform.v1beta1.Model.supported_input_storage_formats].
string instances_format = 1 [(google.api.field_behavior) = REQUIRED];
}
// Configures the output of [BatchPredictionJob][google.cloud.aiplatform.v1beta1.BatchPredictionJob].
// See [Model.supported_output_storage_formats][google.cloud.aiplatform.v1beta1.Model.supported_output_storage_formats] for supported output
// formats, and how predictions are expressed via any of them.
message OutputConfig {
// Required. The destination of the output.
oneof destination {
// The Google Cloud Storage location of the directory where the output is
// to be written to. In the given directory a new directory is created.
// Its name is `prediction-<model-display-name>-<job-create-time>`,
// where timestamp is in YYYY-MM-DDThh:mm:ss.sssZ ISO-8601 format.
// Inside of it files `predictions_0001.<extension>`,
// `predictions_0002.<extension>`, ..., `predictions_N.<extension>`
// are created where `<extension>` depends on chosen
// [predictions_format][google.cloud.aiplatform.v1beta1.BatchPredictionJob.OutputConfig.predictions_format], and N may equal 0001 and depends on the total
// number of successfully predicted instances.
// If the Model has both [instance][google.cloud.aiplatform.v1beta1.PredictSchemata.instance_schema_uri]
// and [prediction][google.cloud.aiplatform.v1beta1.PredictSchemata.parameters_schema_uri] schemata
// defined then each such file contains predictions as per the
// [predictions_format][google.cloud.aiplatform.v1beta1.BatchPredictionJob.OutputConfig.predictions_format].
// If prediction for any instance failed (partially or completely), then
// an additional `errors_0001.<extension>`, `errors_0002.<extension>`,...,
// `errors_N.<extension>` files are created (N depends on total number
// of failed predictions). These files contain the failed instances,
// as per their schema, followed by an additional `error` field which as
// value has
// [`google.rpc.Status`](Status)
// containing only `code` and `message` fields.
GcsDestination gcs_destination = 2;
// The BigQuery project location where the output is to be written to.
// In the given project a new dataset is created with name
// `prediction_<model-display-name>_<job-create-time>`
// where <model-display-name> is made
// BigQuery-dataset-name compatible (for example, most special characters
// become underscores), and timestamp is in
// YYYY_MM_DDThh_mm_ss_sssZ "based on ISO-8601" format. In the dataset
// two tables will be created, `predictions`, and `errors`.
// If the Model has both [instance][google.cloud.aiplatform.v1beta1.PredictSchemata.instance_schema_uri]
// and [prediction][google.cloud.aiplatform.v1beta1.PredictSchemata.parameters_schema_uri] schemata
// defined then the tables have columns as follows: The `predictions`
// table contains instances for which the prediction succeeded, it
// has columns as per a concatenation of the Model's instance and
// prediction schemata. The `errors` table contains rows for which the
// prediction has failed, it has instance columns, as per the
// instance schema, followed by a single "errors" column, which as values
// has [`google.rpc.Status`](Status)
// represented as a STRUCT, and containing only `code` and `message`.
BigQueryDestination bigquery_destination = 3;
}
// Required. The format in which AI Platform gives the predictions, must be one of the
// [Model's][google.cloud.aiplatform.v1beta1.BatchPredictionJob.model]
//
// [supported_output_storage_formats][google.cloud.aiplatform.v1beta1.Model.supported_output_storage_formats].
string predictions_format = 1 [(google.api.field_behavior) = REQUIRED];
}
// Further describes this job's output.
// Supplements [output_config][google.cloud.aiplatform.v1beta1.BatchPredictionJob.output_config].
message OutputInfo {
// The output location into which prediction output is written.
oneof output_location {
// Output only. The full path of the Google Cloud Storage directory created, into which
// the prediction output is written.
string gcs_output_directory = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
// Output only. The path of the BigQuery dataset created, in
// `bq://projectId.bqDatasetId`
// format, into which the prediction output is written.
string bigquery_output_dataset = 2 [(google.api.field_behavior) = OUTPUT_ONLY];
}
}
// Output only. Resource name of the BatchPredictionJob.
string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
// Required. The user-defined name of this BatchPredictionJob.
string display_name = 2 [(google.api.field_behavior) = REQUIRED];
// Required. The name of the Model that produces the predictions via this job,
// must share the same ancestor Location.
// Starting this job has no impact on any existing deployments of the Model
// and their resources.
string model = 3 [
(google.api.field_behavior) = REQUIRED,
(google.api.resource_reference) = {
type: "aiplatform.googleapis.com/Model"
}
];
// Required. Input configuration of the instances on which predictions are performed.
// The schema of any single instance may be specified via
// the [Model's][google.cloud.aiplatform.v1beta1.BatchPredictionJob.model]
// [PredictSchemata's][google.cloud.aiplatform.v1beta1.Model.predict_schemata]
// [instance_schema_uri][google.cloud.aiplatform.v1beta1.PredictSchemata.instance_schema_uri].
InputConfig input_config = 4 [(google.api.field_behavior) = REQUIRED];
// The parameters that govern the predictions. The schema of the parameters
// may be specified via the [Model's][google.cloud.aiplatform.v1beta1.BatchPredictionJob.model]
// [PredictSchemata's][google.cloud.aiplatform.v1beta1.Model.predict_schemata]
// [parameters_schema_uri][google.cloud.aiplatform.v1beta1.PredictSchemata.parameters_schema_uri].
google.protobuf.Value model_parameters = 5;
// Required. The Configuration specifying where output predictions should
// be written.
// The schema of any single prediction may be specified as a concatenation
// of [Model's][google.cloud.aiplatform.v1beta1.BatchPredictionJob.model]
// [PredictSchemata's][google.cloud.aiplatform.v1beta1.Model.predict_schemata]
// [instance_schema_uri][google.cloud.aiplatform.v1beta1.PredictSchemata.instance_schema_uri]
// and
// [prediction_schema_uri][google.cloud.aiplatform.v1beta1.PredictSchemata.prediction_schema_uri].
OutputConfig output_config = 6 [(google.api.field_behavior) = REQUIRED];
// The config of resources used by the Model during the batch prediction. If
// the Model [supports][google.cloud.aiplatform.v1beta1.Model.supported_deployment_resources_types]
// DEDICATED_RESOURCES this config may be provided (and the job will use these
// resources), if the Model doesn't support AUTOMATIC_RESOURCES, this config
// must be provided.
BatchDedicatedResources dedicated_resources = 7;
// Immutable. Parameters configuring the batch behavior. Currently only applicable when
// [dedicated_resources][google.cloud.aiplatform.v1beta1.BatchPredictionJob.dedicated_resources] are used (in other cases AI Platform does
// the tuning itself).
ManualBatchTuningParameters manual_batch_tuning_parameters = 8 [(google.api.field_behavior) = IMMUTABLE];
// Generate explanation along with the batch prediction results.
//
// This can only be set to true for AutoML tabular Models, and only when the
// output destination is BigQuery. When it's true, the batch prediction
// output will include a column named `feature_attributions`.
//
// For AutoML tabular Models, the value of the `feature_attributions` column
// is a struct that maps from string to number. The keys in the map are the
// names of the features. The values in the map are the how much the features
// contribute to the predicted result. Features are defined as follows:
//
// * A scalar column defines a feature of the same name as the column.
//
// * A struct column defines multiple features, one feature per leaf field.
// The feature name is the fully qualified path for the leaf field,
// separated by ".". For example a column `key1` in the format of
// {"value1": {"prop1": number}, "value2": number} defines two features:
// `key1.value1.prop1` and `key1.value2`
//
// Attributions of each feature is represented as an extra column in the
// batch prediction output BigQuery table.
//
bool generate_explanation = 23;
// Output only. Information further describing the output of this job.
OutputInfo output_info = 9 [(google.api.field_behavior) = OUTPUT_ONLY];
// Output only. The detailed state of the job.
JobState state = 10 [(google.api.field_behavior) = OUTPUT_ONLY];
// Output only. Only populated when the job's state is JOB_STATE_FAILED or
// JOB_STATE_CANCELLED.
google.rpc.Status error = 11 [(google.api.field_behavior) = OUTPUT_ONLY];
// Output only. Partial failures encountered.
// For example, single files that can't be read.
// This field never exceeds 20 entries.
// Status details fields contain standard GCP error details.
repeated google.rpc.Status partial_failures = 12 [(google.api.field_behavior) = OUTPUT_ONLY];
// Output only. Information about resources that had been consumed by this job.
// Provided in real time at best effort basis, as well as a final value
// once the job completes.
//
// Note: This field currently may be not populated for batch predictions that
// use AutoML Models.
ResourcesConsumed resources_consumed = 13 [(google.api.field_behavior) = OUTPUT_ONLY];
// Output only. Statistics on completed and failed prediction instances.
CompletionStats completion_stats = 14 [(google.api.field_behavior) = OUTPUT_ONLY];
// Output only. Time when the BatchPredictionJob was created.
google.protobuf.Timestamp create_time = 15 [(google.api.field_behavior) = OUTPUT_ONLY];
// Output only. Time when the BatchPredictionJob for the first time entered the
// `JOB_STATE_RUNNING` state.
google.protobuf.Timestamp start_time = 16 [(google.api.field_behavior) = OUTPUT_ONLY];
// Output only. Time when the BatchPredictionJob entered any of the following states:
// `JOB_STATE_SUCCEEDED`, `JOB_STATE_FAILED`, `JOB_STATE_CANCELLED`.
google.protobuf.Timestamp end_time = 17 [(google.api.field_behavior) = OUTPUT_ONLY];
// Output only. Time when the BatchPredictionJob was most recently updated.
google.protobuf.Timestamp update_time = 18 [(google.api.field_behavior) = OUTPUT_ONLY];
// The labels with user-defined metadata to organize BatchPredictionJobs.
//
// Label keys and values can be no longer than 64 characters
// (Unicode codepoints), can only contain lowercase letters, numeric
// characters, underscores and dashes. International characters are allowed.
//
// See https://goo.gl/xmQnxf for more information and examples of labels.
map<string, string> labels = 19;
}

@ -0,0 +1,43 @@
// Copyright 2020 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/rpc/status.proto";
import "google/api/annotations.proto";
option go_package = "google.golang.org/genproto/googleapis/cloud/aiplatform/v1beta1;aiplatform";
option java_multiple_files = true;
option java_outer_classname = "CompletionStatsProto";
option java_package = "com.google.cloud.aiplatform.v1beta1";
// Success and error statistics of processing multiple entities
// (for example, DataItems or structured data rows) in batch.
message CompletionStats {
// Output only. The number of entities that had been processed successfully.
int64 successful_count = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
// Output only. The number of entities for which any error was encountered.
int64 failed_count = 2 [(google.api.field_behavior) = OUTPUT_ONLY];
// Output only. In cases when enough errors are encountered a job, pipeline, or operation
// may be failed as a whole. Below is the number of entities for which the
// processing had not been finished (either in successful or failed state).
// Set to -1 if the number is unknown (for example, the operation failed
// before the total entity number could be collected).
int64 incomplete_count = 3 [(google.api.field_behavior) = OUTPUT_ONLY];
}

@ -0,0 +1,182 @@
// Copyright 2020 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/env_var.proto";
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/protobuf/duration.proto";
import "google/protobuf/timestamp.proto";
import "google/rpc/status.proto";
import "google/api/annotations.proto";
option go_package = "google.golang.org/genproto/googleapis/cloud/aiplatform/v1beta1;aiplatform";
option java_multiple_files = true;
option java_outer_classname = "CustomJobProto";
option java_package = "com.google.cloud.aiplatform.v1beta1";
// Represents a job that runs custom workloads such as a Docker container or a
// Python package. A CustomJob can have multiple worker pools and each worker
// pool can have its own machine and input spec. A CustomJob will be cleaned up
// once the job enters terminal state (failed or succeeded).
message CustomJob {
option (google.api.resource) = {
type: "aiplatform.googleapis.com/CustomJob"
pattern: "projects/{project}/locations/{location}/customJobs/{custom_job}"
};
// Output only. Resource name of a CustomJob.
string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
// Required. The display name of the CustomJob.
// The name can be up to 128 characters long and can be consist of any UTF-8
// characters.
string display_name = 2 [(google.api.field_behavior) = REQUIRED];
// Required. Job spec.
CustomJobSpec job_spec = 4 [(google.api.field_behavior) = REQUIRED];
// Output only. The detailed state of the job.
JobState state = 5 [(google.api.field_behavior) = OUTPUT_ONLY];
// Output only. Time when the CustomJob was created.
google.protobuf.Timestamp create_time = 6 [(google.api.field_behavior) = OUTPUT_ONLY];
// Output only. Time when the CustomJob for the first time entered the
// `JOB_STATE_RUNNING` state.
google.protobuf.Timestamp start_time = 7 [(google.api.field_behavior) = OUTPUT_ONLY];
// Output only. Time when the CustomJob entered any of the following states:
// `JOB_STATE_SUCCEEDED`, `JOB_STATE_FAILED`, `JOB_STATE_CANCELLED`.
google.protobuf.Timestamp end_time = 8 [(google.api.field_behavior) = OUTPUT_ONLY];
// Output only. Time when the CustomJob was most recently updated.
google.protobuf.Timestamp update_time = 9 [(google.api.field_behavior) = OUTPUT_ONLY];
// Output only. Only populated when job's state is `JOB_STATE_FAILED` or
// `JOB_STATE_CANCELLED`.
google.rpc.Status error = 10 [(google.api.field_behavior) = OUTPUT_ONLY];
// The labels with user-defined metadata to organize CustomJobs.
//
// Label keys and values can be no longer than 64 characters
// (Unicode codepoints), can only contain lowercase letters, numeric
// characters, underscores and dashes. International characters are allowed.
//
// See https://goo.gl/xmQnxf for more information and examples of labels.
map<string, string> labels = 11;
}
// Represents the spec of a CustomJob.
message CustomJobSpec {
// Required. The spec of the worker pools including machine type and Docker image.
repeated WorkerPoolSpec worker_pool_specs = 1 [(google.api.field_behavior) = REQUIRED];
// Scheduling options for a CustomJob.
Scheduling scheduling = 3;
// The Google Cloud Storage location to store the output of this CustomJob or
// HyperparameterTuningJob. For HyperparameterTuningJob,
// [base_output_directory][CustomJob.job_spec.base_output_directory] of
// each child CustomJob backing a Trial is set to a subdirectory of name
// [id][google.cloud.aiplatform.v1beta1.Trial.id] under parent HyperparameterTuningJob's
//
// [base_output_directory][HyperparameterTuningJob.trial_job_spec.base_output_directory].
//
// Following AI Platform environment variables will be passed to containers or
// python modules when this field is set:
//
// For CustomJob:
// * AIP_MODEL_DIR = `<base_output_directory>/model/`
// * AIP_CHECKPOINT_DIR = `<base_output_directory>/checkpoints/`
// * AIP_TENSORBOARD_LOG_DIR = `<base_output_directory>/logs/`
//
// For CustomJob backing a Trial of HyperparameterTuningJob:
// * AIP_MODEL_DIR = `<base_output_directory>/<trial_id>/model/`
// * AIP_CHECKPOINT_DIR = `<base_output_directory>/<trial_id>/checkpoints/`
// * AIP_TENSORBOARD_LOG_DIR = `<base_output_directory>/<trial_id>/logs/`
GcsDestination base_output_directory = 6;
}
// Represents the spec of a worker pool in a job.
message WorkerPoolSpec {
// The custom task to be executed in this worker pool.
oneof task {
// The custom container task.
ContainerSpec container_spec = 6;
// The Python packaged task.
PythonPackageSpec python_package_spec = 7;
}
// Required. Immutable. The specification of a single machine.
MachineSpec machine_spec = 1 [
(google.api.field_behavior) = REQUIRED,
(google.api.field_behavior) = IMMUTABLE
];
// Required. The number of worker replicas to use for this worker pool.
int64 replica_count = 2 [(google.api.field_behavior) = REQUIRED];
}
// The spec of a Container.
message ContainerSpec {
// Required. The URI of a container image in the Container Registry that is to be run on
// each worker replica.
string image_uri = 1 [(google.api.field_behavior) = REQUIRED];
// The command to be invoked when the container is started.
// It overrides the entrypoint instruction in Dockerfile when provided.
repeated string command = 2;
// The arguments to be passed when starting the container.
repeated string args = 3;
}
// The spec of a Python packaged code.
message PythonPackageSpec {
// Required. The URI of a container image in the Container Registry that will run the
// provided python package. AI Platform provides wide range of executor images
// with pre-installed packages to meet users' various use cases. Only one of
// the provided images can be set here.
string executor_image_uri = 1 [(google.api.field_behavior) = REQUIRED];
// Required. The Google Cloud Storage location of the Python package files which are
// the training program and its dependent packages.
// The maximum number of package URIs is 100.
repeated string package_uris = 2 [(google.api.field_behavior) = REQUIRED];
// Required. The Python module name to run after installing the packages.
string python_module = 3 [(google.api.field_behavior) = REQUIRED];
// Command line arguments to be passed to the Python task.
repeated string args = 4;
}
// All parameters related to queuing and scheduling of custom jobs.
message Scheduling {
// The maximum job running time. The default is 7 days.
google.protobuf.Duration timeout = 1;
// Restarts the entire CustomJob if a worker gets restarted.
// This feature can be used by distributed training jobs that are not
// resilient to workers leaving and joining a job.
bool restart_job_on_worker_restart = 3;
}

@ -0,0 +1,68 @@
// Copyright 2020 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/protobuf/struct.proto";
import "google/protobuf/timestamp.proto";
import "google/api/annotations.proto";
option go_package = "google.golang.org/genproto/googleapis/cloud/aiplatform/v1beta1;aiplatform";
option java_multiple_files = true;
option java_outer_classname = "DataItemProto";
option java_package = "com.google.cloud.aiplatform.v1beta1";
// A piece of data in a Dataset. Could be an image, a video, a document or plain
// text.
message DataItem {
option (google.api.resource) = {
type: "aiplatform.googleapis.com/DataItem"
pattern: "projects/{project}/locations/{location}/datasets/{dataset}/dataItems/{data_item}"
};
// Output only. The resource name of the DataItem.
string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
// Output only. Timestamp when this DataItem was created.
google.protobuf.Timestamp create_time = 2 [(google.api.field_behavior) = OUTPUT_ONLY];
// Output only. Timestamp when this DataItem was last updated.
google.protobuf.Timestamp update_time = 6 [(google.api.field_behavior) = OUTPUT_ONLY];
// Optional. The labels with user-defined metadata to organize your DataItems.
//
// Label keys and values can be no longer than 64 characters
// (Unicode codepoints), can only contain lowercase letters, numeric
// characters, underscores and dashes. International characters are allowed.
// No more than 64 user labels can be associated with one DataItem(System
// labels are excluded).
//
// See https://goo.gl/xmQnxf for more information and examples of labels.
// System reserved label keys are prefixed with "aiplatform.googleapis.com/"
// and are immutable.
map<string, string> labels = 3 [(google.api.field_behavior) = OPTIONAL];
// Required. The data that the DataItem represents (for example, an image or a text
// snippet). The schema of the payload is stored in the parent Dataset's
// [metadata schema's][google.cloud.aiplatform.v1beta1.Dataset.metadata_schema_uri] dataItemSchemaUri field.
google.protobuf.Value payload = 4 [(google.api.field_behavior) = REQUIRED];
// Optional. Used to perform a consistent read-modify-write updates. If not set, a blind
// "overwrite" update happens.
string etag = 7 [(google.api.field_behavior) = OPTIONAL];
}

@ -0,0 +1,194 @@
// Copyright 2020 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/accelerator_type.proto";
import "google/cloud/aiplatform/v1beta1/job_state.proto";
import "google/cloud/aiplatform/v1beta1/specialist_pool.proto";
import "google/protobuf/struct.proto";
import "google/protobuf/timestamp.proto";
import "google/type/money.proto";
import "google/api/annotations.proto";
option go_package = "google.golang.org/genproto/googleapis/cloud/aiplatform/v1beta1;aiplatform";
option java_multiple_files = true;
option java_outer_classname = "DataLabelingJobProto";
option java_package = "com.google.cloud.aiplatform.v1beta1";
// DataLabelingJob is used to trigger a human labeling job on unlabeled data
// from the following Dataset:
message DataLabelingJob {
option (google.api.resource) = {
type: "aiplatform.googleapis.com/DataLabelingJob"
pattern: "projects/{project}/locations/{location}/dataLabelingJobs/{data_labeling_job}"
};
// Output only. Resource name of the DataLabelingJob.
string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
// Required. The user-defined name of the DataLabelingJob.
// The name can be up to 128 characters long and can be consist of any UTF-8
// characters.
// Display name of a DataLabelingJob.
string display_name = 2 [(google.api.field_behavior) = REQUIRED];
// Required. Dataset resource names. Right now we only support labeling from a single
// Dataset.
// Format:
// `projects/{project}/locations/{location}/datasets/{dataset}`
repeated string datasets = 3 [
(google.api.field_behavior) = REQUIRED,
(google.api.resource_reference) = {
type: "aiplatform.googleapis.com/Dataset"
}
];
// Labels to assign to annotations generated by this DataLabelingJob.
//
// Label keys and values can be no longer than 64 characters
// (Unicode codepoints), can only contain lowercase letters, numeric
// characters, underscores and dashes. International characters are allowed.
// See https://goo.gl/xmQnxf for more information and examples of labels.
// System reserved label keys are prefixed with "aiplatform.googleapis.com/"
// and are immutable.
map<string, string> annotation_labels = 12;
// Required. Number of labelers to work on each DataItem.
int32 labeler_count = 4 [(google.api.field_behavior) = REQUIRED];
// Required. The Google Cloud Storage location of the instruction pdf. This pdf is
// shared with labelers, and provides detailed description on how to label
// DataItems in Datasets.
string instruction_uri = 5 [(google.api.field_behavior) = REQUIRED];
// Required. Points to a YAML file stored on Google Cloud Storage describing the
// config for a specific type of DataLabelingJob.
// The schema files that can be used here are found in the
// https://storage.googleapis.com/google-cloud-aiplatform bucket in the
// /schema/datalabelingjob/inputs/ folder.
string inputs_schema_uri = 6 [(google.api.field_behavior) = REQUIRED];
// Required. Input config parameters for the DataLabelingJob.
google.protobuf.Value inputs = 7 [(google.api.field_behavior) = REQUIRED];
// Output only. The detailed state of the job.
JobState state = 8 [(google.api.field_behavior) = OUTPUT_ONLY];
// Output only. Current labeling job progress percentage scaled in interval [0, 100],
// indicating the percentage of DataItems that has been finished.
int32 labeling_progress = 13 [(google.api.field_behavior) = OUTPUT_ONLY];
// Output only. Estimated cost(in US dollars) that the DataLabelingJob has incurred to
// date.
google.type.Money current_spend = 14 [(google.api.field_behavior) = OUTPUT_ONLY];
// Output only. Timestamp when this DataLabelingJob was created.
google.protobuf.Timestamp create_time = 9 [(google.api.field_behavior) = OUTPUT_ONLY];
// Output only. Timestamp when this DataLabelingJob was updated most recently.
google.protobuf.Timestamp update_time = 10 [(google.api.field_behavior) = OUTPUT_ONLY];
// The labels with user-defined metadata to organize your DataLabelingJobs.
//
// Label keys and values can be no longer than 64 characters
// (Unicode codepoints), can only contain lowercase letters, numeric
// characters, underscores and dashes. International characters are allowed.
//
// See https://goo.gl/xmQnxf for more information and examples of labels.
// System reserved label keys are prefixed with "aiplatform.googleapis.com/"
// and are immutable. Following system labels exist for each DataLabelingJob:
//
// * "aiplatform.googleapis.com/schema": output only, its value is the
// [inputs_schema][google.cloud.aiplatform.v1beta1.DataLabelingJob.inputs_schema_uri]'s title.
map<string, string> labels = 11;
// The SpecialistPools' resource names associated with this job.
repeated string specialist_pools = 16;
// Paramaters that configure active learning pipeline. Active learning will
// label the data incrementally via several iterations. For every iteration,
// it will select a batch of data based on the sampling strategy.
ActiveLearningConfig active_learning_config = 21;
}
// Paramaters that configure active learning pipeline. Active learning will
// label the data incrementally by several iterations. For every iteration, it
// will select a batch of data based on the sampling strategy.
message ActiveLearningConfig {
// Required. Max human labeling DataItems. The rest part will be labeled by
// machine.
oneof human_labeling_budget {
// Max number of human labeled DataItems.
int64 max_data_item_count = 1;
// Max percent of total DataItems for human labeling.
int32 max_data_item_percentage = 2;
}
// Active learning data sampling config. For every active learning labeling
// iteration, it will select a batch of data based on the sampling strategy.
SampleConfig sample_config = 3;
// CMLE training config. For every active learning labeling iteration, system
// will train a machine learning model on CMLE. The trained model will be used
// by data sampling algorithm to select DataItems.
TrainingConfig training_config = 4;
}
// Active learning data sampling config. For every active learning labeling
// iteration, it will select a batch of data based on the sampling strategy.
message SampleConfig {
// Sample strategy decides which subset of DataItems should be selected for
// human labeling in every batch.
enum SampleStrategy {
// Default will be treated as UNCERTAINTY.
SAMPLE_STRATEGY_UNSPECIFIED = 0;
// Sample the most uncertain data to label.
UNCERTAINTY = 1;
}
// Decides sample size for the initial batch. initial_batch_sample_percentage
// is used by default.
oneof initial_batch_sample_size {
// The percentage of data needed to be labeled in the first batch.
int32 initial_batch_sample_percentage = 1;
}
// Decides sample size for the following batches.
// following_batch_sample_percentage is used by default.
oneof following_batch_sample_size {
// The percentage of data needed to be labeled in each following batch
// (except the first batch).
int32 following_batch_sample_percentage = 3;
}
// Field to chose sampling strategy. Sampling strategy will decide which data
// should be selected for human labeling in every batch.
SampleStrategy sample_strategy = 5;
}
// CMLE training config. For every active learning labeling iteration, system
// will train a machine learning model on CMLE. The trained model will be used
// by data sampling algorithm to select DataItems.
message TrainingConfig {
// The timeout hours for the CMLE training job, expressed in milli hours
// i.e. 1,000 value in this field means 1 hour.
int64 timeout_training_milli_hours = 1;
}

@ -0,0 +1,133 @@
// Copyright 2020 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/io.proto";
import "google/protobuf/struct.proto";
import "google/protobuf/timestamp.proto";
import "google/api/annotations.proto";
option go_package = "google.golang.org/genproto/googleapis/cloud/aiplatform/v1beta1;aiplatform";
option java_multiple_files = true;
option java_outer_classname = "DatasetProto";
option java_package = "com.google.cloud.aiplatform.v1beta1";
// A collection of DataItems and Annotations on them.
message Dataset {
option (google.api.resource) = {
type: "aiplatform.googleapis.com/Dataset"
pattern: "projects/{project}/locations/{location}/datasets/{dataset}"
};
// Output only. The resource name of the Dataset.
string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
// Required. The user-defined name of the Dataset.
// The name can be up to 128 characters long and can be consist of any UTF-8
// characters.
string display_name = 2 [(google.api.field_behavior) = REQUIRED];
// Required. Points to a YAML file stored on Google Cloud Storage describing additional
// information about the Dataset.
// The schema is defined as an OpenAPI 3.0.2 Schema Object.
// The schema files that can be used here are found in
// gs://google-cloud-aiplatform/schema/dataset/metadata/.
string metadata_schema_uri = 3 [(google.api.field_behavior) = REQUIRED];
// Required. Additional information about the Dataset.
google.protobuf.Value metadata = 8 [(google.api.field_behavior) = REQUIRED];
// Output only. Timestamp when this Dataset was created.
google.protobuf.Timestamp create_time = 4 [(google.api.field_behavior) = OUTPUT_ONLY];
// Output only. Timestamp when this Dataset was last updated.
google.protobuf.Timestamp update_time = 5 [(google.api.field_behavior) = OUTPUT_ONLY];
// Used to perform consistent read-modify-write updates. If not set, a blind
// "overwrite" update happens.
string etag = 6;
// The labels with user-defined metadata to organize your Datasets.
//
// Label keys and values can be no longer than 64 characters
// (Unicode codepoints), can only contain lowercase letters, numeric
// characters, underscores and dashes. International characters are allowed.
// No more than 64 user labels can be associated with one Dataset (System
// labels are excluded).
//
// See https://goo.gl/xmQnxf for more information and examples of labels.
// System reserved label keys are prefixed with "aiplatform.googleapis.com/"
// and are immutable. Following system labels exist for each Dataset:
//
// * "aiplatform.googleapis.com/dataset_metadata_schema": output only, its
// value is the [metadata_schema's][google.cloud.aiplatform.v1beta1.Dataset.metadata_schema_uri] title.
map<string, string> labels = 7;
}
// Describes the location from where we import data into a Dataset, together
// with the labels that will be applied to the DataItems and the Annotations.
message ImportDataConfig {
// The source of the input.
oneof source {
// The Google Cloud Storage location for the input content.
GcsSource gcs_source = 1;
}
// Labels that will be applied to newly imported DataItems. If an identical
// DataItem as one being imported already exists in the Dataset, then these
// labels will be appended to these of the already existing one, and if labels
// with identical key is imported before, the old label value will be
// overwritten. If two DataItems are identical in the same import data
// operation, the labels will be combined and if key collision happens in this
// case, one of the values will be picked randomly. Two DataItems are
// considered identical if their content bytes are identical (e.g. image bytes
// or pdf bytes).
// These labels will be overridden by Annotation labels specified inside index
// file refenced by [import_schema_uri][google.cloud.aiplatform.v1beta1.ImportDataConfig.import_schema_uri], e.g. jsonl file.
map<string, string> data_item_labels = 2;
// Required. Points to a YAML file stored on Google Cloud Storage describing the import
// format. Validation will be done against the schema. The schema is defined
// as an [OpenAPI 3.0.2 Schema Object](https://tinyurl.com/y538mdwt).
string import_schema_uri = 4 [(google.api.field_behavior) = REQUIRED];
}
// Describes what part of the Dataset is to be exported, the destination of
// the export and how to export.
message ExportDataConfig {
// The destination of the output.
oneof destination {
// The Google Cloud Storage location where the output is to be written to.
// In the given directory a new directory will be created with name:
// `export-data-<dataset-display-name>-<timestamp-of-export-call>` where
// timestamp is in YYYYMMDDHHMMSS format. All export
// output will be written into that directory. Inside that directory,
// annotations with the same schema will be grouped into sub directories
// which are named with the corresponding annotations' schema title. Inside
// these sub directories, a schema.yaml will be created to describe the
// output format.
GcsDestination gcs_destination = 1;
}
// A filter on Annotations of the Dataset. Only Annotations on to-be-exported
// DataItems(specified by [data_items_filter][]) that match this filter will
// be exported. The filter syntax is the same as in
// [ListAnnotations][google.cloud.aiplatform.v1beta1.DatasetService.ListAnnotations].
string annotations_filter = 2;
}

@ -0,0 +1,401 @@
// Copyright 2020 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/annotation.proto";
import "google/cloud/aiplatform/v1beta1/annotation_spec.proto";
import "google/cloud/aiplatform/v1beta1/data_item.proto";
import "google/cloud/aiplatform/v1beta1/dataset.proto";
import "google/cloud/aiplatform/v1beta1/operation.proto";
import "google/cloud/aiplatform/v1beta1/training_pipeline.proto";
import "google/longrunning/operations.proto";
import "google/protobuf/field_mask.proto";
option go_package = "google.golang.org/genproto/googleapis/cloud/aiplatform/v1beta1;aiplatform";
option java_multiple_files = true;
option java_outer_classname = "DatasetServiceProto";
option java_package = "com.google.cloud.aiplatform.v1beta1";
service DatasetService {
option (google.api.default_host) = "aiplatform.googleapis.com";
option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform";
// Creates a Dataset.
rpc CreateDataset(CreateDatasetRequest) returns (google.longrunning.Operation) {
option (google.api.http) = {
post: "/v1beta1/{parent=projects/*/locations/*}/datasets"
body: "dataset"
};
option (google.api.method_signature) = "parent,dataset";
option (google.longrunning.operation_info) = {
response_type: "Dataset"
metadata_type: "CreateDatasetOperationMetadata"
};
}
// Gets a Dataset.
rpc GetDataset(GetDatasetRequest) returns (Dataset) {
option (google.api.http) = {
get: "/v1beta1/{name=projects/*/locations/*/datasets/*}"
};
option (google.api.method_signature) = "name";
}
// Updates a Dataset.
rpc UpdateDataset(UpdateDatasetRequest) returns (Dataset) {
option (google.api.http) = {
patch: "/v1beta1/{dataset.name=projects/*/locations/*/datasets/*}"
body: "dataset"
};
option (google.api.method_signature) = "dataset,update_mask";
}
// Lists Datasets in a Location.
rpc ListDatasets(ListDatasetsRequest) returns (ListDatasetsResponse) {
option (google.api.http) = {
get: "/v1beta1/{parent=projects/*/locations/*}/datasets"
};
option (google.api.method_signature) = "parent";
}
// Deletes a Dataset.
rpc DeleteDataset(DeleteDatasetRequest) returns (google.longrunning.Operation) {
option (google.api.http) = {
delete: "/v1beta1/{name=projects/*/locations/*/datasets/*}"
};
option (google.api.method_signature) = "name";
option (google.longrunning.operation_info) = {
response_type: "google.protobuf.Empty"
metadata_type: "DeleteOperationMetadata"
};
}
// Imports data into a Dataset.
rpc ImportData(ImportDataRequest) returns (google.longrunning.Operation) {
option (google.api.http) = {
post: "/v1beta1/{name=projects/*/locations/*/datasets/*}:import"
body: "*"
};
option (google.api.method_signature) = "name,import_configs";
option (google.longrunning.operation_info) = {
response_type: "ImportDataResponse"
metadata_type: "ImportDataOperationMetadata"
};
}
// Exports data from a Dataset.
rpc ExportData(ExportDataRequest) returns (google.longrunning.Operation) {
option (google.api.http) = {
post: "/v1beta1/{name=projects/*/locations/*/datasets/*}:export"
body: "*"
};
option (google.api.method_signature) = "name,export_config";
option (google.longrunning.operation_info) = {
response_type: "ExportDataResponse"
metadata_type: "ExportDataOperationMetadata"
};
}
// Lists DataItems in a Dataset.
rpc ListDataItems(ListDataItemsRequest) returns (ListDataItemsResponse) {
option (google.api.http) = {
get: "/v1beta1/{parent=projects/*/locations/*/datasets/*}/dataItems"
};
option (google.api.method_signature) = "parent";
}
// Gets an AnnotationSpec.
rpc GetAnnotationSpec(GetAnnotationSpecRequest) returns (AnnotationSpec) {
option (google.api.http) = {
get: "/v1beta1/{name=projects/*/locations/*/datasets/*/annotationSpecs/*}"
};
option (google.api.method_signature) = "name";
}
// Lists Annotations belongs to a dataitem
rpc ListAnnotations(ListAnnotationsRequest) returns (ListAnnotationsResponse) {
option (google.api.http) = {
get: "/v1beta1/{parent=projects/*/locations/*/datasets/*/dataItems/*}/annotations"
};
option (google.api.method_signature) = "parent";
}
}
// Request message for [DatasetService.CreateDataset][google.cloud.aiplatform.v1beta1.DatasetService.CreateDataset].
message CreateDatasetRequest {
// Required. The resource name of the Location to create the Dataset in.
// Format: `projects/{project}/locations/{location}`
string parent = 1 [
(google.api.field_behavior) = REQUIRED,
(google.api.resource_reference) = {
type: "locations.googleapis.com/Location"
}
];
// Required. The Dataset to create.
Dataset dataset = 2 [(google.api.field_behavior) = REQUIRED];
}
// Runtime operation information for [DatasetService.CreateDataset][google.cloud.aiplatform.v1beta1.DatasetService.CreateDataset].
message CreateDatasetOperationMetadata {
// The operation generic information.
GenericOperationMetadata generic_metadata = 1;
}
// Request message for [DatasetService.GetDataset][google.cloud.aiplatform.v1beta1.DatasetService.GetDataset].
message GetDatasetRequest {
// Required. The name of the Dataset resource.
string name = 1 [
(google.api.field_behavior) = REQUIRED,
(google.api.resource_reference) = {
type: "aiplatform.googleapis.com/Dataset"
}
];
// Mask specifying which fields to read.
google.protobuf.FieldMask read_mask = 2;
}
// Request message for [DatasetService.UpdateDataset][google.cloud.aiplatform.v1beta1.DatasetService.UpdateDataset].
message UpdateDatasetRequest {
// Required. The Dataset which replaces the resource on the server.
Dataset dataset = 1 [(google.api.field_behavior) = REQUIRED];
// Required. The update mask applies to the resource.
// For the `FieldMask` definition, see
//
// [FieldMask](https:
// //tinyurl.com/dev-google-protobuf#google.protobuf.FieldMask).
// Updatable fields:
//
// * `display_name`
// * `description`
// * `labels`
google.protobuf.FieldMask update_mask = 2 [(google.api.field_behavior) = REQUIRED];
}
// Request message for [DatasetService.ListDatasets][google.cloud.aiplatform.v1beta1.DatasetService.ListDatasets].
message ListDatasetsRequest {
// Required. The name of the Dataset's parent resource.
// Format: `projects/{project}/locations/{location}`
string parent = 1 [
(google.api.field_behavior) = REQUIRED,
(google.api.resource_reference) = {
type: "locations.googleapis.com/Location"
}
];
// The standard list filter.
string filter = 2;
// The standard list page size.
int32 page_size = 3;
// The standard list page token.
string page_token = 4;
// Mask specifying which fields to read.
google.protobuf.FieldMask read_mask = 5;
// A comma-separated list of fields to order by, sorted in ascending order.
// Use "desc" after a field name for descending.
// Supported fields:
// * `display_name`
// * `data_item_count` * `create_time`
// * `update_time`
string order_by = 6;
}
// Response message for [DatasetService.ListDatasets][google.cloud.aiplatform.v1beta1.DatasetService.ListDatasets].
message ListDatasetsResponse {
// A list of Datasets that matches the specified filter in the request.
repeated Dataset datasets = 1;
// The standard List next-page token.
string next_page_token = 2;
}
// Request message for [DatasetService.DeleteDataset][google.cloud.aiplatform.v1beta1.DatasetService.DeleteDataset].
message DeleteDatasetRequest {
// Required. The resource name of the Dataset to delete.
// Format:
// `projects/{project}/locations/{location}/datasets/{dataset}`
string name = 1 [
(google.api.field_behavior) = REQUIRED,
(google.api.resource_reference) = {
type: "aiplatform.googleapis.com/Dataset"
}
];
}
// Request message for [DatasetService.ImportData][google.cloud.aiplatform.v1beta1.DatasetService.ImportData].
message ImportDataRequest {
// Required. The name of the Dataset resource.
// Format:
// `projects/{project}/locations/{location}/datasets/{dataset}`
string name = 1 [
(google.api.field_behavior) = REQUIRED,
(google.api.resource_reference) = {
type: "aiplatform.googleapis.com/Dataset"
}
];
// Required. The desired input locations. The contents of all input locations will be
// imported in one batch.
repeated ImportDataConfig import_configs = 2 [(google.api.field_behavior) = REQUIRED];
}
// Response message for [DatasetService.ImportData][google.cloud.aiplatform.v1beta1.DatasetService.ImportData].
message ImportDataResponse {
}
// Runtime operation information for [DatasetService.ImportData][google.cloud.aiplatform.v1beta1.DatasetService.ImportData].
message ImportDataOperationMetadata {
// The common part of the operation metadata.
GenericOperationMetadata generic_metadata = 1;
}
// Request message for [DatasetService.ExportData][google.cloud.aiplatform.v1beta1.DatasetService.ExportData].
message ExportDataRequest {
// Required. The name of the Dataset resource.
// Format:
// `projects/{project}/locations/{location}/datasets/{dataset}`
string name = 1 [
(google.api.field_behavior) = REQUIRED,
(google.api.resource_reference) = {
type: "aiplatform.googleapis.com/Dataset"
}
];
// Required. The desired output location.
ExportDataConfig export_config = 2 [(google.api.field_behavior) = REQUIRED];
}
// Response message for [DatasetService.ExportData][google.cloud.aiplatform.v1beta1.DatasetService.ExportData].
message ExportDataResponse {
// All of the files that are exported in this export operation.
repeated string exported_files = 1;
}
// Runtime operation information for [DatasetService.ExportData][google.cloud.aiplatform.v1beta1.DatasetService.ExportData].
message ExportDataOperationMetadata {
// The common part of the operation metadata.
GenericOperationMetadata generic_metadata = 1;
// A Google Cloud Storage directory which path ends with '/'. The exported
// data is stored in the directory.
string gcs_output_directory = 2;
}
// Request message for [DatasetService.ListDataItems][google.cloud.aiplatform.v1beta1.DatasetService.ListDataItems].
message ListDataItemsRequest {
// Required. The resource name of the Dataset to list DataItems from.
// Format:
// `projects/{project}/locations/{location}/datasets/{dataset}`
string parent = 1 [
(google.api.field_behavior) = REQUIRED,
(google.api.resource_reference) = {
type: "aiplatform.googleapis.com/Dataset"
}
];
// The standard list filter.
string filter = 2;
// The standard list page size.
int32 page_size = 3;
// The standard list page token.
string page_token = 4;
// Mask specifying which fields to read.
google.protobuf.FieldMask read_mask = 5;
// A comma-separated list of fields to order by, sorted in ascending order.
// Use "desc" after a field name for descending.
string order_by = 6;
}
// Response message for [DatasetService.ListDataItems][google.cloud.aiplatform.v1beta1.DatasetService.ListDataItems].
message ListDataItemsResponse {
// A list of DataItems that matches the specified filter in the request.
repeated DataItem data_items = 1;
// The standard List next-page token.
string next_page_token = 2;
}
// Request message for [DatasetService.GetAnnotationSpec][google.cloud.aiplatform.v1beta1.DatasetService.GetAnnotationSpec].
message GetAnnotationSpecRequest {
// Required. The name of the AnnotationSpec resource.
// Format:
//
// `projects/{project}/locations/{location}/datasets/{dataset}/annotationSpecs/{annotation_spec}`
string name = 1 [
(google.api.field_behavior) = REQUIRED,
(google.api.resource_reference) = {
type: "aiplatform.googleapis.com/AnnotationSpec"
}
];
// Mask specifying which fields to read.
google.protobuf.FieldMask read_mask = 2;
}
// Request message for [DatasetService.ListAnnotations][google.cloud.aiplatform.v1beta1.DatasetService.ListAnnotations].
message ListAnnotationsRequest {
// Required. The resource name of the DataItem to list Annotations from.
// Format:
//
// `projects/{project}/locations/{location}/datasets/{dataset}/dataItems/{data_item}`
string parent = 1 [
(google.api.field_behavior) = REQUIRED,
(google.api.resource_reference) = {
type: "aiplatform.googleapis.com/DataItem"
}
];
// The standard list filter.
string filter = 2;
// The standard list page size.
int32 page_size = 3;
// The standard list page token.
string page_token = 4;
// Mask specifying which fields to read.
google.protobuf.FieldMask read_mask = 5;
// A comma-separated list of fields to order by, sorted in ascending order.
// Use "desc" after a field name for descending.
string order_by = 6;
}
// Response message for [DatasetService.ListAnnotations][google.cloud.aiplatform.v1beta1.DatasetService.ListAnnotations].
message ListAnnotationsResponse {
// A list of Annotations that matches the specified filter in the request.
repeated Annotation annotations = 1;
// The standard List next-page token.
string next_page_token = 2;
}

@ -0,0 +1,40 @@
// Copyright 2020 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/api/annotations.proto";
option go_package = "google.golang.org/genproto/googleapis/cloud/aiplatform/v1beta1;aiplatform";
option java_multiple_files = true;
option java_outer_classname = "DeployedModelNameProto";
option java_package = "com.google.cloud.aiplatform.v1beta1";
// Points to a DeployedModel.
message DeployedModelRef {
// Immutable. A resource name of an Endpoint.
string endpoint = 1 [
(google.api.field_behavior) = IMMUTABLE,
(google.api.resource_reference) = {
type: "aiplatform.googleapis.com/Endpoint"
}
];
// Immutable. An ID of a DeployedModel in the above Endpoint.
string deployed_model_id = 2 [(google.api.field_behavior) = IMMUTABLE];
}

@ -0,0 +1,147 @@
// Copyright 2020 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/explanation.proto";
import "google/cloud/aiplatform/v1beta1/machine_resources.proto";
import "google/protobuf/timestamp.proto";
import "google/api/annotations.proto";
option go_package = "google.golang.org/genproto/googleapis/cloud/aiplatform/v1beta1;aiplatform";
option java_multiple_files = true;
option java_outer_classname = "EndpointProto";
option java_package = "com.google.cloud.aiplatform.v1beta1";
// Models are deployed into it, and afterwards Endpoint is called to obtain
// predictions and explanations.
message Endpoint {
option (google.api.resource) = {
type: "aiplatform.googleapis.com/Endpoint"
pattern: "projects/{project}/locations/{location}/endpoints/{endpoint}"
};
// Output only. The resource name of the Endpoint.
string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
// Required. The display name of the Endpoint.
// The name can be up to 128 characters long and can be consist of any UTF-8
// characters.
string display_name = 2 [(google.api.field_behavior) = REQUIRED];
// The description of the Endpoint.
string description = 3;
// Output only. The models deployed in this Endpoint.
// To add or remove DeployedModels use [EndpointService.DeployModel][google.cloud.aiplatform.v1beta1.EndpointService.DeployModel] and
// [EndpointService.UndeployModel][google.cloud.aiplatform.v1beta1.EndpointService.UndeployModel] respectively.
repeated DeployedModel deployed_models = 4 [(google.api.field_behavior) = OUTPUT_ONLY];
// A map from a DeployedModel's ID to the percentage of this Endpoint's
// traffic that should be forwarded to that DeployedModel.
//
// If a DeployedModel's ID is not listed in this map, then it receives no
// traffic.
//
// The traffic percentage values must add up to 100, or map must be empty if
// the Endpoint is to not accept any traffic at a moment.
map<string, int32> traffic_split = 5;
// Used to perform consistent read-modify-write updates. If not set, a blind
// "overwrite" update happens.
string etag = 6;
// The labels with user-defined metadata to organize your Endpoints.
//
// Label keys and values can be no longer than 64 characters
// (Unicode codepoints), can only contain lowercase letters, numeric
// characters, underscores and dashes. International characters are allowed.
//
// See https://goo.gl/xmQnxf for more information and examples of labels.
map<string, string> labels = 7;
// Output only. Timestamp when this Endpoint was created.
google.protobuf.Timestamp create_time = 8 [(google.api.field_behavior) = OUTPUT_ONLY];
// Output only. Timestamp when this Endpoint was last updated.
google.protobuf.Timestamp update_time = 9 [(google.api.field_behavior) = OUTPUT_ONLY];
}
// A deployment of a Model. Endpoints contain one or more DeployedModels.
message DeployedModel {
// The prediction (for example, the machine) resources that the DeployedModel
// uses. The user is billed for the resources (at least their minimal amount)
// even if the DeployedModel receives no traffic.
// Not all Models support all resources types. See
// [Model.supported_deployment_resources_types][google.cloud.aiplatform.v1beta1.Model.supported_deployment_resources_types].
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 = 7;
// A description of resources that to large degree are decided by AI
// Platform, and require only a modest additional configuration.
AutomaticResources automatic_resources = 8;
}
// Output only. The ID of the DeployedModel.
string id = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
// Required. The name of the Model this is the deployment of. Note that the Model
// may be in a different location than the DeployedModel's Endpoint.
string model = 2 [
(google.api.field_behavior) = REQUIRED,
(google.api.resource_reference) = {
type: "aiplatform.googleapis.com/Model"
}
];
// The display name of the DeployedModel. If not provided upon creation,
// the Model's display_name is used.
string display_name = 3;
// Output only. Timestamp when the DeployedModel was created.
google.protobuf.Timestamp create_time = 6 [(google.api.field_behavior) = OUTPUT_ONLY];
// Explanation configuration for this DeployedModel.
//
// When deploying a Model using [EndpointService.DeployModel][google.cloud.aiplatform.v1beta1.EndpointService.DeployModel], this value
// overrides the value of [Model.explanation_spec][google.cloud.aiplatform.v1beta1.Model.explanation_spec]. All fields of
// [explanation_spec][google.cloud.aiplatform.v1beta1.DeployedModel.explanation_spec] are optional in the request. If a field of
// [explanation_spec][google.cloud.aiplatform.v1beta1.DeployedModel.explanation_spec] is not populated, the value of the same field of
// [Model.explanation_spec][google.cloud.aiplatform.v1beta1.Model.explanation_spec] is inherited. The corresponding
// [Model.explanation_spec][google.cloud.aiplatform.v1beta1.Model.explanation_spec] must be populated, otherwise explanation for
// this Model is not allowed.
//
// Currently, only AutoML tabular Models support explanation_spec.
ExplanationSpec explanation_spec = 9;
// If true, the container of the DeployedModel instances will send `stderr`
// and `stdout` streams to Stackdriver Logging.
//
// Only supported for custom-trained Models and AutoML Tables Models.
bool enable_container_logging = 12;
// These logs are like standard server access logs, containing
// information like timestamp and latency for each prediction request.
//
// Note that Stackdriver logs may incur a cost, especially if your project
// receives prediction requests at a high queries per second rate (QPS).
// Estimate your costs before enabling this option.
bool enable_access_logging = 13;
}

@ -0,0 +1,302 @@
// Copyright 2020 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/endpoint.proto";
import "google/cloud/aiplatform/v1beta1/operation.proto";
import "google/longrunning/operations.proto";
import "google/protobuf/field_mask.proto";
option go_package = "google.golang.org/genproto/googleapis/cloud/aiplatform/v1beta1;aiplatform";
option java_multiple_files = true;
option java_outer_classname = "EndpointServiceProto";
option java_package = "com.google.cloud.aiplatform.v1beta1";
service EndpointService {
option (google.api.default_host) = "aiplatform.googleapis.com";
option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform";
// Creates an Endpoint.
rpc CreateEndpoint(CreateEndpointRequest) returns (google.longrunning.Operation) {
option (google.api.http) = {
post: "/v1beta1/{parent=projects/*/locations/*}/endpoints"
body: "endpoint"
};
option (google.api.method_signature) = "parent,endpoint";
option (google.longrunning.operation_info) = {
response_type: "Endpoint"
metadata_type: "CreateEndpointOperationMetadata"
};
}
// Gets an Endpoint.
rpc GetEndpoint(GetEndpointRequest) returns (Endpoint) {
option (google.api.http) = {
get: "/v1beta1/{name=projects/*/locations/*/endpoints/*}"
};
option (google.api.method_signature) = "name";
}
// Lists Endpoints in a Location.
rpc ListEndpoints(ListEndpointsRequest) returns (ListEndpointsResponse) {
option (google.api.http) = {
get: "/v1beta1/{parent=projects/*/locations/*}/endpoints"
};
option (google.api.method_signature) = "parent";
}
// Updates an Endpoint.
rpc UpdateEndpoint(UpdateEndpointRequest) returns (Endpoint) {
option (google.api.http) = {
patch: "/v1beta1/{endpoint.name=projects/*/locations/*/endpoints/*}"
body: "endpoint"
};
option (google.api.method_signature) = "endpoint,update_mask";
}
// Deletes an Endpoint.
rpc DeleteEndpoint(DeleteEndpointRequest) returns (google.longrunning.Operation) {
option (google.api.http) = {
delete: "/v1beta1/{name=projects/*/locations/*/endpoints/*}"
};
option (google.api.method_signature) = "name";
option (google.longrunning.operation_info) = {
response_type: "google.protobuf.Empty"
metadata_type: "DeleteOperationMetadata"
};
}
// Deploys a Model into this Endpoint, creating a DeployedModel within it.
rpc DeployModel(DeployModelRequest) returns (google.longrunning.Operation) {
option (google.api.http) = {
post: "/v1beta1/{endpoint=projects/*/locations/*/endpoints/*}:deployModel"
body: "*"
};
option (google.api.method_signature) = "endpoint,deployed_model,traffic_split";
option (google.longrunning.operation_info) = {
response_type: "DeployModelResponse"
metadata_type: "DeployModelOperationMetadata"
};
}
// Undeploys a Model from an Endpoint, removing a DeployedModel from it, and
// freeing all resources it's using.
rpc UndeployModel(UndeployModelRequest) returns (google.longrunning.Operation) {
option (google.api.http) = {
post: "/v1beta1/{endpoint=projects/*/locations/*/endpoints/*}:undeployModel"
body: "*"
};
option (google.api.method_signature) = "endpoint,deployed_model_id,traffic_split";
option (google.longrunning.operation_info) = {
response_type: "UndeployModelResponse"
metadata_type: "UndeployModelOperationMetadata"
};
}
}
// Request message for [EndpointService.CreateEndpoint][google.cloud.aiplatform.v1beta1.EndpointService.CreateEndpoint].
message CreateEndpointRequest {
// Required. The resource name of the Location to create the Endpoint in.
// Format: `projects/{project}/locations/{location}`
string parent = 1 [
(google.api.field_behavior) = REQUIRED,
(google.api.resource_reference) = {
type: "locations.googleapis.com/Location"
}
];
// Required. The Endpoint to create.
Endpoint endpoint = 2 [(google.api.field_behavior) = REQUIRED];
}
// Runtime operation information for [EndpointService.CreateEndpoint][google.cloud.aiplatform.v1beta1.EndpointService.CreateEndpoint].
message CreateEndpointOperationMetadata {
// The operation generic information.
GenericOperationMetadata generic_metadata = 1;
}
// Request message for [EndpointService.GetEndpoint][google.cloud.aiplatform.v1beta1.EndpointService.GetEndpoint]
message GetEndpointRequest {
// Required. The name of the Endpoint resource.
// Format:
// `projects/{project}/locations/{location}/endpoints/{endpoint}`
string name = 1 [
(google.api.field_behavior) = REQUIRED,
(google.api.resource_reference) = {
type: "aiplatform.googleapis.com/Endpoint"
}
];
}
// Request message for [EndpointService.ListEndpoints][google.cloud.aiplatform.v1beta1.EndpointService.ListEndpoints].
message ListEndpointsRequest {
// Required. The resource name of the Location from which to list the Endpoints.
// Format: `projects/{project}/locations/{location}`
string parent = 1 [
(google.api.field_behavior) = REQUIRED,
(google.api.resource_reference) = {
type: "locations.googleapis.com/Location"
}
];
// Optional. An expression for filtering the results of the request. For field names
// both snake_case and camelCase are supported.
//
// * `endpoint` supports = and !=. `endpoint` represents the Endpoint ID,
// ie. the last segment of the Endpoint's [resource name][google.cloud.aiplatform.v1beta1.Endpoint.name].
// * `display_name` supports =, != and regex()
// (uses [re2](https://github.com/google/re2/wiki/Syntax) syntax)
// * `labels` supports general map functions that is:
// `labels.key=value` - key:value equality
// `labels.key:* or labels:key - key existence
// A key including a space must be quoted. `labels."a key"`.
//
// Some examples:
// * `endpoint=1`
// * `displayName="myDisplayName"`
// * `regex(display_name, "^A") -> The display name starts with an A.
// * `labels.myKey="myValue"`
string filter = 2 [(google.api.field_behavior) = OPTIONAL];
// Optional. The standard list page size.
int32 page_size = 3 [(google.api.field_behavior) = OPTIONAL];
// Optional. The standard list page token.
// Typically obtained via
// [ListEndpointsResponse.next_page_token][google.cloud.aiplatform.v1beta1.ListEndpointsResponse.next_page_token] of the previous
// [EndpointService.ListEndpoints][google.cloud.aiplatform.v1beta1.EndpointService.ListEndpoints] call.
string page_token = 4 [(google.api.field_behavior) = OPTIONAL];
// Optional. Mask specifying which fields to read.
google.protobuf.FieldMask read_mask = 5 [(google.api.field_behavior) = OPTIONAL];
}
// Response message for [EndpointService.ListEndpoints][google.cloud.aiplatform.v1beta1.EndpointService.ListEndpoints].
message ListEndpointsResponse {
// List of Endpoints in the requested page.
repeated Endpoint endpoints = 1;
// A token to retrieve next page of results.
// Pass to [ListEndpointsRequest.page_token][google.cloud.aiplatform.v1beta1.ListEndpointsRequest.page_token] to obtain that page.
string next_page_token = 2;
}
// Request message for [EndpointService.UpdateEndpoint][google.cloud.aiplatform.v1beta1.EndpointService.UpdateEndpoint].
message UpdateEndpointRequest {
// Required. The Endpoint which replaces the resource on the server.
Endpoint endpoint = 1 [(google.api.field_behavior) = REQUIRED];
// Required. The update mask applies to the resource.
google.protobuf.FieldMask update_mask = 2 [(google.api.field_behavior) = REQUIRED];
}
// Request message for [EndpointService.DeleteEndpoint][google.cloud.aiplatform.v1beta1.EndpointService.DeleteEndpoint].
message DeleteEndpointRequest {
// Required. The name of the Endpoint resource to be deleted.
// Format:
// `projects/{project}/locations/{location}/endpoints/{endpoint}`
string name = 1 [
(google.api.field_behavior) = REQUIRED,
(google.api.resource_reference) = {
type: "aiplatform.googleapis.com/Endpoint"
}
];
}
// Request message for [EndpointService.DeployModel][google.cloud.aiplatform.v1beta1.EndpointService.DeployModel].
message DeployModelRequest {
// Required. The name of the Endpoint resource into which to deploy a Model.
// Format:
// `projects/{project}/locations/{location}/endpoints/{endpoint}`
string endpoint = 1 [
(google.api.field_behavior) = REQUIRED,
(google.api.resource_reference) = {
type: "aiplatform.googleapis.com/Endpoint"
}
];
// Required. The DeployedModel to be created within the Endpoint. Note that
// [Endpoint.traffic_split][google.cloud.aiplatform.v1beta1.Endpoint.traffic_split] must be updated for the DeployedModel to start
// receiving traffic, either as part of this call, or via
// [EndpointService.UpdateEndpoint][google.cloud.aiplatform.v1beta1.EndpointService.UpdateEndpoint].
DeployedModel deployed_model = 2 [(google.api.field_behavior) = REQUIRED];
// A map from a DeployedModel's ID to the percentage of this Endpoint's
// traffic that should be forwarded to that DeployedModel.
//
// If this field is non-empty, then the Endpoint's
// [traffic_split][google.cloud.aiplatform.v1beta1.Endpoint.traffic_split] will be overwritten with it.
// To refer to the ID of the just being deployed Model, a "0" should be used,
// and the actual ID of the new DeployedModel will be filled in its place by
// this method. The traffic percentage values must add up to 100.
//
// If this field is empty, then the Endpoint's
// [traffic_split][google.cloud.aiplatform.v1beta1.Endpoint.traffic_split] is not updated.
map<string, int32> traffic_split = 3;
}
// Response message for [EndpointService.DeployModel][google.cloud.aiplatform.v1beta1.EndpointService.DeployModel].
message DeployModelResponse {
// The DeployedModel that had been deployed in the Endpoint.
DeployedModel deployed_model = 1;
}
// Runtime operation information for [EndpointService.DeployModel][google.cloud.aiplatform.v1beta1.EndpointService.DeployModel].
message DeployModelOperationMetadata {
// The operation generic information.
GenericOperationMetadata generic_metadata = 1;
}
// Request message for [EndpointService.UndeployModel][google.cloud.aiplatform.v1beta1.EndpointService.UndeployModel].
message UndeployModelRequest {
// Required. The name of the Endpoint resource from which to undeploy a Model.
// Format:
// `projects/{project}/locations/{location}/endpoints/{endpoint}`
string endpoint = 1 [
(google.api.field_behavior) = REQUIRED,
(google.api.resource_reference) = {
type: "aiplatform.googleapis.com/Endpoint"
}
];
// Required. The ID of the DeployedModel to be undeployed from the Endpoint.
string deployed_model_id = 2 [(google.api.field_behavior) = REQUIRED];
// If this field is provided, then the Endpoint's
// [traffic_split][google.cloud.aiplatform.v1beta1.Endpoint.traffic_split] will be overwritten with it. If
// last DeployedModel is being undeployed from the Endpoint, the
// [Endpoint.traffic_split] will always end up empty when this call returns.
// A DeployedModel will be successfully undeployed only if it doesn't have
// any traffic assigned to it when this method executes, or if this field
// unassigns any traffic to it.
map<string, int32> traffic_split = 3;
}
// Response message for [EndpointService.UndeployModel][google.cloud.aiplatform.v1beta1.EndpointService.UndeployModel].
message UndeployModelResponse {
}
// Runtime operation information for [EndpointService.UndeployModel][google.cloud.aiplatform.v1beta1.EndpointService.UndeployModel].
message UndeployModelOperationMetadata {
// The operation generic information.
GenericOperationMetadata generic_metadata = 1;
}

@ -0,0 +1,40 @@
// Copyright 2020 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/annotations.proto";
option go_package = "google.golang.org/genproto/googleapis/cloud/aiplatform/v1beta1;aiplatform";
option java_multiple_files = true;
option java_outer_classname = "EnvVarProto";
option java_package = "com.google.cloud.aiplatform.v1beta1";
// Represents an environment variable present in a Container or Python Module.
message EnvVar {
// Required. Name of the environment variable. Must be a valid C identifier.
string name = 1 [(google.api.field_behavior) = REQUIRED];
// Variables that reference a $(VAR_NAME) are expanded
// using the previous defined environment variables in the container and
// any service environment variables. If a variable cannot be resolved,
// the reference in the input string will be unchanged. The $(VAR_NAME)
// syntax can be escaped with a double $$, ie: $$(VAR_NAME). Escaped
// references will never be expanded, regardless of whether the variable
// exists or not.
string value = 2;
}

@ -0,0 +1,177 @@
// Copyright 2020 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/cloud/aiplatform/v1beta1/explanation_metadata.proto";
import "google/protobuf/struct.proto";
import "google/api/annotations.proto";
option go_package = "google.golang.org/genproto/googleapis/cloud/aiplatform/v1beta1;aiplatform";
option java_multiple_files = true;
option java_outer_classname = "ExplanationProto";
option java_package = "com.google.cloud.aiplatform.v1beta1";
// Explanation of a [prediction][ExplainResponse.predictions] produced by the
// Model on a given [instance][google.cloud.aiplatform.v1beta1.ExplainRequest.instances].
//
// Currently, only AutoML tabular Models support explanation.
message Explanation {
// Output only. Feature attributions grouped by predicted outputs.
//
// For Models that predict only one output, such as regression Models that
// predict only one score, there is only one attibution that explains the
// predicted output. For Models that predict multiple outputs, such as
// multiclass Models that predict multiple classes, each element explains one
// specific item. [Attribution.output_index][google.cloud.aiplatform.v1beta1.Attribution.output_index] can be used to identify which
// output this attribution is explaining.
//
repeated Attribution attributions = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
}
// Aggregated explanation metrics for a Model over a set of instances.
//
// Currently, only AutoML tabular Models support aggregated explanation.
message ModelExplanation {
// Output only. Aggregated attributions explaning the Model's prediction outputs over the
// set of instances. The attributions are grouped by outputs.
//
// For Models that predict only one output, such as regression Models that
// predict only one score, there is only one attibution that explains the
// predicted output. For Models that predict multiple outputs, such as
// multiclass Models that predict multiple classes, each element explains one
// specific item. [Attribution.output_index][google.cloud.aiplatform.v1beta1.Attribution.output_index] can be used to identify which
// output this attribution is explaining.
//
// The [baselineOutputValue][google.cloud.aiplatform.v1beta1.Attribution.baseline_output_value],
// [instanceOutputValue][google.cloud.aiplatform.v1beta1.Attribution.instance_output_value] and
// [featureAttributions][google.cloud.aiplatform.v1beta1.Attribution.feature_attributions] fields are
// averaged over the test data.
//
// NOTE: Currently AutoML tabular classification Models produce only one
// attribution, which averages attributions over all the classes it predicts.
// [Attribution.approximation_error][google.cloud.aiplatform.v1beta1.Attribution.approximation_error] is not populated.
repeated Attribution mean_attributions = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
}
// Attribution that explains a particular prediction output.
message Attribution {
// Output only. Model predicted output if the input instance is constructed from the
// baselines of all the features defined in [ExplanationMetadata.inputs][google.cloud.aiplatform.v1beta1.ExplanationMetadata.inputs].
// The field name of the output is determined by the key in
// [ExplanationMetadata.outputs][google.cloud.aiplatform.v1beta1.ExplanationMetadata.outputs].
//
// If the Model predicted output is a tensor value (for example, an ndarray),
// this is the value in the output located by [output_index][google.cloud.aiplatform.v1beta1.Attribution.output_index].
//
// If there are multiple baselines, their output values are averaged.
double baseline_output_value = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
// Output only. Model predicted output on the corresponding [explanation
// instance][ExplainRequest.instances]. The field name of the output is
// determined by the key in [ExplanationMetadata.outputs][google.cloud.aiplatform.v1beta1.ExplanationMetadata.outputs].
//
// If the Model predicted output is a tensor value (for example, an ndarray),
// this is the value in the output located by [output_index][google.cloud.aiplatform.v1beta1.Attribution.output_index].
double instance_output_value = 2 [(google.api.field_behavior) = OUTPUT_ONLY];
// Output only. Attributions of each explained feature. Features are extracted from
// the [prediction instances][google.cloud.aiplatform.v1beta1.ExplainRequest.instances] according to
// [explanation input metadata][google.cloud.aiplatform.v1beta1.ExplanationMetadata.inputs].
//
// The value is a struct, whose keys are the name of the feature. The values
// are how much the feature in the [instance][google.cloud.aiplatform.v1beta1.ExplainRequest.instances]
// contributed to the predicted result.
//
// The format of the value is determined by the feature's input format:
//
// * If the feature is a scalar value, the attribution value is a
// [floating number][google.protobuf.Value.number_value].
//
// * If the feature is an array of scalar values, the attribution value is
// an [array][google.protobuf.Value.list_value].
//
// * If the feature is a struct, the attribution value is a
// [struct][google.protobuf.Value.struct_value]. The keys in the
// attribution value struct are the same as the keys in the feature
// struct. The formats of the values in the attribution struct are
// determined by the formats of the values in the feature struct.
//
// The [ExplanationMetadata.feature_attributions_schema_uri][google.cloud.aiplatform.v1beta1.ExplanationMetadata.feature_attributions_schema_uri] field,
// pointed to by the [ExplanationSpec][google.cloud.aiplatform.v1beta1.ExplanationSpec] field of the
// [Endpoint.deployed_models][google.cloud.aiplatform.v1beta1.Endpoint.deployed_models] object, points to the schema file that
// describes the features and their attribution values (if it is populated).
google.protobuf.Value feature_attributions = 3 [(google.api.field_behavior) = OUTPUT_ONLY];
// Output only. The index that locates the explained prediction output.
//
// If the prediction output is a scalar value, output_index is not populated.
// If the prediction output is a tensor value (for example, an ndarray),
// the length of output_index is the same as the number of dimensions of the
// output. The i-th element in output_index is the element index of the i-th
// dimension of the output vector. Indexes start from 0.
repeated int32 output_index = 4 [(google.api.field_behavior) = OUTPUT_ONLY];
// Output only. The display name of the output identified by [output_index][google.cloud.aiplatform.v1beta1.Attribution.output_index], e.g. the
// predicted class name by a multi-classification Model.
//
// This field is only populated iff the Model predicts display names as a
// separate field along with the explained output. The predicted display name
// must has the same shape of the explained output, and can be located using
// output_index.
string output_display_name = 5 [(google.api.field_behavior) = OUTPUT_ONLY];
// Output only. Error of [feature_attributions][google.cloud.aiplatform.v1beta1.Attribution.feature_attributions] caused by approximation used in the
// explanation method. Lower value means more precise attributions.
//
// For Sampled Shapley
// [attribution][google.cloud.aiplatform.v1beta1.ExplanationParameters.sampled_shapley_attribution],
// increasing [path_count][google.cloud.aiplatform.v1beta1.SampledShapleyAttribution.path_count] might reduce
// the error.
//
double approximation_error = 6 [(google.api.field_behavior) = OUTPUT_ONLY];
}
// Specification of Model explanation.
//
// Currently, only AutoML tabular Models support explanation.
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];
}
// Parameters to configure explaining for Model's predictions.
message ExplanationParameters {
// An attribution method that approximates Shapley values for features that
// contribute to the label being predicted. A sampling strategy is used to
// approximate the value rather than considering all subsets of features.
SampledShapleyAttribution sampled_shapley_attribution = 1;
}
// An attribution method that approximates Shapley values for features that
// contribute to the label being predicted. A sampling strategy is used to
// approximate the value rather than considering all subsets of features.
message SampledShapleyAttribution {
// Required. The number of feature permutations to consider when approximating the
// Shapley values.
//
// Valid range of its value is [1, 50], inclusively.
int32 path_count = 1 [(google.api.field_behavior) = REQUIRED];
}

@ -0,0 +1,107 @@
// Copyright 2020 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/protobuf/struct.proto";
import "google/api/annotations.proto";
option go_package = "google.golang.org/genproto/googleapis/cloud/aiplatform/v1beta1;aiplatform";
option java_multiple_files = true;
option java_outer_classname = "ExplanationMetadataProto";
option java_package = "com.google.cloud.aiplatform.v1beta1";
// Metadata describing the Model's input and output for explanation.
message ExplanationMetadata {
// Metadata of the input of a feature.
message InputMetadata {
// Baseline inputs for this feature.
//
// If no baseline is specified, AI Platform chooses the baseline for this
// feature. If multiple baselines are specified, AI Platform returns the
// average attributions across them in
// [Attributions.baseline_attribution][].
//
// The element of the baselines must be in the same format as the feature's
// input in the [instance][google.cloud.aiplatform.v1beta1.ExplainRequest.instances][]. The schema of any
// single instance may be specified via Endpoint's DeployedModels'
// [Model's][google.cloud.aiplatform.v1beta1.DeployedModel.model]
// [PredictSchemata's][google.cloud.aiplatform.v1beta1.Model.predict_schemata]
// [instance_schema_uri][google.cloud.aiplatform.v1beta1.PredictSchemata.instance_schema_uri].
repeated google.protobuf.Value input_baselines = 1;
}
// Metadata of the prediction output to be explained.
message OutputMetadata {
// Defines how to map [Attribution.output_index][google.cloud.aiplatform.v1beta1.Attribution.output_index] to
// [Attribution.output_display_name][google.cloud.aiplatform.v1beta1.Attribution.output_display_name].
//
// If neither of the fields are specified,
// [Attribution.output_display_name][google.cloud.aiplatform.v1beta1.Attribution.output_display_name] will not be populated.
oneof display_name_mapping {
// Static mapping between the index and display name.
//
// Use this if the outputs are a deterministic n-dimensional array, e.g. a
// list of scores of all the classes in a pre-defined order for a
// multi-classification Model. It's not feasible if the outputs are
// non-deterministic, e.g. the Model produces top-k classes or sort the
// outputs by their values.
//
// The shape of the value must be an n-dimensional array of strings. The
// number of dimentions must match that of the outputs to be explained.
// The [Attribution.output_display_name][google.cloud.aiplatform.v1beta1.Attribution.output_display_name] is populated by locating in the
// mapping with [Attribution.output_index][google.cloud.aiplatform.v1beta1.Attribution.output_index].
//
google.protobuf.Value index_display_name_mapping = 1;
// Specify a field name in the prediction to look for the display name.
//
// Use this if the prediction contains the display names for the outputs.
//
// The display names in the prediction must have the same shape of the
// outputs, so that it can be located by [Attribution.output_index][google.cloud.aiplatform.v1beta1.Attribution.output_index] for
// a specific output.
string display_name_mapping_key = 2;
}
}
// Required. Map from feature names to feature input metadata. Keys are the name of the
// features. Values are the specification of the feature.
//
// An empty InputMetadata is valid. It describes a text feature which has the
// name specified as the key in [ExplanationMetadata.inputs][google.cloud.aiplatform.v1beta1.ExplanationMetadata.inputs]. The baseline
// of the empty feature is chosen by AI Platform.
//
map<string, InputMetadata> inputs = 1 [(google.api.field_behavior) = REQUIRED];
// Required. Map from output names to output metadata.
//
// Keys are the name of the output field in the prediction to be explained.
// Currently only one key is allowed.
//
map<string, OutputMetadata> outputs = 2 [(google.api.field_behavior) = REQUIRED];
// Points to a YAML file stored on Google Cloud Storage describing the format
// of the [feature attributions][google.cloud.aiplatform.v1beta1.Attribution.feature_attributions].
// The schema is defined as an OpenAPI 3.0.2
// [Schema Object](https://tinyurl.com/y538mdwt#schema-object).
// AutoML tabular Models always have this field populated by AI Platform.
// Note: The URI given on output may be different, including the URI scheme,
// than the one given on input. The output URI will point to a location where
// the user only has a read access.
string feature_attributions_schema_uri = 3;
}

@ -0,0 +1,102 @@
// Copyright 2020 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/custom_job.proto";
import "google/cloud/aiplatform/v1beta1/job_state.proto";
import "google/cloud/aiplatform/v1beta1/study.proto";
import "google/protobuf/timestamp.proto";
import "google/rpc/status.proto";
import "google/api/annotations.proto";
option go_package = "google.golang.org/genproto/googleapis/cloud/aiplatform/v1beta1;aiplatform";
option java_multiple_files = true;
option java_outer_classname = "HyperparameterTuningJobProto";
option java_package = "com.google.cloud.aiplatform.v1beta1";
// Represents a HyperparameterTuningJob. A HyperparameterTuningJob
// has a Study specification and multiple CustomJobs with identical
// CustomJob specification.
message HyperparameterTuningJob {
option (google.api.resource) = {
type: "aiplatform.googleapis.com/HyperparameterTuningJob"
pattern: "projects/{project}/locations/{location}/hyperparameterTuningJobs/{hyperparameter_tuning_job}"
};
// Output only. Resource name of the HyperparameterTuningJob.
string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
// Required. The display name of the HyperparameterTuningJob.
// The name can be up to 128 characters long and can be consist of any UTF-8
// characters.
string display_name = 2 [(google.api.field_behavior) = REQUIRED];
// Required. Study configuration of the HyperparameterTuningJob.
StudySpec study_spec = 4 [(google.api.field_behavior) = REQUIRED];
// Required. The desired total number of Trials.
int32 max_trial_count = 5 [(google.api.field_behavior) = REQUIRED];
// Required. The desired number of Trials to run in parallel.
int32 parallel_trial_count = 6 [(google.api.field_behavior) = REQUIRED];
// The number of failed Trials that need to be seen before failing
// the HyperparameterTuningJob.
//
// If set to 0, AI Platform decides how many Trials must fail
// before the whole job fails.
int32 max_failed_trial_count = 7;
// Required. The spec of a trial job. The same spec applies to the CustomJobs created
// in all the trials.
CustomJobSpec trial_job_spec = 8 [(google.api.field_behavior) = REQUIRED];
// Output only. Trials of the HyperparameterTuningJob.
repeated Trial trials = 9 [(google.api.field_behavior) = OUTPUT_ONLY];
// Output only. The detailed state of the job.
JobState state = 10 [(google.api.field_behavior) = OUTPUT_ONLY];
// Output only. Time when the HyperparameterTuningJob was created.
google.protobuf.Timestamp create_time = 11 [(google.api.field_behavior) = OUTPUT_ONLY];
// Output only. Time when the HyperparameterTuningJob for the first time entered the
// `JOB_STATE_RUNNING` state.
google.protobuf.Timestamp start_time = 12 [(google.api.field_behavior) = OUTPUT_ONLY];
// Output only. Time when the HyperparameterTuningJob entered any of the following states:
// `JOB_STATE_SUCCEEDED`, `JOB_STATE_FAILED`, `JOB_STATE_CANCELLED`.
google.protobuf.Timestamp end_time = 13 [(google.api.field_behavior) = OUTPUT_ONLY];
// Output only. Time when the HyperparameterTuningJob was most recently updated.
google.protobuf.Timestamp update_time = 14 [(google.api.field_behavior) = OUTPUT_ONLY];
// Output only. Only populated when job's state is JOB_STATE_FAILED or
// JOB_STATE_CANCELLED.
google.rpc.Status error = 15 [(google.api.field_behavior) = OUTPUT_ONLY];
// The labels with user-defined metadata to organize HyperparameterTuningJobs.
//
// Label keys and values can be no longer than 64 characters
// (Unicode codepoints), can only contain lowercase letters, numeric
// characters, underscores and dashes. International characters are allowed.
//
// See https://goo.gl/xmQnxf for more information and examples of labels.
map<string, string> labels = 16;
}

@ -0,0 +1,75 @@
// Copyright 2020 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/annotations.proto";
option go_package = "google.golang.org/genproto/googleapis/cloud/aiplatform/v1beta1;aiplatform";
option java_multiple_files = true;
option java_outer_classname = "IoProto";
option java_package = "com.google.cloud.aiplatform.v1beta1";
// The Google Cloud Storage location for the input content.
message GcsSource {
// Required. Google Cloud Storage URI(-s) to the input file(s). May contain
// wildcards. For more information on wildcards, see
// https://cloud.google.com/storage/docs/gsutil/addlhelp/WildcardNames.
repeated string uris = 1 [(google.api.field_behavior) = REQUIRED];
}
// The Google Cloud Storage location where the output is to be written to.
message GcsDestination {
// Required. Google Cloud Storage URI to output directory. If the uri doesn't end with
// '/', a '/' will be automatically appended. The directory is created if it
// doesn't exist.
string output_uri_prefix = 1 [(google.api.field_behavior) = REQUIRED];
}
// The BigQuery location for the input content.
message BigQuerySource {
// Required. BigQuery URI to a table, up to 2000 characters long.
// Accepted forms:
//
// * BigQuery path. For example: `bq://projectId.bqDatasetId.bqTableId`.
string input_uri = 1 [(google.api.field_behavior) = REQUIRED];
}
// The BigQuery location for the output content.
message BigQueryDestination {
// Required. BigQuery URI to a project, up to 2000 characters long.
// Accepted forms:
//
// * BigQuery path. For example: `bq://projectId`.
string output_uri = 1 [(google.api.field_behavior) = REQUIRED];
}
// The Container Regsitry location for the container image.
message ContainerRegistryDestination {
// Required. Container Registry URI of a container image.
// Only Google Container Registry and Artifact Registry are supported now.
// Accepted forms:
//
// * Google Container Registry path. For example:
// `gcr.io/projectId/imageName:tag`.
//
// * Artifact Registry path. For example:
// `us-central1-docker.pkg.dev/projectId/repoName/imageName:tag`.
//
// If a tag is not specified, "latest" will be used as the default tag.
string output_uri = 1 [(google.api.field_behavior) = REQUIRED];
}

@ -0,0 +1,699 @@
// Copyright 2020 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/batch_prediction_job.proto";
import "google/cloud/aiplatform/v1beta1/custom_job.proto";
import "google/cloud/aiplatform/v1beta1/data_labeling_job.proto";
import "google/cloud/aiplatform/v1beta1/hyperparameter_tuning_job.proto";
import "google/longrunning/operations.proto";
import "google/protobuf/empty.proto";
import "google/protobuf/field_mask.proto";
option go_package = "google.golang.org/genproto/googleapis/cloud/aiplatform/v1beta1;aiplatform";
option java_multiple_files = true;
option java_outer_classname = "JobServiceProto";
option java_package = "com.google.cloud.aiplatform.v1beta1";
// A service for creating and managing AI Platform's jobs.
service JobService {
option (google.api.default_host) = "aiplatform.googleapis.com";
option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform";
// Creates a CustomJob. A created CustomJob right away
// will be attempted to be run.
rpc CreateCustomJob(CreateCustomJobRequest) returns (CustomJob) {
option (google.api.http) = {
post: "/v1beta1/{parent=projects/*/locations/*}/customJobs"
body: "custom_job"
};
option (google.api.method_signature) = "parent,custom_job";
}
// Gets a CustomJob.
rpc GetCustomJob(GetCustomJobRequest) returns (CustomJob) {
option (google.api.http) = {
get: "/v1beta1/{name=projects/*/locations/*/customJobs/*}"
};
option (google.api.method_signature) = "name";
}
// Lists CustomJobs in a Location.
rpc ListCustomJobs(ListCustomJobsRequest) returns (ListCustomJobsResponse) {
option (google.api.http) = {
get: "/v1beta1/{parent=projects/*/locations/*}/customJobs"
};
option (google.api.method_signature) = "parent";
}
// Deletes a CustomJob.
rpc DeleteCustomJob(DeleteCustomJobRequest) returns (google.longrunning.Operation) {
option (google.api.http) = {
delete: "/v1beta1/{name=projects/*/locations/*/customJobs/*}"
};
option (google.api.method_signature) = "name";
option (google.longrunning.operation_info) = {
response_type: "google.protobuf.Empty"
metadata_type: "DeleteOperationMetadata"
};
}
// Cancels a CustomJob.
// Starts asynchronous cancellation on the CustomJob. The server
// makes a best effort to cancel the job, but success is not
// guaranteed. Clients can use [JobService.GetCustomJob][google.cloud.aiplatform.v1beta1.JobService.GetCustomJob] or
// other methods to check whether the cancellation succeeded or whether the
// job completed despite cancellation. On successful cancellation,
// the CustomJob is not deleted; instead it becomes a job with
// a [CustomJob.error][google.cloud.aiplatform.v1beta1.CustomJob.error] value with a [google.rpc.Status.code][google.rpc.Status.code] of 1,
// corresponding to `Code.CANCELLED`, and [CustomJob.state][google.cloud.aiplatform.v1beta1.CustomJob.state] is set to
// `CANCELLED`.
rpc CancelCustomJob(CancelCustomJobRequest) returns (google.protobuf.Empty) {
option (google.api.http) = {
post: "/v1beta1/{name=projects/*/locations/*/customJobs/*}:cancel"
body: "*"
};
option (google.api.method_signature) = "name";
}
// Creates a DataLabelingJob.
rpc CreateDataLabelingJob(CreateDataLabelingJobRequest) returns (DataLabelingJob) {
option (google.api.http) = {
post: "/v1beta1/{parent=projects/*/locations/*}/dataLabelingJobs"
body: "data_labeling_job"
};
option (google.api.method_signature) = "parent,data_labeling_job";
}
// Gets a DataLabelingJob.
rpc GetDataLabelingJob(GetDataLabelingJobRequest) returns (DataLabelingJob) {
option (google.api.http) = {
get: "/v1beta1/{name=projects/*/locations/*/dataLabelingJobs/*}"
};
option (google.api.method_signature) = "name";
}
// Lists DataLabelingJobs in a Location.
rpc ListDataLabelingJobs(ListDataLabelingJobsRequest) returns (ListDataLabelingJobsResponse) {
option (google.api.http) = {
get: "/v1beta1/{parent=projects/*/locations/*}/dataLabelingJobs"
};
option (google.api.method_signature) = "parent";
}
// Deletes a DataLabelingJob.
rpc DeleteDataLabelingJob(DeleteDataLabelingJobRequest) returns (google.longrunning.Operation) {
option (google.api.http) = {
delete: "/v1beta1/{name=projects/*/locations/*/dataLabelingJobs/*}"
};
option (google.api.method_signature) = "name";
option (google.longrunning.operation_info) = {
response_type: "google.protobuf.Empty"
metadata_type: "DeleteOperationMetadata"
};
}
// Cancels a DataLabelingJob. Success of cancellation is not guaranteed.
rpc CancelDataLabelingJob(CancelDataLabelingJobRequest) returns (google.protobuf.Empty) {
option (google.api.http) = {
post: "/v1beta1/{name=projects/*/locations/*/dataLabelingJobs/*}:cancel"
body: "*"
};
option (google.api.method_signature) = "name";
}
// Creates a HyperparameterTuningJob
rpc CreateHyperparameterTuningJob(CreateHyperparameterTuningJobRequest) returns (HyperparameterTuningJob) {
option (google.api.http) = {
post: "/v1beta1/{parent=projects/*/locations/*}/hyperparameterTuningJobs"
body: "hyperparameter_tuning_job"
};
option (google.api.method_signature) = "parent,hyperparameter_tuning_job";
}
// Gets a HyperparameterTuningJob
rpc GetHyperparameterTuningJob(GetHyperparameterTuningJobRequest) returns (HyperparameterTuningJob) {
option (google.api.http) = {
get: "/v1beta1/{name=projects/*/locations/*/hyperparameterTuningJobs/*}"
};
option (google.api.method_signature) = "name";
}
// Lists HyperparameterTuningJobs in a Location.
rpc ListHyperparameterTuningJobs(ListHyperparameterTuningJobsRequest) returns (ListHyperparameterTuningJobsResponse) {
option (google.api.http) = {
get: "/v1beta1/{parent=projects/*/locations/*}/hyperparameterTuningJobs"
};
option (google.api.method_signature) = "parent";
}
// Deletes a HyperparameterTuningJob.
rpc DeleteHyperparameterTuningJob(DeleteHyperparameterTuningJobRequest) returns (google.longrunning.Operation) {
option (google.api.http) = {
delete: "/v1beta1/{name=projects/*/locations/*/hyperparameterTuningJobs/*}"
};
option (google.api.method_signature) = "name";
option (google.longrunning.operation_info) = {
response_type: "google.protobuf.Empty"
metadata_type: "DeleteOperationMetadata"
};
}
// Cancels a HyperparameterTuningJob.
// Starts asynchronous cancellation on the HyperparameterTuningJob. The server
// makes a best effort to cancel the job, but success is not
// guaranteed. Clients can use [JobService.GetHyperparameterTuningJob][google.cloud.aiplatform.v1beta1.JobService.GetHyperparameterTuningJob] or
// other methods to check whether the cancellation succeeded or whether the
// job completed despite cancellation. On successful cancellation,
// the HyperparameterTuningJob is not deleted; instead it becomes a job with
// a [HyperparameterTuningJob.error][google.cloud.aiplatform.v1beta1.HyperparameterTuningJob.error] value with a [google.rpc.Status.code][google.rpc.Status.code]
// of 1, corresponding to `Code.CANCELLED`, and
// [HyperparameterTuningJob.state][google.cloud.aiplatform.v1beta1.HyperparameterTuningJob.state] is set to `CANCELLED`.
rpc CancelHyperparameterTuningJob(CancelHyperparameterTuningJobRequest) returns (google.protobuf.Empty) {
option (google.api.http) = {
post: "/v1beta1/{name=projects/*/locations/*/hyperparameterTuningJobs/*}:cancel"
body: "*"
};
option (google.api.method_signature) = "name";
}
// Creates a BatchPredictionJob. A BatchPredictionJob once created will
// right away be attempted to start.
rpc CreateBatchPredictionJob(CreateBatchPredictionJobRequest) returns (BatchPredictionJob) {
option (google.api.http) = {
post: "/v1beta1/{parent=projects/*/locations/*}/batchPredictionJobs"
body: "batch_prediction_job"
};
option (google.api.method_signature) = "parent,batch_prediction_job";
}
// Gets a BatchPredictionJob
rpc GetBatchPredictionJob(GetBatchPredictionJobRequest) returns (BatchPredictionJob) {
option (google.api.http) = {
get: "/v1beta1/{name=projects/*/locations/*/batchPredictionJobs/*}"
};
option (google.api.method_signature) = "name";
}
// Lists BatchPredictionJobs in a Location.
rpc ListBatchPredictionJobs(ListBatchPredictionJobsRequest) returns (ListBatchPredictionJobsResponse) {
option (google.api.http) = {
get: "/v1beta1/{parent=projects/*/locations/*}/batchPredictionJobs"
};
option (google.api.method_signature) = "parent";
}
// Deletes a BatchPredictionJob. Can only be called on jobs that already
// finished.
rpc DeleteBatchPredictionJob(DeleteBatchPredictionJobRequest) returns (google.longrunning.Operation) {
option (google.api.http) = {
delete: "/v1beta1/{name=projects/*/locations/*/batchPredictionJobs/*}"
};
option (google.api.method_signature) = "name";
option (google.longrunning.operation_info) = {
response_type: "google.protobuf.Empty"
metadata_type: "DeleteOperationMetadata"
};
}
// Cancels a BatchPredictionJob.
//
// Starts asynchronous cancellation on the BatchPredictionJob. The server
// makes the best effort to cancel the job, but success is not
// guaranteed. Clients can use [JobService.GetBatchPredictionJob][google.cloud.aiplatform.v1beta1.JobService.GetBatchPredictionJob] or
// other methods to check whether the cancellation succeeded or whether the
// job completed despite cancellation. On a successful cancellation,
// the BatchPredictionJob is not deleted;instead its
// [BatchPredictionJob.state][google.cloud.aiplatform.v1beta1.BatchPredictionJob.state] is set to `CANCELLED`. Any files already
// outputted by the job are not deleted.
rpc CancelBatchPredictionJob(CancelBatchPredictionJobRequest) returns (google.protobuf.Empty) {
option (google.api.http) = {
post: "/v1beta1/{name=projects/*/locations/*/batchPredictionJobs/*}:cancel"
body: "*"
};
option (google.api.method_signature) = "name";
}
}
// Request message for [JobService.CreateCustomJob][google.cloud.aiplatform.v1beta1.JobService.CreateCustomJob].
message CreateCustomJobRequest {
// Required. The resource name of the Location to create the CustomJob in.
// Format: `projects/{project}/locations/{location}`
string parent = 1 [
(google.api.field_behavior) = REQUIRED,
(google.api.resource_reference) = {
type: "locations.googleapis.com/Location"
}
];
// Required. The CustomJob to create.
CustomJob custom_job = 2 [(google.api.field_behavior) = REQUIRED];
}
// Request message for [JobService.GetCustomJob][google.cloud.aiplatform.v1beta1.JobService.GetCustomJob].
message GetCustomJobRequest {
// Required. The name of the CustomJob resource.
// Format:
// `projects/{project}/locations/{location}/customJobs/{custom_job}`
string name = 1 [
(google.api.field_behavior) = REQUIRED,
(google.api.resource_reference) = {
type: "aiplatform.googleapis.com/CustomJob"
}
];
}
// Request message for [JobService.ListCustomJobs][google.cloud.aiplatform.v1beta1.JobService.ListCustomJobs].
message ListCustomJobsRequest {
// Required. The resource name of the Location to list the CustomJobs from.
// Format: `projects/{project}/locations/{location}`
string parent = 1 [
(google.api.field_behavior) = REQUIRED,
(google.api.resource_reference) = {
type: "locations.googleapis.com/Location"
}
];
// The standard list filter.
//
// Supported fields:
//
// * `display_name` supports = and !=.
//
// * `state` supports = and !=.
//
// Some examples of using the filter are:
//
// * `state="JOB_STATE_SUCCEEDED" AND display_name="my_job"`
//
// * `state="JOB_STATE_RUNNING" OR display_name="my_job"`
//
// * `NOT display_name="my_job"`
//
// * `state="JOB_STATE_FAILED"`
string filter = 2;
// The standard list page size.
int32 page_size = 3;
// The standard list page token.
// Typically obtained via
// [ListCustomJobsResponse.next_page_token][google.cloud.aiplatform.v1beta1.ListCustomJobsResponse.next_page_token] of the previous
// [JobService.ListCustomJobs][google.cloud.aiplatform.v1beta1.JobService.ListCustomJobs] call.
string page_token = 4;
// Mask specifying which fields to read.
google.protobuf.FieldMask read_mask = 5;
}
// Response message for [JobService.ListCustomJobs][google.cloud.aiplatform.v1beta1.JobService.ListCustomJobs]
message ListCustomJobsResponse {
// List of CustomJobs in the requested page.
repeated CustomJob custom_jobs = 1;
// A token to retrieve next page of results.
// Pass to [ListCustomJobsRequest.page_token][google.cloud.aiplatform.v1beta1.ListCustomJobsRequest.page_token] to obtain that page.
string next_page_token = 2;
}
// Request message for [JobService.DeleteCustomJob][google.cloud.aiplatform.v1beta1.JobService.DeleteCustomJob].
message DeleteCustomJobRequest {
// Required. The name of the CustomJob resource to be deleted.
// Format:
// `projects/{project}/locations/{location}/customJobs/{custom_job}`
string name = 1 [
(google.api.field_behavior) = REQUIRED,
(google.api.resource_reference) = {
type: "aiplatform.googleapis.com/CustomJob"
}
];
}
// Request message for [JobService.CancelCustomJob][google.cloud.aiplatform.v1beta1.JobService.CancelCustomJob].
message CancelCustomJobRequest {
// Required. The name of the CustomJob to cancel.
// Format:
// `projects/{project}/locations/{location}/customJobs/{custom_job}`
string name = 1 [
(google.api.field_behavior) = REQUIRED,
(google.api.resource_reference) = {
type: "aiplatform.googleapis.com/CustomJob"
}
];
}
// Request message for [DataLabelingJobService.CreateDataLabelingJob][].
message CreateDataLabelingJobRequest {
// Required. The parent of the DataLabelingJob.
// Format: `projects/{project}/locations/{location}`
string parent = 1 [
(google.api.field_behavior) = REQUIRED,
(google.api.resource_reference) = {
type: "locations.googleapis.com/Location"
}
];
// Required. The DataLabelingJob to create.
DataLabelingJob data_labeling_job = 2 [(google.api.field_behavior) = REQUIRED];
}
// Request message for [DataLabelingJobService.GetDataLabelingJob][].
message GetDataLabelingJobRequest {
// Required. The name of the DataLabelingJob.
// Format:
//
// `projects/{project}/locations/{location}/dataLabelingJobs/{data_labeling_job}`
string name = 1 [
(google.api.field_behavior) = REQUIRED,
(google.api.resource_reference) = {
type: "aiplatform.googleapis.com/DataLabelingJob"
}
];
}
// Request message for [DataLabelingJobService.ListDataLabelingJobs][].
message ListDataLabelingJobsRequest {
// Required. The parent of the DataLabelingJob.
// Format: `projects/{project}/locations/{location}`
string parent = 1 [
(google.api.field_behavior) = REQUIRED,
(google.api.resource_reference) = {
type: "locations.googleapis.com/Location"
}
];
// The standard list filter.
//
// Supported fields:
//
// * `display_name` supports = and !=.
//
// * `state` supports = and !=.
//
// Some examples of using the filter are:
//
// * `state="JOB_STATE_SUCCEEDED" AND display_name="my_job"`
//
// * `state="JOB_STATE_RUNNING" OR display_name="my_job"`
//
// * `NOT display_name="my_job"`
//
// * `state="JOB_STATE_FAILED"`
string filter = 2;
// The standard list page size.
int32 page_size = 3;
// The standard list page token.
string page_token = 4;
// Mask specifying which fields to read. FieldMask represents a set of
// symbolic field paths. For example, the mask can be `paths: "name"`. The
// "name" here is a field in DataLabelingJob.
// If this field is not set, all fields of the DataLabelingJob are returned.
google.protobuf.FieldMask read_mask = 5;
// A comma-separated list of fields to order by, sorted in ascending order by
// default.
// Use `desc` after a field name for descending.
string order_by = 6;
}
// Response message for [JobService.ListDataLabelingJobs][google.cloud.aiplatform.v1beta1.JobService.ListDataLabelingJobs].
message ListDataLabelingJobsResponse {
// A list of DataLabelingJobs that matches the specified filter in the
// request.
repeated DataLabelingJob data_labeling_jobs = 1;
// The standard List next-page token.
string next_page_token = 2;
}
// Request message for [JobService.DeleteDataLabelingJob][google.cloud.aiplatform.v1beta1.JobService.DeleteDataLabelingJob].
message DeleteDataLabelingJobRequest {
// Required. The name of the DataLabelingJob to be deleted.
// Format:
//
// `projects/{project}/locations/{location}/dataLabelingJobs/{data_labeling_job}`
string name = 1 [
(google.api.field_behavior) = REQUIRED,
(google.api.resource_reference) = {
type: "aiplatform.googleapis.com/DataLabelingJob"
}
];
}
// Request message for [DataLabelingJobService.CancelDataLabelingJob][].
message CancelDataLabelingJobRequest {
// Required. The name of the DataLabelingJob.
// Format:
//
// `projects/{project}/locations/{location}/dataLabelingJobs/{data_labeling_job}`
string name = 1 [
(google.api.field_behavior) = REQUIRED,
(google.api.resource_reference) = {
type: "aiplatform.googleapis.com/DataLabelingJob"
}
];
}
// Request message for [JobService.CreateHyperparameterTuningJob][google.cloud.aiplatform.v1beta1.JobService.CreateHyperparameterTuningJob].
message CreateHyperparameterTuningJobRequest {
// Required. The resource name of the Location to create the HyperparameterTuningJob in.
// Format: `projects/{project}/locations/{location}`
string parent = 1 [
(google.api.field_behavior) = REQUIRED,
(google.api.resource_reference) = {
type: "locations.googleapis.com/Location"
}
];
// Required. The HyperparameterTuningJob to create.
HyperparameterTuningJob hyperparameter_tuning_job = 2 [(google.api.field_behavior) = REQUIRED];
}
// Request message for [JobService.GetHyperparameterTuningJob][google.cloud.aiplatform.v1beta1.JobService.GetHyperparameterTuningJob].
message GetHyperparameterTuningJobRequest {
// Required. The name of the HyperparameterTuningJob resource.
// Format:
//
// `projects/{project}/locations/{location}/hyperparameterTuningJobs/{hyperparameter_tuning_job}`
string name = 1 [
(google.api.field_behavior) = REQUIRED,
(google.api.resource_reference) = {
type: "aiplatform.googleapis.com/HyperparameterTuningJob"
}
];
}
// Request message for [JobService.ListHyperparameterTuningJobs][google.cloud.aiplatform.v1beta1.JobService.ListHyperparameterTuningJobs].
message ListHyperparameterTuningJobsRequest {
// Required. The resource name of the Location to list the HyperparameterTuningJobs
// from. Format: `projects/{project}/locations/{location}`
string parent = 1 [
(google.api.field_behavior) = REQUIRED,
(google.api.resource_reference) = {
type: "locations.googleapis.com/Location"
}
];
// The standard list filter.
//
// Supported fields:
//
// * `display_name` supports = and !=.
//
// * `state` supports = and !=.
//
// Some examples of using the filter are:
//
// * `state="JOB_STATE_SUCCEEDED" AND display_name="my_job"`
//
// * `state="JOB_STATE_RUNNING" OR display_name="my_job"`
//
// * `NOT display_name="my_job"`
//
// * `state="JOB_STATE_FAILED"`
string filter = 2;
// The standard list page size.
int32 page_size = 3;
// The standard list page token.
// Typically obtained via
// [ListHyperparameterTuningJobsResponse.next_page_token][google.cloud.aiplatform.v1beta1.ListHyperparameterTuningJobsResponse.next_page_token] of the previous
// [JobService.ListHyperparameterTuningJobs][google.cloud.aiplatform.v1beta1.JobService.ListHyperparameterTuningJobs] call.
string page_token = 4;
// Mask specifying which fields to read.
google.protobuf.FieldMask read_mask = 5;
}
// Response message for [JobService.ListHyperparameterTuningJobs][google.cloud.aiplatform.v1beta1.JobService.ListHyperparameterTuningJobs]
message ListHyperparameterTuningJobsResponse {
// List of HyperparameterTuningJobs in the requested page.
// [HyperparameterTuningJob.trials][google.cloud.aiplatform.v1beta1.HyperparameterTuningJob.trials] of the jobs will be not be returned.
repeated HyperparameterTuningJob hyperparameter_tuning_jobs = 1;
// A token to retrieve next page of results.
// Pass to [ListHyperparameterTuningJobsRequest.page_token][google.cloud.aiplatform.v1beta1.ListHyperparameterTuningJobsRequest.page_token] to obtain that
// page.
string next_page_token = 2;
}
// Request message for [JobService.DeleteHyperparameterTuningJob][google.cloud.aiplatform.v1beta1.JobService.DeleteHyperparameterTuningJob].
message DeleteHyperparameterTuningJobRequest {
// Required. The name of the HyperparameterTuningJob resource to be deleted.
// Format:
//
// `projects/{project}/locations/{location}/hyperparameterTuningJobs/{hyperparameter_tuning_job}`
string name = 1 [
(google.api.field_behavior) = REQUIRED,
(google.api.resource_reference) = {
type: "aiplatform.googleapis.com/HyperparameterTuningJob"
}
];
}
// Request message for [JobService.CancelHyperparameterTuningJob][google.cloud.aiplatform.v1beta1.JobService.CancelHyperparameterTuningJob].
message CancelHyperparameterTuningJobRequest {
// Required. The name of the HyperparameterTuningJob to cancel.
// Format:
//
// `projects/{project}/locations/{location}/hyperparameterTuningJobs/{hyperparameter_tuning_job}`
string name = 1 [
(google.api.field_behavior) = REQUIRED,
(google.api.resource_reference) = {
type: "aiplatform.googleapis.com/HyperparameterTuningJob"
}
];
}
// Request message for [JobService.CreateBatchPredictionJob][google.cloud.aiplatform.v1beta1.JobService.CreateBatchPredictionJob].
message CreateBatchPredictionJobRequest {
// Required. The resource name of the Location to create the BatchPredictionJob in.
// Format: `projects/{project}/locations/{location}`
string parent = 1 [
(google.api.field_behavior) = REQUIRED,
(google.api.resource_reference) = {
type: "locations.googleapis.com/Location"
}
];
// Required. The BatchPredictionJob to create.
BatchPredictionJob batch_prediction_job = 2 [(google.api.field_behavior) = REQUIRED];
}
// Request message for [JobService.GetBatchPredictionJob][google.cloud.aiplatform.v1beta1.JobService.GetBatchPredictionJob].
message GetBatchPredictionJobRequest {
// Required. The name of the BatchPredictionJob resource.
// Format:
//
// `projects/{project}/locations/{location}/batchPredictionJobs/{batch_prediction_job}`
string name = 1 [
(google.api.field_behavior) = REQUIRED,
(google.api.resource_reference) = {
type: "aiplatform.googleapis.com/BatchPredictionJob"
}
];
}
// Request message for [JobService.ListBatchPredictionJobs][google.cloud.aiplatform.v1beta1.JobService.ListBatchPredictionJobs].
message ListBatchPredictionJobsRequest {
// Required. The resource name of the Location to list the BatchPredictionJobs
// from. Format: `projects/{project}/locations/{location}`
string parent = 1 [
(google.api.field_behavior) = REQUIRED,
(google.api.resource_reference) = {
type: "locations.googleapis.com/Location"
}
];
// The standard list filter.
//
// Supported fields:
//
// * `display_name` supports = and !=.
//
// * `state` supports = and !=.
//
// Some examples of using the filter are:
//
// * `state="JOB_STATE_SUCCEEDED" AND display_name="my_job"`
//
// * `state="JOB_STATE_RUNNING" OR display_name="my_job"`
//
// * `NOT display_name="my_job"`
//
// * `state="JOB_STATE_FAILED"`
string filter = 2;
// The standard list page size.
int32 page_size = 3;
// The standard list page token.
// Typically obtained via
// [ListBatchPredictionJobsResponse.next_page_token][google.cloud.aiplatform.v1beta1.ListBatchPredictionJobsResponse.next_page_token] of the previous
// [JobService.ListBatchPredictionJobs][google.cloud.aiplatform.v1beta1.JobService.ListBatchPredictionJobs] call.
string page_token = 4;
// Mask specifying which fields to read.
google.protobuf.FieldMask read_mask = 5;
}
// Response message for [JobService.ListBatchPredictionJobs][google.cloud.aiplatform.v1beta1.JobService.ListBatchPredictionJobs]
message ListBatchPredictionJobsResponse {
// List of BatchPredictionJobs in the requested page.
repeated BatchPredictionJob batch_prediction_jobs = 1;
// A token to retrieve next page of results.
// Pass to [ListBatchPredictionJobsRequest.page_token][google.cloud.aiplatform.v1beta1.ListBatchPredictionJobsRequest.page_token] to obtain that
// page.
string next_page_token = 2;
}
// Request message for [JobService.DeleteBatchPredictionJob][google.cloud.aiplatform.v1beta1.JobService.DeleteBatchPredictionJob].
message DeleteBatchPredictionJobRequest {
// Required. The name of the BatchPredictionJob resource to be deleted.
// Format:
//
// `projects/{project}/locations/{location}/batchPredictionJobs/{batch_prediction_job}`
string name = 1 [
(google.api.field_behavior) = REQUIRED,
(google.api.resource_reference) = {
type: "aiplatform.googleapis.com/BatchPredictionJob"
}
];
}
// Request message for [JobService.CancelBatchPredictionJob][google.cloud.aiplatform.v1beta1.JobService.CancelBatchPredictionJob].
message CancelBatchPredictionJobRequest {
// Required. The name of the BatchPredictionJob to cancel.
// Format:
//
// `projects/{project}/locations/{location}/batchPredictionJobs/{batch_prediction_job}`
string name = 1 [
(google.api.field_behavior) = REQUIRED,
(google.api.resource_reference) = {
type: "aiplatform.googleapis.com/BatchPredictionJob"
}
];
}

@ -0,0 +1,55 @@
// Copyright 2020 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";
option go_package = "google.golang.org/genproto/googleapis/cloud/aiplatform/v1beta1;aiplatform";
option java_multiple_files = true;
option java_outer_classname = "JobStateProto";
option java_package = "com.google.cloud.aiplatform.v1beta1";
// Describes the state of a job.
enum JobState {
// The job state is unspecified.
JOB_STATE_UNSPECIFIED = 0;
// The job has been just created or resumed and processing has not yet begun.
JOB_STATE_QUEUED = 1;
// The service is preparing to run the job.
JOB_STATE_PENDING = 2;
// The job is in progress.
JOB_STATE_RUNNING = 3;
// The job completed successfully.
JOB_STATE_SUCCEEDED = 4;
// The job failed.
JOB_STATE_FAILED = 5;
// The job is being cancelled. From this state the job may only go to
// either `JOB_STATE_SUCCEEDED`, `JOB_STATE_FAILED` or `JOB_STATE_CANCELLED`.
JOB_STATE_CANCELLING = 6;
// The job has been cancelled.
JOB_STATE_CANCELLED = 7;
// The job has been stopped, and can be resumed.
JOB_STATE_PAUSED = 8;
}

@ -0,0 +1,156 @@
// Copyright 2020 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/cloud/aiplatform/v1beta1/accelerator_type.proto";
import "google/api/annotations.proto";
option go_package = "google.golang.org/genproto/googleapis/cloud/aiplatform/v1beta1;aiplatform";
option java_multiple_files = true;
option java_outer_classname = "MachineResourcesProto";
option java_package = "com.google.cloud.aiplatform.v1beta1";
// Specification of a single machine.
message MachineSpec {
// Immutable. The type of the machine.
// Following machine types are supported:
//
// * `n1-standard-2`
//
// * `n1-standard-4`
//
// * `n1-standard-8`
//
// * `n1-standard-16`
//
// * `n1-standard-32`
//
// * `n1-highmem-2`
//
// * `n1-highmem-4`
//
// * `n1-highmem-8`
//
// * `n1-highmem-16`
//
// * `n1-highmem-32`
//
// * `n1-highcpu-2`
//
// * `n1-highcpu-4`
//
// * `n1-highcpu-8`
//
// * `n1-highcpu-16`
//
// * `n1-highcpu-32`
//
// When used for [DeployedMode][] this field is optional and the default value
// is `n1-standard-2`. If used for [BatchPredictionJob][google.cloud.aiplatform.v1beta1.BatchPredictionJob] or as part of
// [WorkerPoolSpec][google.cloud.aiplatform.v1beta1.WorkerPoolSpec] this field is required.
string machine_type = 1 [(google.api.field_behavior) = IMMUTABLE];
// Immutable. The type of accelerator(s) that may be attached to the machine as per
// [accelerator_count][google.cloud.aiplatform.v1beta1.MachineSpec.accelerator_count].
AcceleratorType accelerator_type = 2 [(google.api.field_behavior) = IMMUTABLE];
// The number of accelerators to attach to the machine.
int32 accelerator_count = 3;
}
// A description of resources that are dedicated to a DeployedModel, and
// that need a higher degree of manual configuration.
message DedicatedResources {
// Required. Immutable. The specification of a single machine used by the prediction.
MachineSpec machine_spec = 1 [
(google.api.field_behavior) = REQUIRED,
(google.api.field_behavior) = IMMUTABLE
];
// Required. Immutable. The minimum number of machine replicas this DeployedModel will be always
// deployed on. If traffic against it increases, it may dynamically be
// deployed onto more replicas, and as traffic decreases, some of these extra
// replicas may be freed.
// Note: if [machine_spec.accelerator_count][google.cloud.aiplatform.v1beta1.MachineSpec.accelerator_count] is
// above 0, currently the model will be always deployed precisely on
// [min_replica_count][google.cloud.aiplatform.v1beta1.DedicatedResources.min_replica_count].
int32 min_replica_count = 2 [
(google.api.field_behavior) = REQUIRED,
(google.api.field_behavior) = IMMUTABLE
];
// Immutable. The maximum number of replicas this DeployedModel may be deployed on when
// the traffic against it increases. If requested value is too large,
// the deployment will error, but if deployment succeeds then the ability
// to scale the model to that many replicas is guaranteed (barring service
// outages). If traffic against the DeployedModel increases beyond what its
// replicas at maximum may handle, a portion of the traffic will be dropped.
// If this value is not provided, will use [min_replica_count][google.cloud.aiplatform.v1beta1.DedicatedResources.min_replica_count] as the
// default value.
int32 max_replica_count = 3 [(google.api.field_behavior) = IMMUTABLE];
}
// A description of resources that to large degree are decided by AI Platform,
// and require only a modest additional configuration.
// Each Model supporting these resources documents its specific guidelines.
message AutomaticResources {
// Immutable. The minimum number of replicas this DeployedModel will be always deployed
// on. If traffic against it increases, it may dynamically be deployed onto
// more replicas up to [max_replica_count][google.cloud.aiplatform.v1beta1.AutomaticResources.max_replica_count], and as traffic decreases, some
// of these extra replicas may be freed.
// If requested value is too large, the deployment will error.
int32 min_replica_count = 1 [(google.api.field_behavior) = IMMUTABLE];
// Immutable. The maximum number of replicas this DeployedModel may be deployed on when
// the traffic against it increases. If requested value is too large,
// the deployment will error, but if deployment succeeds then the ability
// to scale the model to that many replicas is guaranteed (barring service
// outages). If traffic against the DeployedModel increases beyond what its
// replicas at maximum may handle, a portion of the traffic will be dropped.
// If this value is not provided, a no upper bound for scaling under heavy
// traffic will be assume, though AI Platform may be unable to scale beyond
// certain replica number.
int32 max_replica_count = 2 [(google.api.field_behavior) = IMMUTABLE];
}
// A description of resources that are used for performing batch operations, are
// dedicated to a Model, and need manual configuration.
message BatchDedicatedResources {
// Required. Immutable. The specification of a single machine.
MachineSpec machine_spec = 1 [
(google.api.field_behavior) = REQUIRED,
(google.api.field_behavior) = IMMUTABLE
];
// Immutable. The number of machine replicas used at the start of the batch operation.
// If not set, AI Platform decides starting number, not greater than
// [max_replica_count][google.cloud.aiplatform.v1beta1.BatchDedicatedResources.max_replica_count]
int32 starting_replica_count = 2 [(google.api.field_behavior) = IMMUTABLE];
// Immutable. The maximum number of machine replicas the batch operation may be scaled
// to. The default value is 10.
int32 max_replica_count = 3 [(google.api.field_behavior) = IMMUTABLE];
}
// Statistics information about resource consumption.
message ResourcesConsumed {
// Output only. The number of replica hours used. Note that many replicas may run in
// parallel, and additionally any given work may be queued for some time.
// Therefore this value is not strictly related to wall time.
double replica_hours = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
}

@ -0,0 +1,37 @@
// Copyright 2020 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/annotations.proto";
option go_package = "google.golang.org/genproto/googleapis/cloud/aiplatform/v1beta1;aiplatform";
option java_multiple_files = true;
option java_outer_classname = "ManualBatchTuningParametersProto";
option java_package = "com.google.cloud.aiplatform.v1beta1";
// Manual batch tuning parameters.
message ManualBatchTuningParameters {
// Immutable. The number of the records (e.g. instances) of the operation given in
// each batch to a machine replica. Machine type, and size of a single
// record should be considered when setting this parameter, higher value
// speeds up the batch operation's execution, but too high value will result
// in a whole batch not fitting in a machine's memory, and the whole
// operation will fail.
// The default value is 4.
int32 batch_size = 1 [(google.api.field_behavior) = IMMUTABLE];
}

@ -0,0 +1,378 @@
// Copyright 2020 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/dataset.proto";
import "google/cloud/aiplatform/v1beta1/deployed_model_ref.proto";
import "google/cloud/aiplatform/v1beta1/env_var.proto";
import "google/cloud/aiplatform/v1beta1/explanation.proto";
import "google/protobuf/struct.proto";
import "google/protobuf/timestamp.proto";
import "google/api/annotations.proto";
option go_package = "google.golang.org/genproto/googleapis/cloud/aiplatform/v1beta1;aiplatform";
option java_multiple_files = true;
option java_outer_classname = "ModelProto";
option java_package = "com.google.cloud.aiplatform.v1beta1";
// A trained machine learning Model.
message Model {
option (google.api.resource) = {
type: "aiplatform.googleapis.com/Model"
pattern: "projects/{project}/locations/{location}/models/{model}"
};
// Represents a supported by the Model export format.
// All formats export to Google Cloud Storage.
message ExportFormat {
// The Model content that can be exported.
enum ExportableContent {
// Should not be used.
EXPORTABLE_CONTENT_UNSPECIFIED = 0;
// Model artifact and any of its supported files. Will be exported to the
// specified [ExportModelRequest.output_config.artifact_destination]
ARTIFACT = 1;
// The container image that is to be used when deploying this Model. Will
// be exported to the specified
// [ExportModelRequest.output_config.image_destination]
IMAGE = 2;
}
// Output only. The ID of the export format.
// The possible format IDs are:
//
// * `tflite`
// Used for Android mobile devices.
//
// * `edgetpu-tflite`
// Used for [Edge TPU](https://cloud.google.com/edge-tpu/) devices.
//
// * `tf-saved-model`
// A tensorflow model in SavedModel format.
//
// * `tf-js`
// A [TensorFlow.js](https://www.tensorflow.org/js) model that can be used
// in the browser and in Node.js using JavaScript.
//
// * `core-ml`
// Used for iOS mobile devices.
//
// * `custom-trained`
// A Model that was uploaded or trained by custom code.
string id = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
// Output only. The content of this Model that may be exported.
repeated ExportableContent exportable_contents = 2 [(google.api.field_behavior) = OUTPUT_ONLY];
}
// Identifies a type of Model's prediction resources.
enum DeploymentResourcesType {
// Should not be used.
DEPLOYMENT_RESOURCES_TYPE_UNSPECIFIED = 0;
// Resources that are dedicated to the [DeployedModel][google.cloud.aiplatform.v1beta1.DeployedModel], and that need a
// higher degree of manual configuration.
DEDICATED_RESOURCES = 1;
// Resources that to large degree are decided by AI Platform, and require
// only a modest additional configuration.
AUTOMATIC_RESOURCES = 2;
}
// The resource name of the Model.
string name = 1;
// Required. The display name of the Model.
// The name can be up to 128 characters long and can be consist of any UTF-8
// characters.
string display_name = 2 [(google.api.field_behavior) = REQUIRED];
// The description of the Model.
string description = 3;
// The schemata that describe formats of the Model's predictions and
// explanations as given and returned via
// [PredictionService.Predict][google.cloud.aiplatform.v1beta1.PredictionService.Predict] and [PredictionService.Explain][google.cloud.aiplatform.v1beta1.PredictionService.Explain].
PredictSchemata predict_schemata = 4;
// Immutable. Points to a YAML file stored on Google Cloud Storage describing additional
// information about the Model, that is specific to it. Unset if the Model
// does not have any additional information.
// The schema is defined as an OpenAPI 3.0.2
// [Schema Object](https://tinyurl.com/y538mdwt#schema-object).
// AutoML Models always have this field populated by AI Platform, if no
// additional metadata is needed this field is set to an empty string.
// Note: The URI given on output will be immutable and probably different,
// including the URI scheme, than the one given on input. The output URI will
// point to a location where the user only has a read access.
string metadata_schema_uri = 5 [(google.api.field_behavior) = IMMUTABLE];
// Immutable. An additional information about the Model; the schema of the metadata can
// be found in [metadata_schema][google.cloud.aiplatform.v1beta1.Model.metadata_schema_uri].
// Unset if the Model does not have any additional information.
google.protobuf.Value metadata = 6 [(google.api.field_behavior) = IMMUTABLE];
// Output only. The formats in which this Model may be exported. If empty, this Model is
// not avaiable for export.
repeated ExportFormat supported_export_formats = 20 [(google.api.field_behavior) = OUTPUT_ONLY];
// Output only. The resource name of the TrainingPipeline that uploaded this Model, if any.
string training_pipeline = 7 [
(google.api.field_behavior) = OUTPUT_ONLY,
(google.api.resource_reference) = {
type: "aiplatform.googleapis.com/TrainingPipeline"
}
];
// Input only. The specification of the container that is to be used when deploying
// this Model. The specification is ingested upon
// [ModelService.UploadModel][google.cloud.aiplatform.v1beta1.ModelService.UploadModel], and all binaries it contains are copied
// and stored internally by AI Platform.
// Not present for AutoML Models.
ModelContainerSpec container_spec = 9 [(google.api.field_behavior) = INPUT_ONLY];
// Immutable. The path to the directory containing the Model artifact and any of its
// supporting files.
// Not present for AutoML Models.
string artifact_uri = 26 [(google.api.field_behavior) = IMMUTABLE];
// Output only. When this Model is deployed, its prediction resources are described by the
// `prediction_resources` field of the [Endpoint.deployed_models][google.cloud.aiplatform.v1beta1.Endpoint.deployed_models] object.
// Because not all Models support all resource configuration types, the
// configuration types this Model supports are listed here. If no
// configuration types are listed, the Model cannot be deployed to an
// [Endpoint][google.cloud.aiplatform.v1beta1.Endpoint] and does not support
// online predictions ([PredictionService.Predict][google.cloud.aiplatform.v1beta1.PredictionService.Predict] or
// [PredictionService.Explain][google.cloud.aiplatform.v1beta1.PredictionService.Explain]). Such a Model can serve predictions by
// using a [BatchPredictionJob][google.cloud.aiplatform.v1beta1.BatchPredictionJob], if it has at least one entry each in
// [supported_input_storage_formats][google.cloud.aiplatform.v1beta1.Model.supported_input_storage_formats] and
// [supported_output_storage_formats][google.cloud.aiplatform.v1beta1.Model.supported_output_storage_formats].
repeated DeploymentResourcesType supported_deployment_resources_types = 10 [(google.api.field_behavior) = OUTPUT_ONLY];
// Output only. The formats this Model supports in
// [BatchPredictionJob.input_config][google.cloud.aiplatform.v1beta1.BatchPredictionJob.input_config]. If
// [PredictSchemata.instance_schema_uri][google.cloud.aiplatform.v1beta1.PredictSchemata.instance_schema_uri] exists, the instances
// should be given as per that schema.
//
// The possible formats are:
//
// * `jsonl`
// The JSON Lines format, where each instance is a single line. Uses
// [GcsSource][google.cloud.aiplatform.v1beta1.BatchPredictionJob.InputConfig.gcs_source].
//
// * `csv`
// The CSV format, where each instance is a single comma-separated line.
// The first line in the file is the header, containing comma-separated field
// names. Uses [GcsSource][google.cloud.aiplatform.v1beta1.BatchPredictionJob.InputConfig.gcs_source].
//
// * `tf-record`
// The TFRecord format, where each instance is a single record in tfrecord
// syntax. Uses [GcsSource][google.cloud.aiplatform.v1beta1.BatchPredictionJob.InputConfig.gcs_source].
//
// * `tf-record-gzip`
// Similar to `tf-record`, but the file is gzipped. Uses
// [GcsSource][google.cloud.aiplatform.v1beta1.BatchPredictionJob.InputConfig.gcs_source].
//
// * `bigquery`
// Each instance is a single row in BigQuery. Uses
// [BigQuerySource][google.cloud.aiplatform.v1beta1.BatchPredictionJob.InputConfig.bigquery_source].
//
//
//
// If this Model doesn't support any of these formats it means it cannot be
// used with a [BatchPredictionJob][google.cloud.aiplatform.v1beta1.BatchPredictionJob]. However, if it has
// [supported_deployment_resources_types][google.cloud.aiplatform.v1beta1.Model.supported_deployment_resources_types], it could serve online
// predictions by using [PredictionService.Predict][google.cloud.aiplatform.v1beta1.PredictionService.Predict] or
// [PredictionService.Explain][google.cloud.aiplatform.v1beta1.PredictionService.Explain].
repeated string supported_input_storage_formats = 11 [(google.api.field_behavior) = OUTPUT_ONLY];
// Output only. The formats this Model supports in
// [BatchPredictionJob.output_config][google.cloud.aiplatform.v1beta1.BatchPredictionJob.output_config]. If both
// [PredictSchemata.instance_schema_uri][google.cloud.aiplatform.v1beta1.PredictSchemata.instance_schema_uri] and
// [PredictSchemata.prediction_schema_uri][google.cloud.aiplatform.v1beta1.PredictSchemata.prediction_schema_uri] exist, the predictions
// are returned together with their instances. In other words, the
// prediction has the original instance data first, followed
// by the actual prediction content (as per the schema).
//
// The possible formats are:
//
// * `jsonl`
// The JSON Lines format, where each prediction is a single line. Uses
// [GcsDestination][google.cloud.aiplatform.v1beta1.BatchPredictionJob.OutputConfig.gcs_destination].
//
// * `csv`
// The CSV format, where each prediction is a single comma-separated line.
// The first line in the file is the header, containing comma-separated field
// names. Uses
// [GcsDestination][google.cloud.aiplatform.v1beta1.BatchPredictionJob.OutputConfig.gcs_destination].
//
// * `bigquery`
// Each prediction is a single row in a BigQuery table, uses
// [BigQueryDestination][google.cloud.aiplatform.v1beta1.BatchPredictionJob.OutputConfig.bigquery_destination]
// .
//
//
// If this Model doesn't support any of these formats it means it cannot be
// used with a [BatchPredictionJob][google.cloud.aiplatform.v1beta1.BatchPredictionJob]. However, if it has
// [supported_deployment_resources_types][google.cloud.aiplatform.v1beta1.Model.supported_deployment_resources_types], it could serve online
// predictions by using [PredictionService.Predict][google.cloud.aiplatform.v1beta1.PredictionService.Predict] or
// [PredictionService.Explain][google.cloud.aiplatform.v1beta1.PredictionService.Explain].
repeated string supported_output_storage_formats = 12 [(google.api.field_behavior) = OUTPUT_ONLY];
// Output only. Timestamp when this Model was uploaded into AI Platform.
google.protobuf.Timestamp create_time = 13 [(google.api.field_behavior) = OUTPUT_ONLY];
// Output only. Timestamp when this Model was most recently updated.
google.protobuf.Timestamp update_time = 14 [(google.api.field_behavior) = OUTPUT_ONLY];
// Output only. The pointers to DeployedModels created from this Model. Note that
// Model could have been deployed to Endpoints in different Locations.
repeated DeployedModelRef deployed_models = 15 [(google.api.field_behavior) = OUTPUT_ONLY];
// Output only. The default explanation specification for this Model.
//
// Model can be used for [requesting explanation][google.cloud.aiplatform.v1beta1.PredictionService.Explain]
// after being [deployed][google.cloud.aiplatform.v1beta1.EndpointService.DeployModel] iff it is populated.
//
// All fields of the explanation_spec can be overridden by
// [explanation_spec][google.cloud.aiplatform.v1beta1.DeployedModel.explanation_spec] of
// [DeployModelRequest.deployed_model][google.cloud.aiplatform.v1beta1.DeployModelRequest.deployed_model].
//
// This field is populated only for tabular AutoML Models.
// Specifying it with [ModelService.UploadModel][google.cloud.aiplatform.v1beta1.ModelService.UploadModel] is not supported.
ExplanationSpec explanation_spec = 23 [(google.api.field_behavior) = OUTPUT_ONLY];
// Used to perform consistent read-modify-write updates. If not set, a blind
// "overwrite" update happens.
string etag = 16;
// The labels with user-defined metadata to organize your Models.
//
// Label keys and values can be no longer than 64 characters
// (Unicode codepoints), can only contain lowercase letters, numeric
// characters, underscores and dashes. International characters are allowed.
//
// See https://goo.gl/xmQnxf for more information and examples of labels.
map<string, string> labels = 17;
}
// Contains the schemata used in Model's predictions and explanations via
// [PredictionService.Predict][google.cloud.aiplatform.v1beta1.PredictionService.Predict], [PredictionService.Explain][google.cloud.aiplatform.v1beta1.PredictionService.Explain] and
// [BatchPredictionJob][google.cloud.aiplatform.v1beta1.BatchPredictionJob].
message PredictSchemata {
// Immutable. Points to a YAML file stored on Google Cloud Storage describing the format
// of a single instance, which are used in [PredictRequest.instances][google.cloud.aiplatform.v1beta1.PredictRequest.instances],
// [ExplainRequest.instances][google.cloud.aiplatform.v1beta1.ExplainRequest.instances] and
// [BatchPredictionJob.input_config][google.cloud.aiplatform.v1beta1.BatchPredictionJob.input_config].
// The schema is defined as an OpenAPI 3.0.2
// [Schema Object](https://tinyurl.com/y538mdwt#schema-object).
// AutoML Models always have this field populated by AI Platform.
// Note: The URI given on output will be immutable and probably different,
// including the URI scheme, than the one given on input. The output URI will
// point to a location where the user only has a read access.
string instance_schema_uri = 1 [(google.api.field_behavior) = IMMUTABLE];
// Immutable. Points to a YAML file stored on Google Cloud Storage describing the
// parameters of prediction and explanation via
// [PredictRequest.parameters][google.cloud.aiplatform.v1beta1.PredictRequest.parameters], [ExplainRequest.parameters][google.cloud.aiplatform.v1beta1.ExplainRequest.parameters] and
// [BatchPredictionJob.model_parameters][google.cloud.aiplatform.v1beta1.BatchPredictionJob.model_parameters].
// The schema is defined as an OpenAPI 3.0.2
// [Schema Object](https://tinyurl.com/y538mdwt#schema-object).
// AutoML Models always have this field populated by AI Platform, if no
// parameters are supported it is set to an empty string.
// Note: The URI given on output will be immutable and probably different,
// including the URI scheme, than the one given on input. The output URI will
// point to a location where the user only has a read access.
string parameters_schema_uri = 2 [(google.api.field_behavior) = IMMUTABLE];
// Immutable. Points to a YAML file stored on Google Cloud Storage describing the format
// of a single prediction produced by this Model, which are returned via
// [PredictResponse.predictions][google.cloud.aiplatform.v1beta1.PredictResponse.predictions], [ExplainResponse.explanations][google.cloud.aiplatform.v1beta1.ExplainResponse.explanations], and
// [BatchPredictionJob.output_config][google.cloud.aiplatform.v1beta1.BatchPredictionJob.output_config].
// The schema is defined as an OpenAPI 3.0.2
// [Schema Object](https://tinyurl.com/y538mdwt#schema-object).
// AutoML Models always have this field populated by AI Platform.
// Note: The URI given on output will be immutable and probably different,
// including the URI scheme, than the one given on input. The output URI will
// point to a location where the user only has a read access.
string prediction_schema_uri = 3 [(google.api.field_behavior) = IMMUTABLE];
}
// Specification of the container to be deployed for this Model.
// The ModelContainerSpec is based on the Kubernetes Container
// [specification](https://tinyurl.com/k8s-io-api/v1.10/#container-v1-core).
message ModelContainerSpec {
// Required. Immutable. The URI of the Model serving container file in the Container Registry. The
// container image is ingested upon [ModelService.UploadModel][google.cloud.aiplatform.v1beta1.ModelService.UploadModel], stored
// internally, and this original path is afterwards not used.
string image_uri = 1 [
(google.api.field_behavior) = REQUIRED,
(google.api.field_behavior) = IMMUTABLE
];
// Immutable. The command with which the container is run. Not executed within a shell.
// The Docker image's ENTRYPOINT is used if this is not provided.
// Variable references $(VAR_NAME) are expanded using the container's
// environment. If a variable cannot be resolved, the reference in the input
// string will be unchanged. The $(VAR_NAME) syntax can be escaped with a
// double $$, ie: $$(VAR_NAME). Escaped references will never be expanded,
// regardless of whether the variable exists or not.
// More info: https://tinyurl.com/y42hmlxe
repeated string command = 2 [(google.api.field_behavior) = IMMUTABLE];
// Immutable. The arguments to the command.
// The Docker image's CMD is used if this is not provided.
// Variable references $(VAR_NAME) are expanded using the container's
// environment. If a variable cannot be resolved, the reference in the input
// string will be unchanged. The $(VAR_NAME) syntax can be escaped with a
// double $$, ie: $$(VAR_NAME). Escaped references will never be expanded,
// regardless of whether the variable exists or not.
// More info: https://tinyurl.com/y42hmlxe
repeated string args = 3 [(google.api.field_behavior) = IMMUTABLE];
// Immutable. The environment variables that are to be present in the container.
repeated EnvVar env = 4 [(google.api.field_behavior) = IMMUTABLE];
// Immutable. Declaration of ports that are exposed by the container. This field is
// primarily informational, it gives AI Platform information about the
// network connections the container uses. Listing or not a port
// here has no impact on whether the port is actually exposed, any port
// listening on the default "0.0.0.0" address inside a container will be
// accessible from the network.
repeated Port ports = 5 [(google.api.field_behavior) = IMMUTABLE];
// Immutable. An HTTP path to send prediction requests to the container, and which
// must be supported by it. If not specified a default HTTP path will be
// used by AI Platform.
string predict_route = 6 [(google.api.field_behavior) = IMMUTABLE];
// Immutable. An HTTP path to send health check requests to the container, and which
// must be supported by it. If not specified a standard HTTP path will be
// used by AI Platform.
string health_route = 7 [(google.api.field_behavior) = IMMUTABLE];
}
// Represents a network port in a container.
message Port {
// The number of the port to expose on the pod's IP address.
// Must be a valid port number, between 1 and 65535 inclusive.
int32 container_port = 3;
}

@ -0,0 +1,66 @@
// Copyright 2020 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/explanation.proto";
import "google/protobuf/struct.proto";
import "google/protobuf/timestamp.proto";
import "google/api/annotations.proto";
option go_package = "google.golang.org/genproto/googleapis/cloud/aiplatform/v1beta1;aiplatform";
option java_multiple_files = true;
option java_outer_classname = "ModelEvaluationProto";
option java_package = "com.google.cloud.aiplatform.v1beta1";
// A collection of metrics calculated by comparing Model's predictions on all of
// the test data against annotations from the test data.
message ModelEvaluation {
option (google.api.resource) = {
type: "aiplatform.googleapis.com/ModelEvaluation"
pattern: "projects/{project}/locations/{location}/models/{model}/evaluations/{evaluation}"
};
// Output only. The resource name of the ModelEvaluation.
string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
// Output only. Points to a YAML file stored on Google Cloud Storage describing the
// [metrics][google.cloud.aiplatform.v1beta1.ModelEvaluation.metrics] of this ModelEvaluation. The schema is
// defined as an OpenAPI 3.0.2
// [Schema Object](https://tinyurl.com/y538mdwt#schema-object).
string metrics_schema_uri = 2 [(google.api.field_behavior) = OUTPUT_ONLY];
// Output only. Evaluation metrics of the Model. The schema of the metrics is stored in
// [metrics_schema_uri][google.cloud.aiplatform.v1beta1.ModelEvaluation.metrics_schema_uri]
google.protobuf.Value metrics = 3 [(google.api.field_behavior) = OUTPUT_ONLY];
// Output only. Timestamp when this ModelEvaluation was created.
google.protobuf.Timestamp create_time = 4 [(google.api.field_behavior) = OUTPUT_ONLY];
// Output only. All possible [dimensions][ModelEvaluationSlice.slice.dimension] of
// ModelEvaluationSlices. The dimensions can be used as the filter of the
// [ModelService.ListModelEvaluationSlices][google.cloud.aiplatform.v1beta1.ModelService.ListModelEvaluationSlices] request, in the form of
// `slice.dimension = <dimension>`.
repeated string slice_dimensions = 5 [(google.api.field_behavior) = OUTPUT_ONLY];
// Output only. Aggregated explanation metrics for the Model's prediction output over the
// data this ModelEvaluation uses. This field is populated only if the Model
// is evaluated with explanations, and only for AutoML tabular Models.
//
ModelExplanation model_explanation = 8 [(google.api.field_behavior) = OUTPUT_ONLY];
}

@ -0,0 +1,69 @@
// Copyright 2020 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/protobuf/struct.proto";
import "google/protobuf/timestamp.proto";
import "google/api/annotations.proto";
option go_package = "google.golang.org/genproto/googleapis/cloud/aiplatform/v1beta1;aiplatform";
option java_multiple_files = true;
option java_outer_classname = "ModelEvaluationSliceProto";
option java_package = "com.google.cloud.aiplatform.v1beta1";
// A collection of metrics calculated by comparing Model's predictions on a
// slice of the test data against ground truth annotations.
message ModelEvaluationSlice {
option (google.api.resource) = {
type: "aiplatform.googleapis.com/ModelEvaluationSlice"
pattern: "projects/{project}/locations/{location}/models/{model}/evaluations/{evaluation}/slices/{slice}"
};
// Definition of a slice.
message Slice {
// Output only. The dimension of the slice.
// Well-known dimensions are:
// * `annotationSpec`: This slice is on the test data that has either
// ground truth or prediction with [AnnotationSpec.display_name][google.cloud.aiplatform.v1beta1.AnnotationSpec.display_name]
// equals to [value][google.cloud.aiplatform.v1beta1.ModelEvaluationSlice.Slice.value].
string dimension = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
// Output only. The value of the dimension in this slice.
string value = 2 [(google.api.field_behavior) = OUTPUT_ONLY];
}
// Output only. The resource name of the ModelEvaluationSlice.
string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
// Output only. The slice of the test data that is used to evaluate the Model.
Slice slice = 2 [(google.api.field_behavior) = OUTPUT_ONLY];
// Output only. Points to a YAML file stored on Google Cloud Storage describing the
// [metrics][google.cloud.aiplatform.v1beta1.ModelEvaluationSlice.metrics] of this ModelEvaluationSlice. The
// schema is defined as an OpenAPI 3.0.2
// [Schema Object](https://tinyurl.com/y538mdwt#schema-object).
string metrics_schema_uri = 3 [(google.api.field_behavior) = OUTPUT_ONLY];
// Output only. Sliced evaluation metrics of the Model. The schema of the metrics is stored
// in [metrics_schema_uri][google.cloud.aiplatform.v1beta1.ModelEvaluationSlice.metrics_schema_uri]
google.protobuf.Value metrics = 4 [(google.api.field_behavior) = OUTPUT_ONLY];
// Output only. Timestamp when this ModelEvaluationSlice was created.
google.protobuf.Timestamp create_time = 5 [(google.api.field_behavior) = OUTPUT_ONLY];
}

@ -0,0 +1,418 @@
// Copyright 2020 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/io.proto";
import "google/cloud/aiplatform/v1beta1/model.proto";
import "google/cloud/aiplatform/v1beta1/model_evaluation.proto";
import "google/cloud/aiplatform/v1beta1/model_evaluation_slice.proto";
import "google/cloud/aiplatform/v1beta1/operation.proto";
import "google/longrunning/operations.proto";
import "google/protobuf/field_mask.proto";
option go_package = "google.golang.org/genproto/googleapis/cloud/aiplatform/v1beta1;aiplatform";
option java_multiple_files = true;
option java_outer_classname = "ModelServiceProto";
option java_package = "com.google.cloud.aiplatform.v1beta1";
// A service for managing AI Platform's machine learning Models.
service ModelService {
option (google.api.default_host) = "aiplatform.googleapis.com";
option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform";
// Uploads a Model artifact into AI Platform.
rpc UploadModel(UploadModelRequest) returns (google.longrunning.Operation) {
option (google.api.http) = {
post: "/v1beta1/{parent=projects/*/locations/*}/models:upload"
body: "*"
};
option (google.api.method_signature) = "parent,model";
option (google.longrunning.operation_info) = {
response_type: "UploadModelResponse"
metadata_type: "UploadModelOperationMetadata"
};
}
// Gets a Model.
rpc GetModel(GetModelRequest) returns (Model) {
option (google.api.http) = {
get: "/v1beta1/{name=projects/*/locations/*/models/*}"
};
option (google.api.method_signature) = "name";
}
// Lists Models in a Location.
rpc ListModels(ListModelsRequest) returns (ListModelsResponse) {
option (google.api.http) = {
get: "/v1beta1/{parent=projects/*/locations/*}/models"
};
option (google.api.method_signature) = "parent";
}
// Updates a Model.
rpc UpdateModel(UpdateModelRequest) returns (Model) {
option (google.api.http) = {
patch: "/v1beta1/{model.name=projects/*/locations/*/models/*}"
body: "model"
};
option (google.api.method_signature) = "model,update_mask";
}
// Deletes a Model.
// Note: Model can only be deleted if there are no DeployedModels created
// from it.
rpc DeleteModel(DeleteModelRequest) returns (google.longrunning.Operation) {
option (google.api.http) = {
delete: "/v1beta1/{name=projects/*/locations/*/models/*}"
};
option (google.api.method_signature) = "name";
option (google.longrunning.operation_info) = {
response_type: "google.protobuf.Empty"
metadata_type: "DeleteOperationMetadata"
};
}
// Exports a trained, exportable, Model to a location specified by the
// user. A Model is considered to be exportable if it has at least one
// [supported export format][google.cloud.aiplatform.v1beta1.Model.supported_export_formats].
rpc ExportModel(ExportModelRequest) returns (google.longrunning.Operation) {
option (google.api.http) = {
post: "/v1beta1/{name=projects/*/locations/*/models/*}:export"
body: "*"
};
option (google.api.method_signature) = "name,output_config";
option (google.longrunning.operation_info) = {
response_type: "ExportModelResponse"
metadata_type: "ExportModelOperationMetadata"
};
}
// Gets a ModelEvaluation.
rpc GetModelEvaluation(GetModelEvaluationRequest) returns (ModelEvaluation) {
option (google.api.http) = {
get: "/v1beta1/{name=projects/*/locations/*/models/*/evaluations/*}"
};
option (google.api.method_signature) = "name";
}
// Lists ModelEvaluations in a Model.
rpc ListModelEvaluations(ListModelEvaluationsRequest) returns (ListModelEvaluationsResponse) {
option (google.api.http) = {
get: "/v1beta1/{parent=projects/*/locations/*/models/*}/evaluations"
};
option (google.api.method_signature) = "parent";
}
// Gets a ModelEvaluationSlice.
rpc GetModelEvaluationSlice(GetModelEvaluationSliceRequest) returns (ModelEvaluationSlice) {
option (google.api.http) = {
get: "/v1beta1/{name=projects/*/locations/*/models/*/evaluations/*/slices/*}"
};
option (google.api.method_signature) = "name";
}
// Lists ModelEvaluationSlices in a ModelEvaluation.
rpc ListModelEvaluationSlices(ListModelEvaluationSlicesRequest) returns (ListModelEvaluationSlicesResponse) {
option (google.api.http) = {
get: "/v1beta1/{parent=projects/*/locations/*/models/*/evaluations/*}/slices"
};
option (google.api.method_signature) = "parent";
}
}
// Request message for [ModelService.UploadModel][google.cloud.aiplatform.v1beta1.ModelService.UploadModel].
message UploadModelRequest {
// Required. The resource name of the Location into which to upload the Model.
// Format: `projects/{project}/locations/{location}`
string parent = 1 [
(google.api.field_behavior) = REQUIRED,
(google.api.resource_reference) = {
type: "locations.googleapis.com/Location"
}
];
// Required. The Model to create.
Model model = 2 [(google.api.field_behavior) = REQUIRED];
}
// Details of [ModelService.UploadModel][google.cloud.aiplatform.v1beta1.ModelService.UploadModel] operation.
message UploadModelOperationMetadata {
// The common part of the operation metadata.
GenericOperationMetadata generic_metadata = 1;
}
// Response message of [ModelService.UploadModel][google.cloud.aiplatform.v1beta1.ModelService.UploadModel] operation.
message UploadModelResponse {
// The name of the uploaded Model resource.
// Format: `projects/{project}/locations/{location}/models/{model}`
string model = 1 [(google.api.resource_reference) = {
type: "aiplatform.googleapis.com/Model"
}];
}
// Request message for [ModelService.GetModel][google.cloud.aiplatform.v1beta1.ModelService.GetModel].
message GetModelRequest {
// Required. The name of the Model resource.
// Format: `projects/{project}/locations/{location}/models/{model}`
string name = 1 [
(google.api.field_behavior) = REQUIRED,
(google.api.resource_reference) = {
type: "aiplatform.googleapis.com/Model"
}
];
}
// Request message for [ModelService.ListModels][google.cloud.aiplatform.v1beta1.ModelService.ListModels].
message ListModelsRequest {
// Required. The resource name of the Location to list the Models from.
// Format: `projects/{project}/locations/{location}`
string parent = 1 [
(google.api.field_behavior) = REQUIRED,
(google.api.resource_reference) = {
type: "locations.googleapis.com/Location"
}
];
// The standard list filter.
string filter = 2;
// The standard list page size.
int32 page_size = 3;
// The standard list page token.
// Typically obtained via
// [ListModelsResponse.next_page_token][google.cloud.aiplatform.v1beta1.ListModelsResponse.next_page_token] of the previous
// [ModelService.ListModels][google.cloud.aiplatform.v1beta1.ModelService.ListModels] call.
string page_token = 4;
// Mask specifying which fields to read.
google.protobuf.FieldMask read_mask = 5;
}
// Response message for [ModelService.ListModels][google.cloud.aiplatform.v1beta1.ModelService.ListModels]
message ListModelsResponse {
// List of Models in the requested page.
repeated Model models = 1;
// A token to retrieve next page of results.
// Pass to [ListModelsRequest.page_token][google.cloud.aiplatform.v1beta1.ListModelsRequest.page_token] to obtain that page.
string next_page_token = 2;
}
// Request message for [ModelService.UpdateModel][google.cloud.aiplatform.v1beta1.ModelService.UpdateModel].
message UpdateModelRequest {
// Required. The Model which replaces the resource on the server.
Model model = 1 [(google.api.field_behavior) = REQUIRED];
// Required. The update mask applies to the resource.
// For the `FieldMask` definition, see
//
// [FieldMask](https:
// //developers.google.com/protocol-buffers
// // /docs/reference/google.protobuf#fieldmask).
google.protobuf.FieldMask update_mask = 2 [(google.api.field_behavior) = REQUIRED];
}
// Request message for [ModelService.DeleteModel][google.cloud.aiplatform.v1beta1.ModelService.DeleteModel].
message DeleteModelRequest {
// Required. The name of the Model resource to be deleted.
// Format: `projects/{project}/locations/{location}/models/{model}`
string name = 1 [
(google.api.field_behavior) = REQUIRED,
(google.api.resource_reference) = {
type: "aiplatform.googleapis.com/Model"
}
];
}
// Request message for [ModelService.ExportModel][google.cloud.aiplatform.v1beta1.ModelService.ExportModel].
message ExportModelRequest {
// Output configuration for the Model export.
message OutputConfig {
// The ID of the format in which the Model must be exported. Each Model
// lists the [export formats it supports][google.cloud.aiplatform.v1beta1.Model.supported_export_formats].
// If no value is provided here, then the first from the list of the Model's
// supported formats is used by default.
string export_format_id = 1;
// The Google Cloud Storage location where the Model artifact is to be
// written to. Under the directory given as the destination a new one with
// name "`model-export-<model-display-name>-<timestamp-of-export-call>`",
// where timestamp is in YYYY-MM-DDThh:mm:ss.sssZ ISO-8601 format,
// will be created. Inside, the Model and any of its supporting files
// will be written.
// This field should only be set when
// [Models.supported_export_formats.exportable_contents] contains ARTIFACT.
GcsDestination artifact_destination = 3;
// The Google Container Registry or Artifact Registry uri where the
// Model container image will be copied to.
// This field should only be set when
// [Models.supported_export_formats.exportable_contents] contains IMAGE.
ContainerRegistryDestination image_destination = 4;
}
// Required. The resource name of the Model to export.
// Format: `projects/{project}/locations/{location}/models/{model}`
string name = 1 [
(google.api.field_behavior) = REQUIRED,
(google.api.resource_reference) = {
type: "aiplatform.googleapis.com/Model"
}
];
// Required. The desired output location and configuration.
OutputConfig output_config = 2 [(google.api.field_behavior) = REQUIRED];
}
// Details of [ModelService.ExportModel][google.cloud.aiplatform.v1beta1.ModelService.ExportModel] operation.
message ExportModelOperationMetadata {
// Further describes the output of the ExportModel. Supplements
// [ExportModelRequest.OutputConfig][google.cloud.aiplatform.v1beta1.ExportModelRequest.OutputConfig].
message OutputInfo {
// Output only. If the Model artifact is being exported to Google Cloud Storage this is
// the full path of the directory created, into which the Model files are
// being written to.
string artifact_output_uri = 2 [(google.api.field_behavior) = OUTPUT_ONLY];
// Output only. If the Model image is being exported to Google Container Registry or
// Artifact Registry this is the full path of the image created.
string image_output_uri = 3 [(google.api.field_behavior) = OUTPUT_ONLY];
}
// The common part of the operation metadata.
GenericOperationMetadata generic_metadata = 1;
// Output only. Information further describing the output of this Model export.
OutputInfo output_info = 2 [(google.api.field_behavior) = OUTPUT_ONLY];
}
// Response message of [ModelService.ExportModel][google.cloud.aiplatform.v1beta1.ModelService.ExportModel] operation.
message ExportModelResponse {
}
// Request message for [ModelService.GetModelEvaluation][google.cloud.aiplatform.v1beta1.ModelService.GetModelEvaluation].
message GetModelEvaluationRequest {
// Required. The name of the ModelEvaluation resource.
// Format:
//
// `projects/{project}/locations/{location}/models/{model}/evaluations/{evaluation}`
string name = 1 [
(google.api.field_behavior) = REQUIRED,
(google.api.resource_reference) = {
type: "aiplatform.googleapis.com/ModelEvaluation"
}
];
}
// Request message for [ModelService.ListModelEvaluations][google.cloud.aiplatform.v1beta1.ModelService.ListModelEvaluations].
message ListModelEvaluationsRequest {
// Required. The resource name of the Model to list the ModelEvaluations from.
// Format: `projects/{project}/locations/{location}/models/{model}`
string parent = 1 [
(google.api.field_behavior) = REQUIRED,
(google.api.resource_reference) = {
type: "aiplatform.googleapis.com/Model"
}
];
// The standard list filter.
string filter = 2;
// The standard list page size.
int32 page_size = 3;
// The standard list page token.
// Typically obtained via
// [ListModelEvaluationsResponse.next_page_token][google.cloud.aiplatform.v1beta1.ListModelEvaluationsResponse.next_page_token] of the previous
// [ModelService.ListModelEvaluations][google.cloud.aiplatform.v1beta1.ModelService.ListModelEvaluations] call.
string page_token = 4;
// Mask specifying which fields to read.
google.protobuf.FieldMask read_mask = 5;
}
// Response message for [ModelService.ListModelEvaluations][google.cloud.aiplatform.v1beta1.ModelService.ListModelEvaluations].
message ListModelEvaluationsResponse {
// List of ModelEvaluations in the requested page.
repeated ModelEvaluation model_evaluations = 1;
// A token to retrieve next page of results.
// Pass to [ListModelEvaluationsRequest.page_token][google.cloud.aiplatform.v1beta1.ListModelEvaluationsRequest.page_token] to obtain that page.
string next_page_token = 2;
}
// Request message for [ModelService.GetModelEvaluationSlice][google.cloud.aiplatform.v1beta1.ModelService.GetModelEvaluationSlice].
message GetModelEvaluationSliceRequest {
// Required. The name of the ModelEvaluationSlice resource.
// Format:
//
// `projects/{project}/locations/{location}/models/{model}/evaluations/{evaluation}/slices/{slice}`
string name = 1 [
(google.api.field_behavior) = REQUIRED,
(google.api.resource_reference) = {
type: "aiplatform.googleapis.com/ModelEvaluationSlice"
}
];
}
// Request message for [ModelService.ListModelEvaluationSlices][google.cloud.aiplatform.v1beta1.ModelService.ListModelEvaluationSlices].
message ListModelEvaluationSlicesRequest {
// Required. The resource name of the ModelEvaluation to list the ModelEvaluationSlices
// from. Format:
//
// `projects/{project}/locations/{location}/models/{model}/evaluations/{evaluation}`
string parent = 1 [
(google.api.field_behavior) = REQUIRED,
(google.api.resource_reference) = {
type: "aiplatform.googleapis.com/ModelEvaluation"
}
];
// The standard list filter.
//
// * `slice.dimension` - for =.
string filter = 2;
// The standard list page size.
int32 page_size = 3;
// The standard list page token.
// Typically obtained via
// [ListModelEvaluationSlicesResponse.next_page_token][google.cloud.aiplatform.v1beta1.ListModelEvaluationSlicesResponse.next_page_token] of the previous
// [ModelService.ListModelEvaluationSlices][google.cloud.aiplatform.v1beta1.ModelService.ListModelEvaluationSlices] call.
string page_token = 4;
// Mask specifying which fields to read.
google.protobuf.FieldMask read_mask = 5;
}
// Response message for [ModelService.ListModelEvaluationSlices][google.cloud.aiplatform.v1beta1.ModelService.ListModelEvaluationSlices].
message ListModelEvaluationSlicesResponse {
// List of ModelEvaluations in the requested page.
repeated ModelEvaluationSlice model_evaluation_slices = 1;
// A token to retrieve next page of results.
// Pass to [ListModelEvaluationSlicesRequest.page_token][google.cloud.aiplatform.v1beta1.ListModelEvaluationSlicesRequest.page_token] to obtain that
// page.
string next_page_token = 2;
}

@ -0,0 +1,48 @@
// Copyright 2020 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/protobuf/timestamp.proto";
import "google/rpc/status.proto";
import "google/api/annotations.proto";
option go_package = "google.golang.org/genproto/googleapis/cloud/aiplatform/v1beta1;aiplatform";
option java_multiple_files = true;
option java_outer_classname = "OperationProto";
option java_package = "com.google.cloud.aiplatform.v1beta1";
// Generic Metadata shared by all operations.
message GenericOperationMetadata {
// Output only. Partial failures encountered.
// E.g. single files that couldn't be read.
// This field should never exceed 20 entries.
// Status details field will contain standard GCP error details.
repeated google.rpc.Status partial_failures = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
// Output only. Time when the operation was created.
google.protobuf.Timestamp create_time = 2 [(google.api.field_behavior) = OUTPUT_ONLY];
// Output only. Time when the operation was updated for the last time.
google.protobuf.Timestamp update_time = 3 [(google.api.field_behavior) = OUTPUT_ONLY];
}
// Details of operations that perform deletes of any entities.
message DeleteOperationMetadata {
// The common part of the operation metadata.
GenericOperationMetadata generic_metadata = 1;
}

@ -0,0 +1,202 @@
// Copyright 2020 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/training_pipeline.proto";
import "google/longrunning/operations.proto";
import "google/protobuf/empty.proto";
import "google/protobuf/field_mask.proto";
option go_package = "google.golang.org/genproto/googleapis/cloud/aiplatform/v1beta1;aiplatform";
option java_multiple_files = true;
option java_outer_classname = "PipelineServiceProto";
option java_package = "com.google.cloud.aiplatform.v1beta1";
// A service for creating and managing AI Platform's pipelines.
service PipelineService {
option (google.api.default_host) = "aiplatform.googleapis.com";
option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform";
// Creates a TrainingPipeline. A created TrainingPipeline right away will be
// attempted to be run.
rpc CreateTrainingPipeline(CreateTrainingPipelineRequest) returns (TrainingPipeline) {
option (google.api.http) = {
post: "/v1beta1/{parent=projects/*/locations/*}/trainingPipelines"
body: "training_pipeline"
};
option (google.api.method_signature) = "parent,training_pipeline";
}
// Gets a TrainingPipeline.
rpc GetTrainingPipeline(GetTrainingPipelineRequest) returns (TrainingPipeline) {
option (google.api.http) = {
get: "/v1beta1/{name=projects/*/locations/*/trainingPipelines/*}"
};
option (google.api.method_signature) = "name";
}
// Lists TrainingPipelines in a Location.
rpc ListTrainingPipelines(ListTrainingPipelinesRequest) returns (ListTrainingPipelinesResponse) {
option (google.api.http) = {
get: "/v1beta1/{parent=projects/*/locations/*}/trainingPipelines"
};
option (google.api.method_signature) = "parent";
}
// Deletes a TrainingPipeline.
rpc DeleteTrainingPipeline(DeleteTrainingPipelineRequest) returns (google.longrunning.Operation) {
option (google.api.http) = {
delete: "/v1beta1/{name=projects/*/locations/*/trainingPipelines/*}"
};
option (google.api.method_signature) = "name";
option (google.longrunning.operation_info) = {
response_type: "google.protobuf.Empty"
metadata_type: "DeleteOperationMetadata"
};
}
// Cancels a TrainingPipeline.
// Starts asynchronous cancellation on the TrainingPipeline. The server
// makes a best effort to cancel the pipeline, but success is not
// guaranteed. Clients can use [PipelineService.GetTrainingPipeline][google.cloud.aiplatform.v1beta1.PipelineService.GetTrainingPipeline] or
// other methods to check whether the cancellation succeeded or whether the
// pipeline completed despite cancellation. On successful cancellation,
// the TrainingPipeline is not deleted; instead it becomes a pipeline with
// a [TrainingPipeline.error][google.cloud.aiplatform.v1beta1.TrainingPipeline.error] value with a [google.rpc.Status.code][google.rpc.Status.code] of 1,
// corresponding to `Code.CANCELLED`, and [TrainingPipeline.state][google.cloud.aiplatform.v1beta1.TrainingPipeline.state] is set to
// `CANCELLED`.
rpc CancelTrainingPipeline(CancelTrainingPipelineRequest) returns (google.protobuf.Empty) {
option (google.api.http) = {
post: "/v1beta1/{name=projects/*/locations/*/trainingPipelines/*}:cancel"
body: "*"
};
option (google.api.method_signature) = "name";
}
}
// Request message for [PipelineService.CreateTrainingPipeline][google.cloud.aiplatform.v1beta1.PipelineService.CreateTrainingPipeline].
message CreateTrainingPipelineRequest {
// Required. The resource name of the Location to create the TrainingPipeline in.
// Format: `projects/{project}/locations/{location}`
string parent = 1 [
(google.api.field_behavior) = REQUIRED,
(google.api.resource_reference) = {
type: "locations.googleapis.com/Location"
}
];
// Required. The TrainingPipeline to create.
TrainingPipeline training_pipeline = 2 [(google.api.field_behavior) = REQUIRED];
}
// Request message for [PipelineService.GetTrainingPipeline][google.cloud.aiplatform.v1beta1.PipelineService.GetTrainingPipeline].
message GetTrainingPipelineRequest {
// Required. The name of the TrainingPipeline resource.
// Format:
//
// `projects/{project}/locations/{location}/trainingPipelines/{training_pipeline}`
string name = 1 [
(google.api.field_behavior) = REQUIRED,
(google.api.resource_reference) = {
type: "aiplatform.googleapis.com/TrainingPipeline"
}
];
}
// Request message for [PipelineService.ListTrainingPipelines][google.cloud.aiplatform.v1beta1.PipelineService.ListTrainingPipelines].
message ListTrainingPipelinesRequest {
// Required. The resource name of the Location to list the TrainingPipelines from.
// Format: `projects/{project}/locations/{location}`
string parent = 1 [
(google.api.field_behavior) = REQUIRED,
(google.api.resource_reference) = {
type: "locations.googleapis.com/Location"
}
];
// The standard list filter.
// Supported fields:
//
// * `display_name` supports = and !=.
//
// * `state` supports = and !=.
//
// Some examples of using the filter are:
//
// * `state="PIPELINE_STATE_SUCCEEDED" AND display_name="my_pipeline"`
//
// * `state="PIPELINE_STATE_RUNNING" OR display_name="my_pipeline"`
//
// * `NOT display_name="my_pipeline"`
//
// * `state="PIPELINE_STATE_FAILED"`
string filter = 2;
// The standard list page size.
int32 page_size = 3;
// The standard list page token.
// Typically obtained via
// [ListTrainingPipelinesResponse.next_page_token][google.cloud.aiplatform.v1beta1.ListTrainingPipelinesResponse.next_page_token] of the previous
// [PipelineService.ListTrainingPipelines][google.cloud.aiplatform.v1beta1.PipelineService.ListTrainingPipelines] call.
string page_token = 4;
// Mask specifying which fields to read.
google.protobuf.FieldMask read_mask = 5;
}
// Response message for [PipelineService.ListTrainingPipelines][google.cloud.aiplatform.v1beta1.PipelineService.ListTrainingPipelines]
message ListTrainingPipelinesResponse {
// List of TrainingPipelines in the requested page.
repeated TrainingPipeline training_pipelines = 1;
// A token to retrieve next page of results.
// Pass to [ListTrainingPipelinesRequest.page_token][google.cloud.aiplatform.v1beta1.ListTrainingPipelinesRequest.page_token] to obtain that page.
string next_page_token = 2;
}
// Request message for [PipelineService.DeleteTrainingPipeline][google.cloud.aiplatform.v1beta1.PipelineService.DeleteTrainingPipeline].
message DeleteTrainingPipelineRequest {
// Required. The name of the TrainingPipeline resource to be deleted.
// Format:
//
// `projects/{project}/locations/{location}/trainingPipelines/{training_pipeline}`
string name = 1 [
(google.api.field_behavior) = REQUIRED,
(google.api.resource_reference) = {
type: "aiplatform.googleapis.com/TrainingPipeline"
}
];
}
// Request message for [PipelineService.CancelTrainingPipeline][google.cloud.aiplatform.v1beta1.PipelineService.CancelTrainingPipeline].
message CancelTrainingPipelineRequest {
// Required. The name of the TrainingPipeline to cancel.
// Format:
//
// `projects/{project}/locations/{location}/trainingPipelines/{training_pipeline}`
string name = 1 [
(google.api.field_behavior) = REQUIRED,
(google.api.resource_reference) = {
type: "aiplatform.googleapis.com/TrainingPipeline"
}
];
}

@ -0,0 +1,57 @@
// Copyright 2020 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";
option go_package = "google.golang.org/genproto/googleapis/cloud/aiplatform/v1beta1;aiplatform";
option java_multiple_files = true;
option java_outer_classname = "PipelineStateProto";
option java_package = "com.google.cloud.aiplatform.v1beta1";
// Describes the state of a pipeline.
enum PipelineState {
// The pipeline state is unspecified.
PIPELINE_STATE_UNSPECIFIED = 0;
// The pipeline has been just created or resumed and processing has not yet
// begun.
PIPELINE_STATE_QUEUED = 1;
// The service is preparing to run the pipeline.
PIPELINE_STATE_PENDING = 2;
// The pipeline is in progress.
PIPELINE_STATE_RUNNING = 3;
// The pipeline completed successfully.
PIPELINE_STATE_SUCCEEDED = 4;
// The pipeline failed.
PIPELINE_STATE_FAILED = 5;
// The pipeline is being cancelled. From this state the pipeline may only go
// to either PIPELINE_STATE_SUCCEEDED, PIPELINE_STATE_FAILED or
// PIPELINE_STATE_CANCELLED.
PIPELINE_STATE_CANCELLING = 6;
// The pipeline has been cancelled.
PIPELINE_STATE_CANCELLED = 7;
// The pipeline has been stopped, and can be resumed.
PIPELINE_STATE_PAUSED = 8;
}

@ -0,0 +1,150 @@
// Copyright 2020 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/explanation.proto";
import "google/protobuf/struct.proto";
option go_package = "google.golang.org/genproto/googleapis/cloud/aiplatform/v1beta1;aiplatform";
option java_multiple_files = true;
option java_outer_classname = "PredictionServiceProto";
option java_package = "com.google.cloud.aiplatform.v1beta1";
// A service for online predictions and explanations.
service PredictionService {
option (google.api.default_host) = "aiplatform.googleapis.com";
option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform";
// Perform an online prediction.
rpc Predict(PredictRequest) returns (PredictResponse) {
option (google.api.http) = {
post: "/v1beta1/{endpoint=projects/*/locations/*/endpoints/*}:predict"
body: "*"
};
option (google.api.method_signature) = "endpoint,instances,parameters";
}
// Perform an online explanation.
//
// If [ExplainRequest.deployed_model_id] is specified, the corresponding
// DeployModel must have [explanation_spec][google.cloud.aiplatform.v1beta1.DeployedModel.explanation_spec]
// populated. If [ExplainRequest.deployed_model_id] is not specified, all
// DeployedModels must have [explanation_spec][google.cloud.aiplatform.v1beta1.DeployedModel.explanation_spec]
// populated. Only deployed AutoML tabular Models have
// explanation_spec.
rpc Explain(ExplainRequest) returns (ExplainResponse) {
option (google.api.http) = {
post: "/v1beta1/{endpoint=projects/*/locations/*/endpoints/*}:explain"
body: "*"
};
option (google.api.method_signature) = "endpoint,instances,parameters,deployed_model_id";
}
}
// Request message for [PredictionService.Predict][google.cloud.aiplatform.v1beta1.PredictionService.Predict].
message PredictRequest {
// Required. The name of the Endpoint requested to serve the prediction.
// Format:
// `projects/{project}/locations/{location}/endpoints/{endpoint}`
string endpoint = 1 [
(google.api.field_behavior) = REQUIRED,
(google.api.resource_reference) = {
type: "aiplatform.googleapis.com/Endpoint"
}
];
// Required. The instances that are the input to the prediction call.
// A DeployedModel may have an upper limit on the number of instances it
// supports per request, and when it is exceeded the prediction call errors
// in case of AutoML Models, or, in case of customer created Models, the
// behaviour is as documented by that Model.
// The schema of any single instance may be specified via Endpoint's
// DeployedModels' [Model's][google.cloud.aiplatform.v1beta1.DeployedModel.model]
// [PredictSchemata's][google.cloud.aiplatform.v1beta1.Model.predict_schemata]
// [instance_schema_uri][google.cloud.aiplatform.v1beta1.PredictSchemata.instance_schema_uri].
repeated google.protobuf.Value instances = 2 [(google.api.field_behavior) = REQUIRED];
// The parameters that govern the prediction. The schema of the parameters may
// be specified via Endpoint's DeployedModels' [Model's ][google.cloud.aiplatform.v1beta1.DeployedModel.model]
// [PredictSchemata's][google.cloud.aiplatform.v1beta1.Model.predict_schemata]
// [parameters_schema_uri][google.cloud.aiplatform.v1beta1.PredictSchemata.parameters_schema_uri].
google.protobuf.Value parameters = 3;
}
// Response message for [PredictionService.Predict][google.cloud.aiplatform.v1beta1.PredictionService.Predict].
message PredictResponse {
// The predictions that are the output of the predictions call.
// The schema of any single prediction may be specified via Endpoint's
// DeployedModels' [Model's ][google.cloud.aiplatform.v1beta1.DeployedModel.model]
// [PredictSchemata's][google.cloud.aiplatform.v1beta1.Model.predict_schemata]
// [prediction_schema_uri][google.cloud.aiplatform.v1beta1.PredictSchemata.prediction_schema_uri].
repeated google.protobuf.Value predictions = 1;
// ID of the Endpoint's DeployedModel that served this prediction.
string deployed_model_id = 2;
}
// Request message for [PredictionService.Explain][google.cloud.aiplatform.v1beta1.PredictionService.Explain].
message ExplainRequest {
// Required. The name of the Endpoint requested to serve the explanation.
// Format:
// `projects/{project}/locations/{location}/endpoints/{endpoint}`
string endpoint = 1 [
(google.api.field_behavior) = REQUIRED,
(google.api.resource_reference) = {
type: "aiplatform.googleapis.com/Endpoint"
}
];
// Required. The instances that are the input to the explanation call.
// A DeployedModel may have an upper limit on the number of instances it
// supports per request, and when it is exceeded the explanation call errors
// in case of AutoML Models, or, in case of customer created Models, the
// behaviour is as documented by that Model.
// The schema of any single instance may be specified via Endpoint's
// DeployedModels' [Model's][google.cloud.aiplatform.v1beta1.DeployedModel.model]
// [PredictSchemata's][google.cloud.aiplatform.v1beta1.Model.predict_schemata]
// [instance_schema_uri][google.cloud.aiplatform.v1beta1.PredictSchemata.instance_schema_uri].
repeated google.protobuf.Value instances = 2 [(google.api.field_behavior) = REQUIRED];
// The parameters that govern the prediction. The schema of the parameters may
// be specified via Endpoint's DeployedModels' [Model's ][google.cloud.aiplatform.v1beta1.DeployedModel.model]
// [PredictSchemata's][google.cloud.aiplatform.v1beta1.Model.predict_schemata]
// [parameters_schema_uri][google.cloud.aiplatform.v1beta1.PredictSchemata.parameters_schema_uri].
google.protobuf.Value parameters = 4;
// If specified, this ExplainRequest will be served by the chosen
// DeployedModel, overriding [Endpoint.traffic_split][google.cloud.aiplatform.v1beta1.Endpoint.traffic_split].
string deployed_model_id = 3;
}
// Response message for [PredictionService.Explain][google.cloud.aiplatform.v1beta1.PredictionService.Explain].
message ExplainResponse {
// The explanations of the [Model's
// predictions][PredictionResponse.predictions][].
//
// It has the same number of elements as [instances][google.cloud.aiplatform.v1beta1.ExplainRequest.instances]
// to be explained.
repeated Explanation explanations = 1;
// ID of the Endpoint's DeployedModel that served this explanation.
string deployed_model_id = 2;
}

@ -0,0 +1,57 @@
// Copyright 2020 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/api/annotations.proto";
option go_package = "google.golang.org/genproto/googleapis/cloud/aiplatform/v1beta1;aiplatform";
option java_multiple_files = true;
option java_outer_classname = "SpecialistPoolProto";
option java_package = "com.google.cloud.aiplatform.v1beta1";
// SpecialistPool represents customers' own workforce to work on their data
// labeling jobs. It includes a group of specialist managers who are responsible
// for managing the labelers in this pool as well as customers' data labeling
// jobs associated with this pool.
// Customers create specialist pool as well as start data labeling jobs on
// Cloud, managers and labelers work with the jobs using CrowdCompute console.
message SpecialistPool {
option (google.api.resource) = {
type: "aiplatform.googleapis.com/SpecialistPool"
pattern: "projects/{project}/locations/{location}/specialistPools/{specialist_pool}"
};
// Required. The resource name of the SpecialistPool.
string name = 1 [(google.api.field_behavior) = REQUIRED];
// Required. The user-defined name of the SpecialistPool.
// The name can be up to 128 characters long and can be consist of any UTF-8
// characters.
// This field should be unique on project-level.
string display_name = 2 [(google.api.field_behavior) = REQUIRED];
// Output only. The number of Specialists in this SpecialistPool.
int32 specialist_managers_count = 3 [(google.api.field_behavior) = OUTPUT_ONLY];
// The email addresses of the specialists in the SpecialistPool.
repeated string specialist_manager_emails = 4;
// Output only. The resource name of the pending data labeling jobs.
repeated string pending_data_labeling_jobs = 5 [(google.api.field_behavior) = OUTPUT_ONLY];
}

@ -0,0 +1,209 @@
// Copyright 2020 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/operation.proto";
import "google/cloud/aiplatform/v1beta1/specialist_pool.proto";
import "google/longrunning/operations.proto";
import "google/protobuf/field_mask.proto";
option go_package = "google.golang.org/genproto/googleapis/cloud/aiplatform/v1beta1;aiplatform";
option java_multiple_files = true;
option java_outer_classname = "SpecialistPoolServiceProto";
option java_package = "com.google.cloud.aiplatform.v1beta1";
// A service for creating and managing Customer SpecialistPools.
// When customers start Data Labeling jobs, they can reuse/create Specialist
// Pools to bring their own Specialists to label the data.
// Customers can add/remove Managers for the Specialist Pool on Cloud console,
// then Managers will get email notifications to manage Specialists and tasks on
// CrowdCompute console.
service SpecialistPoolService {
option (google.api.default_host) = "aiplatform.googleapis.com";
option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform";
// Creates a SpecialistPool.
rpc CreateSpecialistPool(CreateSpecialistPoolRequest) returns (google.longrunning.Operation) {
option (google.api.http) = {
post: "/v1beta1/{parent=projects/*/locations/*}/specialistPools"
body: "specialist_pool"
};
option (google.api.method_signature) = "parent,specialist_pool";
option (google.longrunning.operation_info) = {
response_type: "SpecialistPool"
metadata_type: "CreateSpecialistPoolOperationMetadata"
};
}
// Gets a SpecialistPool.
rpc GetSpecialistPool(GetSpecialistPoolRequest) returns (SpecialistPool) {
option (google.api.http) = {
get: "/v1beta1/{name=projects/*/locations/*/specialistPools/*}"
};
option (google.api.method_signature) = "name";
}
// Lists SpecialistPools in a Location.
rpc ListSpecialistPools(ListSpecialistPoolsRequest) returns (ListSpecialistPoolsResponse) {
option (google.api.http) = {
get: "/v1beta1/{parent=projects/*/locations/*}/specialistPools"
};
option (google.api.method_signature) = "parent";
}
// Deletes a SpecialistPool as well as all Specialists in the pool.
rpc DeleteSpecialistPool(DeleteSpecialistPoolRequest) returns (google.longrunning.Operation) {
option (google.api.http) = {
delete: "/v1beta1/{name=projects/*/locations/*/specialistPools/*}"
};
option (google.api.method_signature) = "name";
option (google.longrunning.operation_info) = {
response_type: "google.protobuf.Empty"
metadata_type: "DeleteOperationMetadata"
};
}
// Updates a SpecialistPool.
rpc UpdateSpecialistPool(UpdateSpecialistPoolRequest) returns (google.longrunning.Operation) {
option (google.api.http) = {
patch: "/v1beta1/{specialist_pool.name=projects/*/locations/*/specialistPools/*}"
body: "specialist_pool"
};
option (google.api.method_signature) = "specialist_pool,update_mask";
option (google.longrunning.operation_info) = {
response_type: "SpecialistPool"
metadata_type: "UpdateSpecialistPoolOperationMetadata"
};
}
}
// Request message for [SpecialistPoolService.CreateSpecialistPool][google.cloud.aiplatform.v1beta1.SpecialistPoolService.CreateSpecialistPool].
message CreateSpecialistPoolRequest {
// Required. The parent Project name for the new SpecialistPool.
// The form is `projects/{project}/locations/{location}`.
string parent = 1 [
(google.api.field_behavior) = REQUIRED,
(google.api.resource_reference) = {
type: "locations.googleapis.com/Location"
}
];
// Required. The SpecialistPool to create.
SpecialistPool specialist_pool = 2 [(google.api.field_behavior) = REQUIRED];
}
// Runtime operation information for
// [SpecialistPoolService.CreateSpecialistPool][google.cloud.aiplatform.v1beta1.SpecialistPoolService.CreateSpecialistPool].
message CreateSpecialistPoolOperationMetadata {
// The operation generic information.
GenericOperationMetadata generic_metadata = 1;
}
// Request message for [SpecialistPoolService.GetSpecialistPool][google.cloud.aiplatform.v1beta1.SpecialistPoolService.GetSpecialistPool].
message GetSpecialistPoolRequest {
// Required. The name of the SpecialistPool resource.
// The form is
//
// `projects/{project}/locations/{location}/specialistPools/{specialist_pool}`.
string name = 1 [
(google.api.field_behavior) = REQUIRED,
(google.api.resource_reference) = {
type: "aiplatform.googleapis.com/SpecialistPool"
}
];
}
// Request message for [SpecialistPoolService.ListSpecialistPools][google.cloud.aiplatform.v1beta1.SpecialistPoolService.ListSpecialistPools].
message ListSpecialistPoolsRequest {
// Required. The name of the SpecialistPool's parent resource.
// Format: `projects/{project}/locations/{location}`
string parent = 1 [
(google.api.field_behavior) = REQUIRED,
(google.api.resource_reference) = {
type: "locations.googleapis.com/Location"
}
];
// The standard list page size.
int32 page_size = 2;
// The standard list page token.
// Typically obtained by [ListSpecialistPoolsResponse.next_page_token][google.cloud.aiplatform.v1beta1.ListSpecialistPoolsResponse.next_page_token] of
// the previous [SpecialistPoolService.ListSpecialistPools][google.cloud.aiplatform.v1beta1.SpecialistPoolService.ListSpecialistPools] call. Return
// first page if empty.
string page_token = 3;
// Mask specifying which fields to read. FieldMask represents a set of
google.protobuf.FieldMask read_mask = 4;
}
// Response message for [SpecialistPoolService.ListSpecialistPools][google.cloud.aiplatform.v1beta1.SpecialistPoolService.ListSpecialistPools].
message ListSpecialistPoolsResponse {
// A list of SpecialistPools that matches the specified filter in the request.
repeated SpecialistPool specialist_pools = 1;
// The standard List next-page token.
string next_page_token = 2;
}
// Request message for [SpecialistPoolService.DeleteSpecialistPool][google.cloud.aiplatform.v1beta1.SpecialistPoolService.DeleteSpecialistPool].
message DeleteSpecialistPoolRequest {
// Required. The resource name of the SpecialistPool to delete. Format:
// `projects/{project}/locations/{location}/specialistPools/{specialist_pool}`
string name = 1 [
(google.api.field_behavior) = REQUIRED,
(google.api.resource_reference) = {
type: "aiplatform.googleapis.com/SpecialistPool"
}
];
// If set to true, any specialist managers in this SpecialistPool will also be
// deleted. (Otherwise, the request will only work if the SpecialistPool has
// no specialist managers.)
bool force = 2;
}
// Request message for [SpecialistPoolService.UpdateSpecialistPool][google.cloud.aiplatform.v1beta1.SpecialistPoolService.UpdateSpecialistPool].
message UpdateSpecialistPoolRequest {
// Required. The SpecialistPool which replaces the resource on the server.
SpecialistPool specialist_pool = 1 [(google.api.field_behavior) = REQUIRED];
// Required. The update mask applies to the resource.
google.protobuf.FieldMask update_mask = 2 [(google.api.field_behavior) = REQUIRED];
}
// Runtime operation metadata for
// [SpecialistPoolService.UpdateSpecialistPool][google.cloud.aiplatform.v1beta1.SpecialistPoolService.UpdateSpecialistPool].
message UpdateSpecialistPoolOperationMetadata {
// Output only. The name of the SpecialistPool to which the specialists are being added.
// Format:
//
// `projects/{project_id}/locations/{location_id}/specialistPools/{specialist_pool}`
string specialist_pool = 1 [
(google.api.field_behavior) = OUTPUT_ONLY,
(google.api.resource_reference) = {
type: "aiplatform.googleapis.com/SpecialistPool"
}
];
// The operation generic information.
GenericOperationMetadata generic_metadata = 2;
}

@ -0,0 +1,246 @@
// Copyright 2020 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/protobuf/duration.proto";
import "google/protobuf/struct.proto";
import "google/protobuf/timestamp.proto";
import "google/api/annotations.proto";
option go_package = "google.golang.org/genproto/googleapis/cloud/aiplatform/v1beta1;aiplatform";
option java_multiple_files = true;
option java_outer_classname = "StudyProto";
option java_package = "com.google.cloud.aiplatform.v1beta1";
// A message representing a Trial. A Trial contains a unique set of Parameters
// that has been or will be evaluated, along with the objective metrics got by
// running the Trial.
message Trial {
// A message representing a parameter to be tuned.
message Parameter {
// Output only. The ID of the parameter. The parameter should be defined in
// [StudySpec's Parameters][google.cloud.aiplatform.v1beta1.StudySpec.parameters].
string parameter_id = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
// Output only. The value of the parameter.
// `number_value` will be set if a parameter defined in StudySpec is
// in type 'INTEGER', 'DOUBLE' or 'DISCRETE'.
// `string_value` will be set if a parameter defined in StudySpec is
// in type 'CATEGORICAL'.
google.protobuf.Value value = 2 [(google.api.field_behavior) = OUTPUT_ONLY];
}
// Describes a Trial state.
enum State {
// The Trial state is unspecified.
STATE_UNSPECIFIED = 0;
// Indicates that a specific Trial has been requested, but it has not yet
// been suggested by the service.
REQUESTED = 1;
// Indicates that the Trial has been suggested.
ACTIVE = 2;
// Indicates that the Trial should stop according to the service.
STOPPING = 3;
// Indicates that the Trial is completed successfully.
SUCCEEDED = 4;
// Indicates that the Trial should not be attempted again.
// The service will set a Trial to INFEASIBLE when it's done but missing
// the final_measurement.
INFEASIBLE = 5;
}
// Output only. The identifier of the Trial assigned by the service.
string id = 2 [(google.api.field_behavior) = OUTPUT_ONLY];
// Output only. The detailed state of the Trial.
State state = 3 [(google.api.field_behavior) = OUTPUT_ONLY];
// Output only. The parameters of the Trial.
repeated Parameter parameters = 4 [(google.api.field_behavior) = OUTPUT_ONLY];
// Output only. The final measurement containing the objective value.
Measurement final_measurement = 5 [(google.api.field_behavior) = OUTPUT_ONLY];
// Output only. Time when the Trial was started.
google.protobuf.Timestamp start_time = 7 [(google.api.field_behavior) = OUTPUT_ONLY];
// Output only. Time when the Trial's status changed to `SUCCEEDED` or `INFEASIBLE`.
google.protobuf.Timestamp end_time = 8 [(google.api.field_behavior) = OUTPUT_ONLY];
// Output only. The CustomJob name linked to the Trial.
// It's set for a HyperparameterTuningJob's Trial.
string custom_job = 11 [
(google.api.field_behavior) = OUTPUT_ONLY,
(google.api.resource_reference) = {
type: "aiplatform.googleapis.com/CustomJob"
}
];
}
// Represents specification of a Study.
message StudySpec {
// Represents a metric to optimize.
message MetricSpec {
// The available types of optimization goals.
enum GoalType {
// Goal Type will default to maximize.
GOAL_TYPE_UNSPECIFIED = 0;
// Maximize the goal metric.
MAXIMIZE = 1;
// Minimize the goal metric.
MINIMIZE = 2;
}
// Required. The ID of the metric. Must not contain whitespaces and must be unique
// amongst all MetricSpecs.
string metric_id = 1 [(google.api.field_behavior) = REQUIRED];
// Required. The optimization goal of the metric.
GoalType goal = 2 [(google.api.field_behavior) = REQUIRED];
}
// Represents a single parameter to optimize.
message ParameterSpec {
// Value specification for a parameter in `DOUBLE` type.
message DoubleValueSpec {
// Required. Inclusive minimum value of the parameter.
double min_value = 1 [(google.api.field_behavior) = REQUIRED];
// Required. Inclusive maximum value of the parameter.
double max_value = 2 [(google.api.field_behavior) = REQUIRED];
}
// Value specification for a parameter in `INTEGER` type.
message IntegerValueSpec {
// Required. Inclusive minimum value of the parameter.
int64 min_value = 1 [(google.api.field_behavior) = REQUIRED];
// Required. Inclusive maximum value of the parameter.
int64 max_value = 2 [(google.api.field_behavior) = REQUIRED];
}
// Value specification for a parameter in `CATEGORICAL` type.
message CategoricalValueSpec {
// Required. The list of possible categories.
repeated string values = 1 [(google.api.field_behavior) = REQUIRED];
}
// Value specification for a parameter in `DISCRETE` type.
message DiscreteValueSpec {
// Required. A list of possible values.
// The list should be in increasing order and at least 1e-10 apart.
// For instance, this parameter might have possible settings of 1.5, 2.5,
// and 4.0. This list should not contain more than 1,000 values.
repeated double values = 1 [(google.api.field_behavior) = REQUIRED];
}
// The type of scaling that should be applied to this parameter.
enum ScaleType {
// By default, no scaling is applied.
SCALE_TYPE_UNSPECIFIED = 0;
// Scales the feasible space to (0, 1) linearly.
UNIT_LINEAR_SCALE = 1;
// Scales the feasible space logarithmically to (0, 1). The entire
// feasible space must be strictly positive.
UNIT_LOG_SCALE = 2;
// Scales the feasible space "reverse" logarithmically to (0, 1). The
// result is that values close to the top of the feasible space are spread
// out more than points near the bottom. The entire feasible space must be
// strictly positive.
UNIT_REVERSE_LOG_SCALE = 3;
}
oneof parameter_value_spec {
// The value spec for a 'DOUBLE' parameter.
DoubleValueSpec double_value_spec = 2;
// The value spec for an 'INTEGER' parameter.
IntegerValueSpec integer_value_spec = 3;
// The value spec for a 'CATEGORICAL' parameter.
CategoricalValueSpec categorical_value_spec = 4;
// The value spec for a 'DISCRETE' parameter.
DiscreteValueSpec discrete_value_spec = 5;
}
// Required. The ID of the parameter. Must not contain whitespaces and must be unique
// amongst all ParameterSpecs.
string parameter_id = 1 [(google.api.field_behavior) = REQUIRED];
// How the parameter should be scaled.
// Leave unset for `CATEGORICAL` parameters.
ScaleType scale_type = 6;
}
// The available search algorithms for the Study.
enum Algorithm {
// The default algorithm used by AI Platform Optimization service.
ALGORITHM_UNSPECIFIED = 0;
// Simple grid search within the feasible space. To use grid search,
// all parameters must be `INTEGER`, `CATEGORICAL`, or `DISCRETE`.
GRID_SEARCH = 2;
// Simple random search within the feasible space.
RANDOM_SEARCH = 3;
}
// Required. Metric specs for the Study.
repeated MetricSpec metrics = 1 [(google.api.field_behavior) = REQUIRED];
// Required. The set of parameters to tune.
repeated ParameterSpec parameters = 2 [(google.api.field_behavior) = REQUIRED];
// The search algorithm specified for the Study.
Algorithm algorithm = 3;
}
// A message representing a Measurement of a Trial. A Measurement contains
// the Metrics got by executing a Trial using suggested hyperparameter
// values.
message Measurement {
// A message representing a metric in the measurement.
message Metric {
// Output only. The ID of the Metric. The Metric should be defined in
// [StudySpec's Metrics][google.cloud.aiplatform.v1beta1.StudySpec.metrics].
string metric_id = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
// Output only. The value for this metric.
double value = 2 [(google.api.field_behavior) = OUTPUT_ONLY];
}
// Output only. The number of steps the machine learning model has been trained for.
// Must be non-negative.
int64 step_count = 2 [(google.api.field_behavior) = OUTPUT_ONLY];
// Output only. A list of metrics got by evaluating the objective functions using suggested
// Parameter values.
repeated Metric metrics = 3 [(google.api.field_behavior) = OUTPUT_ONLY];
}

@ -0,0 +1,307 @@
// Copyright 2020 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/io.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.proto";
import "google/cloud/aiplatform/v1beta1/pipeline_state.proto";
import "google/protobuf/struct.proto";
import "google/protobuf/timestamp.proto";
import "google/rpc/status.proto";
import "google/api/annotations.proto";
option go_package = "google.golang.org/genproto/googleapis/cloud/aiplatform/v1beta1;aiplatform";
option java_multiple_files = true;
option java_outer_classname = "TrainingPipelineProto";
option java_package = "com.google.cloud.aiplatform.v1beta1";
// The TrainingPipeline orchestrates tasks associated with training a Model. It
// always executes the training task, and optionally may also
// export data from AI Platform's Dataset which becomes the training input,
// [upload][google.cloud.aiplatform.v1beta1.ModelService.UploadModel] the Model to AI Platform, and evaluate the
// Model.
message TrainingPipeline {
option (google.api.resource) = {
type: "aiplatform.googleapis.com/TrainingPipeline"
pattern: "projects/{project}/locations/{location}/trainingPipelines/{training_pipeline}"
};
// Output only. Resource name of the TrainingPipeline.
string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
// Required. The user-defined name of this TrainingPipeline.
string display_name = 2 [(google.api.field_behavior) = REQUIRED];
// Specifies AI Platform owned input data that may be used for training the
// Model. The TrainingPipeline's [training_task_definition][google.cloud.aiplatform.v1beta1.TrainingPipeline.training_task_definition] should make
// clear whether this config is used and if there are any special requirements
// on how it should be filled. If nothing about this config is mentioned in
// the [training_task_definition][google.cloud.aiplatform.v1beta1.TrainingPipeline.training_task_definition], then it should be assumed that the
// TrainingPipeline does not depend on this configuration.
InputDataConfig input_data_config = 3;
// Required. A Google Cloud Storage path to the YAML file that defines the training task
// which is responsible for producing the model artifact, and may also include
// additional auxiliary work.
// The definition files that can be used here are found in
// gs://google-cloud-aiplatform/schema/trainingjob/definition/.
// Note: The URI given on output will be immutable and probably different,
// including the URI scheme, than the one given on input. The output URI will
// point to a location where the user only has a read access.
string training_task_definition = 4 [(google.api.field_behavior) = REQUIRED];
// Required. The training task's parameter(s), as specified in the
// [training_task_definition][google.cloud.aiplatform.v1beta1.TrainingPipeline.training_task_definition]'s `inputs`.
google.protobuf.Value training_task_inputs = 5 [(google.api.field_behavior) = REQUIRED];
// Output only. The metadata information as specified in the [training_task_definition][google.cloud.aiplatform.v1beta1.TrainingPipeline.training_task_definition]'s
// `metadata`. This metadata is an auxiliary runtime and final information
// about the training task. While the pipeline is running this information is
// populated only at a best effort basis. Only present if the
// pipeline's [training_task_definition][google.cloud.aiplatform.v1beta1.TrainingPipeline.training_task_definition] contains `metadata` object.
google.protobuf.Value training_task_metadata = 6 [(google.api.field_behavior) = OUTPUT_ONLY];
// Describes the Model that may be uploaded (via [ModelService.UploadMode][])
// by this TrainingPipeline. The TrainingPipeline's
// [training_task_definition][google.cloud.aiplatform.v1beta1.TrainingPipeline.training_task_definition] should make clear whether this Model
// description should be populated, and if there are any special requirements
// regarding how it should be filled. If nothing is mentioned in the
// [training_task_definition][google.cloud.aiplatform.v1beta1.TrainingPipeline.training_task_definition], then it should be assumed that this field
// should not be filled and the training task either uploads the Model without
// a need of this information, or that training task does not support
// uploading a Model as part of the pipeline.
// When the Pipeline's state becomes `PIPELINE_STATE_SUCCEEDED` and
// the trained Model had been uploaded into AI Platform, then the
// model_to_upload's resource [name][google.cloud.aiplatform.v1beta1.Model.name] is populated. The Model
// is always uploaded into the Project and Location in which this pipeline
// is.
Model model_to_upload = 7;
// Output only. The detailed state of the pipeline.
PipelineState state = 9 [(google.api.field_behavior) = OUTPUT_ONLY];
// Output only. Only populated when the pipeline's state is `PIPELINE_STATE_FAILED` or
// `PIPELINE_STATE_CANCELLED`.
google.rpc.Status error = 10 [(google.api.field_behavior) = OUTPUT_ONLY];
// Output only. Time when the TrainingPipeline was created.
google.protobuf.Timestamp create_time = 11 [(google.api.field_behavior) = OUTPUT_ONLY];
// Output only. Time when the TrainingPipeline for the first time entered the
// `PIPELINE_STATE_RUNNING` state.
google.protobuf.Timestamp start_time = 12 [(google.api.field_behavior) = OUTPUT_ONLY];
// Output only. Time when the TrainingPipeline entered any of the following states:
// `PIPELINE_STATE_SUCCEEDED`, `PIPELINE_STATE_FAILED`,
// `PIPELINE_STATE_CANCELLED`.
google.protobuf.Timestamp end_time = 13 [(google.api.field_behavior) = OUTPUT_ONLY];
// Output only. Time when the TrainingPipeline was most recently updated.
google.protobuf.Timestamp update_time = 14 [(google.api.field_behavior) = OUTPUT_ONLY];
// The labels with user-defined metadata to organize TrainingPipelines.
//
// Label keys and values can be no longer than 64 characters
// (Unicode codepoints), can only contain lowercase letters, numeric
// characters, underscores and dashes. International characters are allowed.
//
// See https://goo.gl/xmQnxf for more information and examples of labels.
map<string, string> labels = 15;
}
// Specifies AI Platform owned input data to be used for training, and
// possibly evaluating, the Model.
message InputDataConfig {
// The instructions how the input data should be split between the
// training, validation and test sets.
// If no split type is provided, the [fraction_split][google.cloud.aiplatform.v1beta1.InputDataConfig.fraction_split] is used by default.
oneof split {
// Split based on fractions defining the size of each set.
FractionSplit fraction_split = 2;
// Split based on the provided filters for each set.
FilterSplit filter_split = 3;
// Supported only for tabular Datasets.
//
// Split based on a predefined key.
PredefinedSplit predefined_split = 4;
// Supported only for tabular Datasets.
//
// Split based on the timestamp of the input data pieces.
TimestampSplit timestamp_split = 5;
}
// Only applicable to Custom and Hyperparameter Tuning TrainingPipelines.
//
// The destination of the input data to be written to.
//
// Following AI Platform environment variables will be passed to containers
// or python modules of the training task when this field is set:
//
// * AIP_DATA_FORMAT : Exported data format. Supported formats: "jsonl".
// * AIP_TRAINING_DATA_URI : Sharded exported training data uris.
// * AIP_VALIDATION_DATA_URI : Sharded exported validation data uris.
// * AIP_TEST_DATA_URI : Sharded exported test data uris.
oneof destination {
// The Google Cloud Storage location.
//
// The AI Platform environment variables representing Google Cloud Storage
// data URIs will always be represented in the Google Cloud Storage wildcard
// format to support sharded data. e.g.: "gs://.../training-*
//
// * AIP_DATA_FORMAT = "jsonl".
// * AIP_TRAINING_DATA_URI = "gcs_destination/training-*"
// * AIP_VALIDATION_DATA_URI = "gcs_destination/validation-*"
// * AIP_TEST_DATA_URI = "gcs_destination/test-*"
GcsDestination gcs_destination = 8;
}
// Required. The ID of the Dataset in the same Project and Location which data will be
// used to train the Model. The Dataset must use schema compatible with
// Model being trained, and what is compatible should be described in the
// used TrainingPipeline's [training_task_definition]
// [google.cloud.aiplatform.v1beta1.TrainingPipeline.training_task_definition].
// For tabular Datasets, all their data is exported to training, to pick
// and choose from.
string dataset_id = 1 [(google.api.field_behavior) = REQUIRED];
// Only applicable to Datasets that have DataItems and Annotations.
//
// A filter on Annotations of the Dataset. Only Annotations that both
// match this filter and belong to DataItems not ignored by the split method
// are used in respectively training, validation or test role, depending on
// the role of the DataItem they are on (for the auto-assigned that role is
// decided by AI Platform). A filter with same syntax as the one used in
// [ListAnnotations][google.cloud.aiplatform.v1beta1.DatasetService.ListAnnotations] may be used, but note
// here it filters across all Annotations of the Dataset, and not just within
// a single DataItem.
string annotations_filter = 6;
// Only applicable to custom training.
//
// Google Cloud Storage URI points to a YAML file describing annotation
// schema. The schema is defined as an OpenAPI 3.0.2 [Schema Object](
//
// https:
// //github.com/OAI/OpenAPI-Specification/b
// // lob/master/versions/3.0.2.md#schema-object)
// The schema files that can be used here are found in
// gs://google-cloud-aiplatform/schema/dataset/annotation/, note that the
// chosen schema must be consistent with
// [metadata][google.cloud.aiplatform.v1beta1.Dataset.metadata_schema_uri] of the Dataset specified by
// [dataset_id][google.cloud.aiplatform.v1beta1.InputDataConfig.dataset_id].
//
// Only Annotations that both match this schema and belong to DataItems not
// ignored by the split method are used in respectively training, validation
// or test role, depending on the role of the DataItem they are on.
//
// When used in conjunction with [annotations_filter][google.cloud.aiplatform.v1beta1.InputDataConfig.annotations_filter], the Annotations used
// for training are filtered by both [annotations_filter][google.cloud.aiplatform.v1beta1.InputDataConfig.annotations_filter] and
// [annotation_schema_uri][google.cloud.aiplatform.v1beta1.InputDataConfig.annotation_schema_uri].
string annotation_schema_uri = 9;
}
// Assigns the input data to training, validation, and test sets as per the
// given fractions. Any of `training_fraction`, `validation_fraction` and
// `test_fraction` may optionally be provided, they must sum to up to 1. If the
// provided ones sum to less than 1, the remainder is assigned to sets as
// decided by AI Platform. If none of the fractions are set, by default roughly
// 80% of data will be used for training, 10% for validation, and 10% for test.
message FractionSplit {
// The fraction of the input data that is to be used to train the Model.
double training_fraction = 1;
// The fraction of the input data that is to be used to validate the Model.
double validation_fraction = 2;
// The fraction of the input data that is to be used to evaluate the Model.
double test_fraction = 3;
}
// Assigns input data to training, validation, and test sets based on the given
// filters, data pieces not matched by any filter are ignored. Currently only
// supported for Datasets containing DataItems.
// If any of the filters in this message are to match nothing, then they can be
// set as '-' (the minus sign).
message FilterSplit {
// Required. A filter on DataItems of the Dataset. DataItems that match
// this filter are used to train the Model. A filter with same syntax
// as the one used in [DatasetService.ListDataItems][google.cloud.aiplatform.v1beta1.DatasetService.ListDataItems] may be used. If a
// single DataItem is matched by more than one of the FilterSplit filters,
// then it will be assigned to the first set that applies to it in the
// training, validation, test order.
string training_filter = 1 [(google.api.field_behavior) = REQUIRED];
// Required. A filter on DataItems of the Dataset. DataItems that match
// this filter are used to validate the Model. A filter with same syntax
// as the one used in [DatasetService.ListDataItems][google.cloud.aiplatform.v1beta1.DatasetService.ListDataItems] may be used. If a
// single DataItem is matched by more than one of the FilterSplit filters,
// then it will be assigned to the first set that applies to it in the
// training, validation, test order.
string validation_filter = 2 [(google.api.field_behavior) = REQUIRED];
// Required. A filter on DataItems of the Dataset. DataItems that match
// this filter are used to test the Model. A filter with same syntax
// as the one used in [DatasetService.ListDataItems][google.cloud.aiplatform.v1beta1.DatasetService.ListDataItems] may be used. If a
// single DataItem is matched by more than one of the FilterSplit filters,
// then it will be assigned to the first set that applies to it in the
// training, validation, test order.
string test_filter = 3 [(google.api.field_behavior) = REQUIRED];
}
// Assigns input data to training, validation, and test sets based on the
// value of a provided key.
//
// Supported only for tabular Datasets.
message PredefinedSplit {
// Required. The key is a name of one of the Dataset's data columns.
// The value of the key (either the label's value or value in the column)
// must be one of {`training`, `validation`, `test`}, and it defines to which
// set the given piece of data is assigned. If for a piece of data the key
// is not present or has an invalid value, that piece is ignored by the
// pipeline.
string key = 1 [(google.api.field_behavior) = REQUIRED];
}
// Assigns input data to training, validation, and test sets based on a
// provided timestamps. The youngest data pieces are assigned to training set,
// next to validation set, and the oldest to the test set.
//
// Supported only for tabular Datasets.
message TimestampSplit {
// The fraction of the input data that is to be used to train the Model.
double training_fraction = 1;
// The fraction of the input data that is to be used to validate the Model.
double validation_fraction = 2;
// The fraction of the input data that is to be used to evaluate the Model.
double test_fraction = 3;
// Required. The key is a name of one of the Dataset's data columns.
// The values of the key (the values in the column) must be in RFC 3339
// `date-time` format, where `time-offset` = `"Z"`
// (e.g. 1985-04-12T23:20:50.52Z). If for a piece of data the key is not
// present or has an invalid value, that piece is ignored by the pipeline.
string key = 4 [(google.api.field_behavior) = REQUIRED];
}

@ -0,0 +1,47 @@
// Copyright 2020 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";
option go_package = "google.golang.org/genproto/googleapis/cloud/aiplatform/v1beta1;aiplatform";
option java_multiple_files = true;
option java_outer_classname = "UserActionReferenceProto";
option java_package = "com.google.cloud.aiplatform.v1beta1";
// References an API call. It contains more information about long running
// operation and Jobs that are triggered by the API call.
message UserActionReference {
oneof reference {
// For API calls that return a long running operation.
// Resource name of the long running operation.
// Format:
// 'projects/{project}/locations/{location}/operations/{operation}'
string operation = 1;
// For API calls that start a LabelingJob.
// Resource name of the LabelingJob.
// Format:
//
// 'projects/{project}/locations/{location}/dataLabelingJobs/{data_labeling_job}'
string data_labeling_job = 2;
}
// The method name of the API call. For example,
// "/google.cloud.aiplatform.v1alpha1.DatasetService.CreateDataset"
string method = 3;
}
Loading…
Cancel
Save