xref: /aosp_15_r20/external/googleapis/google/cloud/aiplatform/v1beta1/model_monitoring_job.proto (revision d5c09012810ac0c9f33fe448fb6da8260d444cc9)
1// Copyright 2023 Google LLC
2//
3// Licensed under the Apache License, Version 2.0 (the "License");
4// you may not use this file except in compliance with the License.
5// You may obtain a copy of the License at
6//
7//     http://www.apache.org/licenses/LICENSE-2.0
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
14
15syntax = "proto3";
16
17package google.cloud.aiplatform.v1beta1;
18
19import "google/api/field_behavior.proto";
20import "google/api/resource.proto";
21import "google/cloud/aiplatform/v1beta1/job_state.proto";
22import "google/cloud/aiplatform/v1beta1/model_monitoring_spec.proto";
23import "google/protobuf/timestamp.proto";
24import "google/rpc/status.proto";
25import "google/type/interval.proto";
26
27option csharp_namespace = "Google.Cloud.AIPlatform.V1Beta1";
28option go_package = "cloud.google.com/go/aiplatform/apiv1beta1/aiplatformpb;aiplatformpb";
29option java_multiple_files = true;
30option java_outer_classname = "ModelMonitoringJobProto";
31option java_package = "com.google.cloud.aiplatform.v1beta1";
32option php_namespace = "Google\\Cloud\\AIPlatform\\V1beta1";
33option ruby_package = "Google::Cloud::AIPlatform::V1beta1";
34
35// Represents a model monitoring job that analyze dataset using different
36// monitoring algorithm.
37message ModelMonitoringJob {
38  option (google.api.resource) = {
39    type: "aiplatform.googleapis.com/ModelMonitoringJob"
40    pattern: "projects/{project}/locations/{location}/modelMonitors/{model_monitor}/modelMonitoringJobs/{model_monitoring_job}"
41  };
42
43  // Output only. Resource name of a ModelMonitoringJob. Format:
44  // `projects/{project_id}/locations/{location_id}/modelMonitors/{model_monitor_id}/modelMonitoringJobs/{model_monitoring_job_id}`
45  string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
46
47  // The display name of the ModelMonitoringJob.
48  // The name can be up to 128 characters long and can consist of any UTF-8.
49  string display_name = 2;
50
51  // Monitoring monitoring job spec. It outlines the specifications for
52  // monitoring objectives, notifications, and result exports. If left blank,
53  // the default monitoring specifications from the top-level resource
54  // 'ModelMonitor' will be applied. If provided, we will use the specification
55  // defined here rather than the default one.
56  ModelMonitoringSpec model_monitoring_spec = 3;
57
58  // Output only. Timestamp when this ModelMonitoringJob was created.
59  google.protobuf.Timestamp create_time = 4
60      [(google.api.field_behavior) = OUTPUT_ONLY];
61
62  // Output only. Timestamp when this ModelMonitoringJob was updated most
63  // recently.
64  google.protobuf.Timestamp update_time = 5
65      [(google.api.field_behavior) = OUTPUT_ONLY];
66
67  // Output only. The state of the monitoring job.
68  //  * When the job is still creating, the state will be 'JOB_STATE_PENDING'.
69  //  * Once the job is successfully created, the state will be
70  //    'JOB_STATE_RUNNING'.
71  //  * Once the job is finished, the state will be one of
72  //    'JOB_STATE_FAILED', 'JOB_STATE_SUCCEEDED',
73  //    'JOB_STATE_PARTIALLY_SUCCEEDED'.
74  JobState state = 6 [(google.api.field_behavior) = OUTPUT_ONLY];
75
76  // Output only. Schedule resource name. It will only appear when this job is
77  // triggered by a schedule.
78  string schedule = 7 [
79    (google.api.field_behavior) = OUTPUT_ONLY,
80    (google.api.resource_reference) = {
81      type: "aiplatform.googleapis.com/Schedule"
82    }
83  ];
84
85  // Output only. Execution results for all the monitoring objectives.
86  ModelMonitoringJobExecutionDetail job_execution_detail = 8
87      [(google.api.field_behavior) = OUTPUT_ONLY];
88
89  // Output only. Timestamp when this ModelMonitoringJob was scheduled. It will
90  // only appear when this job is triggered by a schedule.
91  google.protobuf.Timestamp schedule_time = 9
92      [(google.api.field_behavior) = OUTPUT_ONLY];
93}
94
95// Represent the execution details of the job.
96message ModelMonitoringJobExecutionDetail {
97  // Processed dataset information.
98  message ProcessedDataset {
99    // Actual data location of the processed dataset.
100    string location = 1;
101
102    // Dataset time range information if any.
103    google.type.Interval time_range = 2;
104  }
105
106  // Processed baseline datasets.
107  repeated ProcessedDataset baseline_datasets = 1;
108
109  // Processed target datasets.
110  repeated ProcessedDataset target_datasets = 2;
111
112  // Status of data processing for each monitoring objective.
113  // Key is the objective.
114  map<string, google.rpc.Status> objective_status = 3;
115
116  // Additional job error status.
117  google.rpc.Status error = 4;
118}
119