/
job_service.py
888 lines (699 loc) · 34 KB
/
job_service.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
# -*- coding: utf-8 -*-
# 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.
#
import proto # type: ignore
from google.cloud.aiplatform_v1.types import (
batch_prediction_job as gca_batch_prediction_job,
)
from google.cloud.aiplatform_v1.types import custom_job as gca_custom_job
from google.cloud.aiplatform_v1.types import data_labeling_job as gca_data_labeling_job
from google.cloud.aiplatform_v1.types import (
hyperparameter_tuning_job as gca_hyperparameter_tuning_job,
)
from google.cloud.aiplatform_v1.types import (
model_deployment_monitoring_job as gca_model_deployment_monitoring_job,
)
from google.cloud.aiplatform_v1.types import operation
from google.protobuf import field_mask_pb2 # type: ignore
from google.protobuf import timestamp_pb2 # type: ignore
__protobuf__ = proto.module(
package="google.cloud.aiplatform.v1",
manifest={
"CreateCustomJobRequest",
"GetCustomJobRequest",
"ListCustomJobsRequest",
"ListCustomJobsResponse",
"DeleteCustomJobRequest",
"CancelCustomJobRequest",
"CreateDataLabelingJobRequest",
"GetDataLabelingJobRequest",
"ListDataLabelingJobsRequest",
"ListDataLabelingJobsResponse",
"DeleteDataLabelingJobRequest",
"CancelDataLabelingJobRequest",
"CreateHyperparameterTuningJobRequest",
"GetHyperparameterTuningJobRequest",
"ListHyperparameterTuningJobsRequest",
"ListHyperparameterTuningJobsResponse",
"DeleteHyperparameterTuningJobRequest",
"CancelHyperparameterTuningJobRequest",
"CreateBatchPredictionJobRequest",
"GetBatchPredictionJobRequest",
"ListBatchPredictionJobsRequest",
"ListBatchPredictionJobsResponse",
"DeleteBatchPredictionJobRequest",
"CancelBatchPredictionJobRequest",
"CreateModelDeploymentMonitoringJobRequest",
"SearchModelDeploymentMonitoringStatsAnomaliesRequest",
"SearchModelDeploymentMonitoringStatsAnomaliesResponse",
"GetModelDeploymentMonitoringJobRequest",
"ListModelDeploymentMonitoringJobsRequest",
"ListModelDeploymentMonitoringJobsResponse",
"UpdateModelDeploymentMonitoringJobRequest",
"DeleteModelDeploymentMonitoringJobRequest",
"PauseModelDeploymentMonitoringJobRequest",
"ResumeModelDeploymentMonitoringJobRequest",
"UpdateModelDeploymentMonitoringJobOperationMetadata",
},
)
class CreateCustomJobRequest(proto.Message):
r"""Request message for
[JobService.CreateCustomJob][google.cloud.aiplatform.v1.JobService.CreateCustomJob].
Attributes:
parent (str):
Required. The resource name of the Location to create the
CustomJob in. Format:
``projects/{project}/locations/{location}``
custom_job (google.cloud.aiplatform_v1.types.CustomJob):
Required. The CustomJob to create.
"""
parent = proto.Field(proto.STRING, number=1,)
custom_job = proto.Field(proto.MESSAGE, number=2, message=gca_custom_job.CustomJob,)
class GetCustomJobRequest(proto.Message):
r"""Request message for
[JobService.GetCustomJob][google.cloud.aiplatform.v1.JobService.GetCustomJob].
Attributes:
name (str):
Required. The name of the CustomJob resource. Format:
``projects/{project}/locations/{location}/customJobs/{custom_job}``
"""
name = proto.Field(proto.STRING, number=1,)
class ListCustomJobsRequest(proto.Message):
r"""Request message for
[JobService.ListCustomJobs][google.cloud.aiplatform.v1.JobService.ListCustomJobs].
Attributes:
parent (str):
Required. The resource name of the Location to list the
CustomJobs from. Format:
``projects/{project}/locations/{location}``
filter (str):
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"``
page_size (int):
The standard list page size.
page_token (str):
The standard list page token. Typically obtained via
[ListCustomJobsResponse.next_page_token][google.cloud.aiplatform.v1.ListCustomJobsResponse.next_page_token]
of the previous
[JobService.ListCustomJobs][google.cloud.aiplatform.v1.JobService.ListCustomJobs]
call.
read_mask (google.protobuf.field_mask_pb2.FieldMask):
Mask specifying which fields to read.
"""
parent = proto.Field(proto.STRING, number=1,)
filter = proto.Field(proto.STRING, number=2,)
page_size = proto.Field(proto.INT32, number=3,)
page_token = proto.Field(proto.STRING, number=4,)
read_mask = proto.Field(proto.MESSAGE, number=5, message=field_mask_pb2.FieldMask,)
class ListCustomJobsResponse(proto.Message):
r"""Response message for
[JobService.ListCustomJobs][google.cloud.aiplatform.v1.JobService.ListCustomJobs]
Attributes:
custom_jobs (Sequence[google.cloud.aiplatform_v1.types.CustomJob]):
List of CustomJobs in the requested page.
next_page_token (str):
A token to retrieve the next page of results. Pass to
[ListCustomJobsRequest.page_token][google.cloud.aiplatform.v1.ListCustomJobsRequest.page_token]
to obtain that page.
"""
@property
def raw_page(self):
return self
custom_jobs = proto.RepeatedField(
proto.MESSAGE, number=1, message=gca_custom_job.CustomJob,
)
next_page_token = proto.Field(proto.STRING, number=2,)
class DeleteCustomJobRequest(proto.Message):
r"""Request message for
[JobService.DeleteCustomJob][google.cloud.aiplatform.v1.JobService.DeleteCustomJob].
Attributes:
name (str):
Required. The name of the CustomJob resource to be deleted.
Format:
``projects/{project}/locations/{location}/customJobs/{custom_job}``
"""
name = proto.Field(proto.STRING, number=1,)
class CancelCustomJobRequest(proto.Message):
r"""Request message for
[JobService.CancelCustomJob][google.cloud.aiplatform.v1.JobService.CancelCustomJob].
Attributes:
name (str):
Required. The name of the CustomJob to cancel. Format:
``projects/{project}/locations/{location}/customJobs/{custom_job}``
"""
name = proto.Field(proto.STRING, number=1,)
class CreateDataLabelingJobRequest(proto.Message):
r"""Request message for
[JobService.CreateDataLabelingJob][google.cloud.aiplatform.v1.JobService.CreateDataLabelingJob].
Attributes:
parent (str):
Required. The parent of the DataLabelingJob. Format:
``projects/{project}/locations/{location}``
data_labeling_job (google.cloud.aiplatform_v1.types.DataLabelingJob):
Required. The DataLabelingJob to create.
"""
parent = proto.Field(proto.STRING, number=1,)
data_labeling_job = proto.Field(
proto.MESSAGE, number=2, message=gca_data_labeling_job.DataLabelingJob,
)
class GetDataLabelingJobRequest(proto.Message):
r"""Request message for
[JobService.GetDataLabelingJob][google.cloud.aiplatform.v1.JobService.GetDataLabelingJob].
Attributes:
name (str):
Required. The name of the DataLabelingJob. Format:
``projects/{project}/locations/{location}/dataLabelingJobs/{data_labeling_job}``
"""
name = proto.Field(proto.STRING, number=1,)
class ListDataLabelingJobsRequest(proto.Message):
r"""Request message for
[JobService.ListDataLabelingJobs][google.cloud.aiplatform.v1.JobService.ListDataLabelingJobs].
Attributes:
parent (str):
Required. The parent of the DataLabelingJob. Format:
``projects/{project}/locations/{location}``
filter (str):
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"``
page_size (int):
The standard list page size.
page_token (str):
The standard list page token.
read_mask (google.protobuf.field_mask_pb2.FieldMask):
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.
order_by (str):
A comma-separated list of fields to order by, sorted in
ascending order by default. Use ``desc`` after a field name
for descending.
"""
parent = proto.Field(proto.STRING, number=1,)
filter = proto.Field(proto.STRING, number=2,)
page_size = proto.Field(proto.INT32, number=3,)
page_token = proto.Field(proto.STRING, number=4,)
read_mask = proto.Field(proto.MESSAGE, number=5, message=field_mask_pb2.FieldMask,)
order_by = proto.Field(proto.STRING, number=6,)
class ListDataLabelingJobsResponse(proto.Message):
r"""Response message for
[JobService.ListDataLabelingJobs][google.cloud.aiplatform.v1.JobService.ListDataLabelingJobs].
Attributes:
data_labeling_jobs (Sequence[google.cloud.aiplatform_v1.types.DataLabelingJob]):
A list of DataLabelingJobs that matches the
specified filter in the request.
next_page_token (str):
The standard List next-page token.
"""
@property
def raw_page(self):
return self
data_labeling_jobs = proto.RepeatedField(
proto.MESSAGE, number=1, message=gca_data_labeling_job.DataLabelingJob,
)
next_page_token = proto.Field(proto.STRING, number=2,)
class DeleteDataLabelingJobRequest(proto.Message):
r"""Request message for
[JobService.DeleteDataLabelingJob][google.cloud.aiplatform.v1.JobService.DeleteDataLabelingJob].
Attributes:
name (str):
Required. The name of the DataLabelingJob to be deleted.
Format:
``projects/{project}/locations/{location}/dataLabelingJobs/{data_labeling_job}``
"""
name = proto.Field(proto.STRING, number=1,)
class CancelDataLabelingJobRequest(proto.Message):
r"""Request message for
[JobService.CancelDataLabelingJob][google.cloud.aiplatform.v1.JobService.CancelDataLabelingJob].
Attributes:
name (str):
Required. The name of the DataLabelingJob. Format:
``projects/{project}/locations/{location}/dataLabelingJobs/{data_labeling_job}``
"""
name = proto.Field(proto.STRING, number=1,)
class CreateHyperparameterTuningJobRequest(proto.Message):
r"""Request message for
[JobService.CreateHyperparameterTuningJob][google.cloud.aiplatform.v1.JobService.CreateHyperparameterTuningJob].
Attributes:
parent (str):
Required. The resource name of the Location to create the
HyperparameterTuningJob in. Format:
``projects/{project}/locations/{location}``
hyperparameter_tuning_job (google.cloud.aiplatform_v1.types.HyperparameterTuningJob):
Required. The HyperparameterTuningJob to
create.
"""
parent = proto.Field(proto.STRING, number=1,)
hyperparameter_tuning_job = proto.Field(
proto.MESSAGE,
number=2,
message=gca_hyperparameter_tuning_job.HyperparameterTuningJob,
)
class GetHyperparameterTuningJobRequest(proto.Message):
r"""Request message for
[JobService.GetHyperparameterTuningJob][google.cloud.aiplatform.v1.JobService.GetHyperparameterTuningJob].
Attributes:
name (str):
Required. The name of the HyperparameterTuningJob resource.
Format:
``projects/{project}/locations/{location}/hyperparameterTuningJobs/{hyperparameter_tuning_job}``
"""
name = proto.Field(proto.STRING, number=1,)
class ListHyperparameterTuningJobsRequest(proto.Message):
r"""Request message for
[JobService.ListHyperparameterTuningJobs][google.cloud.aiplatform.v1.JobService.ListHyperparameterTuningJobs].
Attributes:
parent (str):
Required. The resource name of the Location to list the
HyperparameterTuningJobs from. Format:
``projects/{project}/locations/{location}``
filter (str):
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"``
page_size (int):
The standard list page size.
page_token (str):
The standard list page token. Typically obtained via
[ListHyperparameterTuningJobsResponse.next_page_token][google.cloud.aiplatform.v1.ListHyperparameterTuningJobsResponse.next_page_token]
of the previous
[JobService.ListHyperparameterTuningJobs][google.cloud.aiplatform.v1.JobService.ListHyperparameterTuningJobs]
call.
read_mask (google.protobuf.field_mask_pb2.FieldMask):
Mask specifying which fields to read.
"""
parent = proto.Field(proto.STRING, number=1,)
filter = proto.Field(proto.STRING, number=2,)
page_size = proto.Field(proto.INT32, number=3,)
page_token = proto.Field(proto.STRING, number=4,)
read_mask = proto.Field(proto.MESSAGE, number=5, message=field_mask_pb2.FieldMask,)
class ListHyperparameterTuningJobsResponse(proto.Message):
r"""Response message for
[JobService.ListHyperparameterTuningJobs][google.cloud.aiplatform.v1.JobService.ListHyperparameterTuningJobs]
Attributes:
hyperparameter_tuning_jobs (Sequence[google.cloud.aiplatform_v1.types.HyperparameterTuningJob]):
List of HyperparameterTuningJobs in the requested page.
[HyperparameterTuningJob.trials][google.cloud.aiplatform.v1.HyperparameterTuningJob.trials]
of the jobs will be not be returned.
next_page_token (str):
A token to retrieve the next page of results. Pass to
[ListHyperparameterTuningJobsRequest.page_token][google.cloud.aiplatform.v1.ListHyperparameterTuningJobsRequest.page_token]
to obtain that page.
"""
@property
def raw_page(self):
return self
hyperparameter_tuning_jobs = proto.RepeatedField(
proto.MESSAGE,
number=1,
message=gca_hyperparameter_tuning_job.HyperparameterTuningJob,
)
next_page_token = proto.Field(proto.STRING, number=2,)
class DeleteHyperparameterTuningJobRequest(proto.Message):
r"""Request message for
[JobService.DeleteHyperparameterTuningJob][google.cloud.aiplatform.v1.JobService.DeleteHyperparameterTuningJob].
Attributes:
name (str):
Required. The name of the HyperparameterTuningJob resource
to be deleted. Format:
``projects/{project}/locations/{location}/hyperparameterTuningJobs/{hyperparameter_tuning_job}``
"""
name = proto.Field(proto.STRING, number=1,)
class CancelHyperparameterTuningJobRequest(proto.Message):
r"""Request message for
[JobService.CancelHyperparameterTuningJob][google.cloud.aiplatform.v1.JobService.CancelHyperparameterTuningJob].
Attributes:
name (str):
Required. The name of the HyperparameterTuningJob to cancel.
Format:
``projects/{project}/locations/{location}/hyperparameterTuningJobs/{hyperparameter_tuning_job}``
"""
name = proto.Field(proto.STRING, number=1,)
class CreateBatchPredictionJobRequest(proto.Message):
r"""Request message for
[JobService.CreateBatchPredictionJob][google.cloud.aiplatform.v1.JobService.CreateBatchPredictionJob].
Attributes:
parent (str):
Required. The resource name of the Location to create the
BatchPredictionJob in. Format:
``projects/{project}/locations/{location}``
batch_prediction_job (google.cloud.aiplatform_v1.types.BatchPredictionJob):
Required. The BatchPredictionJob to create.
"""
parent = proto.Field(proto.STRING, number=1,)
batch_prediction_job = proto.Field(
proto.MESSAGE, number=2, message=gca_batch_prediction_job.BatchPredictionJob,
)
class GetBatchPredictionJobRequest(proto.Message):
r"""Request message for
[JobService.GetBatchPredictionJob][google.cloud.aiplatform.v1.JobService.GetBatchPredictionJob].
Attributes:
name (str):
Required. The name of the BatchPredictionJob resource.
Format:
``projects/{project}/locations/{location}/batchPredictionJobs/{batch_prediction_job}``
"""
name = proto.Field(proto.STRING, number=1,)
class ListBatchPredictionJobsRequest(proto.Message):
r"""Request message for
[JobService.ListBatchPredictionJobs][google.cloud.aiplatform.v1.JobService.ListBatchPredictionJobs].
Attributes:
parent (str):
Required. The resource name of the Location to list the
BatchPredictionJobs from. Format:
``projects/{project}/locations/{location}``
filter (str):
The standard list filter.
Supported fields:
- ``display_name`` supports = and !=.
- ``state`` supports = and !=.
- ``model_display_name`` 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"``
page_size (int):
The standard list page size.
page_token (str):
The standard list page token. Typically obtained via
[ListBatchPredictionJobsResponse.next_page_token][google.cloud.aiplatform.v1.ListBatchPredictionJobsResponse.next_page_token]
of the previous
[JobService.ListBatchPredictionJobs][google.cloud.aiplatform.v1.JobService.ListBatchPredictionJobs]
call.
read_mask (google.protobuf.field_mask_pb2.FieldMask):
Mask specifying which fields to read.
"""
parent = proto.Field(proto.STRING, number=1,)
filter = proto.Field(proto.STRING, number=2,)
page_size = proto.Field(proto.INT32, number=3,)
page_token = proto.Field(proto.STRING, number=4,)
read_mask = proto.Field(proto.MESSAGE, number=5, message=field_mask_pb2.FieldMask,)
class ListBatchPredictionJobsResponse(proto.Message):
r"""Response message for
[JobService.ListBatchPredictionJobs][google.cloud.aiplatform.v1.JobService.ListBatchPredictionJobs]
Attributes:
batch_prediction_jobs (Sequence[google.cloud.aiplatform_v1.types.BatchPredictionJob]):
List of BatchPredictionJobs in the requested
page.
next_page_token (str):
A token to retrieve the next page of results. Pass to
[ListBatchPredictionJobsRequest.page_token][google.cloud.aiplatform.v1.ListBatchPredictionJobsRequest.page_token]
to obtain that page.
"""
@property
def raw_page(self):
return self
batch_prediction_jobs = proto.RepeatedField(
proto.MESSAGE, number=1, message=gca_batch_prediction_job.BatchPredictionJob,
)
next_page_token = proto.Field(proto.STRING, number=2,)
class DeleteBatchPredictionJobRequest(proto.Message):
r"""Request message for
[JobService.DeleteBatchPredictionJob][google.cloud.aiplatform.v1.JobService.DeleteBatchPredictionJob].
Attributes:
name (str):
Required. The name of the BatchPredictionJob resource to be
deleted. Format:
``projects/{project}/locations/{location}/batchPredictionJobs/{batch_prediction_job}``
"""
name = proto.Field(proto.STRING, number=1,)
class CancelBatchPredictionJobRequest(proto.Message):
r"""Request message for
[JobService.CancelBatchPredictionJob][google.cloud.aiplatform.v1.JobService.CancelBatchPredictionJob].
Attributes:
name (str):
Required. The name of the BatchPredictionJob to cancel.
Format:
``projects/{project}/locations/{location}/batchPredictionJobs/{batch_prediction_job}``
"""
name = proto.Field(proto.STRING, number=1,)
class CreateModelDeploymentMonitoringJobRequest(proto.Message):
r"""Request message for
[JobService.CreateModelDeploymentMonitoringJob][google.cloud.aiplatform.v1.JobService.CreateModelDeploymentMonitoringJob].
Attributes:
parent (str):
Required. The parent of the ModelDeploymentMonitoringJob.
Format: ``projects/{project}/locations/{location}``
model_deployment_monitoring_job (google.cloud.aiplatform_v1.types.ModelDeploymentMonitoringJob):
Required. The ModelDeploymentMonitoringJob to
create
"""
parent = proto.Field(proto.STRING, number=1,)
model_deployment_monitoring_job = proto.Field(
proto.MESSAGE,
number=2,
message=gca_model_deployment_monitoring_job.ModelDeploymentMonitoringJob,
)
class SearchModelDeploymentMonitoringStatsAnomaliesRequest(proto.Message):
r"""Request message for
[JobService.SearchModelDeploymentMonitoringStatsAnomalies][google.cloud.aiplatform.v1.JobService.SearchModelDeploymentMonitoringStatsAnomalies].
Attributes:
model_deployment_monitoring_job (str):
Required. ModelDeploymentMonitoring Job resource name.
Format:
\`projects/{project}/locations/{location}/modelDeploymentMonitoringJobs/{model_deployment_monitoring_job}
deployed_model_id (str):
Required. The DeployedModel ID of the
[google.cloud.aiplatform.master.ModelDeploymentMonitoringObjectiveConfig.deployed_model_id].
feature_display_name (str):
The feature display name. If specified, only return the
stats belonging to this feature. Format:
[ModelMonitoringStatsAnomalies.FeatureHistoricStatsAnomalies.feature_display_name][google.cloud.aiplatform.v1.ModelMonitoringStatsAnomalies.FeatureHistoricStatsAnomalies.feature_display_name],
example: "user_destination".
objectives (Sequence[google.cloud.aiplatform_v1.types.SearchModelDeploymentMonitoringStatsAnomaliesRequest.StatsAnomaliesObjective]):
Required. Objectives of the stats to
retrieve.
page_size (int):
The standard list page size.
page_token (str):
A page token received from a previous
[JobService.SearchModelDeploymentMonitoringStatsAnomalies][google.cloud.aiplatform.v1.JobService.SearchModelDeploymentMonitoringStatsAnomalies]
call.
start_time (google.protobuf.timestamp_pb2.Timestamp):
The earliest timestamp of stats being
generated. If not set, indicates fetching stats
till the earliest possible one.
end_time (google.protobuf.timestamp_pb2.Timestamp):
The latest timestamp of stats being
generated. If not set, indicates feching stats
till the latest possible one.
"""
class StatsAnomaliesObjective(proto.Message):
r"""Stats requested for specific objective.
Attributes:
type_ (google.cloud.aiplatform_v1.types.ModelDeploymentMonitoringObjectiveType):
top_feature_count (int):
If set, all attribution scores between
[SearchModelDeploymentMonitoringStatsAnomaliesRequest.start_time][google.cloud.aiplatform.v1.SearchModelDeploymentMonitoringStatsAnomaliesRequest.start_time]
and
[SearchModelDeploymentMonitoringStatsAnomaliesRequest.end_time][google.cloud.aiplatform.v1.SearchModelDeploymentMonitoringStatsAnomaliesRequest.end_time]
are fetched, and page token doesn't take affect in this
case. Only used to retrieve attribution score for the top
Features which has the highest attribution score in the
latest monitoring run.
"""
type_ = proto.Field(
proto.ENUM,
number=1,
enum=gca_model_deployment_monitoring_job.ModelDeploymentMonitoringObjectiveType,
)
top_feature_count = proto.Field(proto.INT32, number=4,)
model_deployment_monitoring_job = proto.Field(proto.STRING, number=1,)
deployed_model_id = proto.Field(proto.STRING, number=2,)
feature_display_name = proto.Field(proto.STRING, number=3,)
objectives = proto.RepeatedField(
proto.MESSAGE, number=4, message=StatsAnomaliesObjective,
)
page_size = proto.Field(proto.INT32, number=5,)
page_token = proto.Field(proto.STRING, number=6,)
start_time = proto.Field(proto.MESSAGE, number=7, message=timestamp_pb2.Timestamp,)
end_time = proto.Field(proto.MESSAGE, number=8, message=timestamp_pb2.Timestamp,)
class SearchModelDeploymentMonitoringStatsAnomaliesResponse(proto.Message):
r"""Response message for
[JobService.SearchModelDeploymentMonitoringStatsAnomalies][google.cloud.aiplatform.v1.JobService.SearchModelDeploymentMonitoringStatsAnomalies].
Attributes:
monitoring_stats (Sequence[google.cloud.aiplatform_v1.types.ModelMonitoringStatsAnomalies]):
Stats retrieved for requested objectives. There are at most
1000
[ModelMonitoringStatsAnomalies.FeatureHistoricStatsAnomalies.prediction_stats][google.cloud.aiplatform.v1.ModelMonitoringStatsAnomalies.FeatureHistoricStatsAnomalies.prediction_stats]
in the response.
next_page_token (str):
The page token that can be used by the next
[JobService.SearchModelDeploymentMonitoringStatsAnomalies][google.cloud.aiplatform.v1.JobService.SearchModelDeploymentMonitoringStatsAnomalies]
call.
"""
@property
def raw_page(self):
return self
monitoring_stats = proto.RepeatedField(
proto.MESSAGE,
number=1,
message=gca_model_deployment_monitoring_job.ModelMonitoringStatsAnomalies,
)
next_page_token = proto.Field(proto.STRING, number=2,)
class GetModelDeploymentMonitoringJobRequest(proto.Message):
r"""Request message for
[JobService.GetModelDeploymentMonitoringJob][google.cloud.aiplatform.v1.JobService.GetModelDeploymentMonitoringJob].
Attributes:
name (str):
Required. The resource name of the
ModelDeploymentMonitoringJob. Format:
``projects/{project}/locations/{location}/modelDeploymentMonitoringJobs/{model_deployment_monitoring_job}``
"""
name = proto.Field(proto.STRING, number=1,)
class ListModelDeploymentMonitoringJobsRequest(proto.Message):
r"""Request message for
[JobService.ListModelDeploymentMonitoringJobs][google.cloud.aiplatform.v1.JobService.ListModelDeploymentMonitoringJobs].
Attributes:
parent (str):
Required. The parent of the ModelDeploymentMonitoringJob.
Format: ``projects/{project}/locations/{location}``
filter (str):
The standard list filter.
page_size (int):
The standard list page size.
page_token (str):
The standard list page token.
read_mask (google.protobuf.field_mask_pb2.FieldMask):
Mask specifying which fields to read
"""
parent = proto.Field(proto.STRING, number=1,)
filter = proto.Field(proto.STRING, number=2,)
page_size = proto.Field(proto.INT32, number=3,)
page_token = proto.Field(proto.STRING, number=4,)
read_mask = proto.Field(proto.MESSAGE, number=5, message=field_mask_pb2.FieldMask,)
class ListModelDeploymentMonitoringJobsResponse(proto.Message):
r"""Response message for
[JobService.ListModelDeploymentMonitoringJobs][google.cloud.aiplatform.v1.JobService.ListModelDeploymentMonitoringJobs].
Attributes:
model_deployment_monitoring_jobs (Sequence[google.cloud.aiplatform_v1.types.ModelDeploymentMonitoringJob]):
A list of ModelDeploymentMonitoringJobs that
matches the specified filter in the request.
next_page_token (str):
The standard List next-page token.
"""
@property
def raw_page(self):
return self
model_deployment_monitoring_jobs = proto.RepeatedField(
proto.MESSAGE,
number=1,
message=gca_model_deployment_monitoring_job.ModelDeploymentMonitoringJob,
)
next_page_token = proto.Field(proto.STRING, number=2,)
class UpdateModelDeploymentMonitoringJobRequest(proto.Message):
r"""Request message for
[JobService.UpdateModelDeploymentMonitoringJob][google.cloud.aiplatform.v1.JobService.UpdateModelDeploymentMonitoringJob].
Attributes:
model_deployment_monitoring_job (google.cloud.aiplatform_v1.types.ModelDeploymentMonitoringJob):
Required. The model monitoring configuration
which replaces the resource on the server.
update_mask (google.protobuf.field_mask_pb2.FieldMask):
Required. The update mask is used to specify the fields to
be overwritten in the ModelDeploymentMonitoringJob resource
by the update. The fields specified in the update_mask are
relative to the resource, not the full request. A field will
be overwritten if it is in the mask. If the user does not
provide a mask then only the non-empty fields present in the
request will be overwritten. Set the update_mask to ``*`` to
override all fields. For the objective config, the user can
either provide the update mask for
model_deployment_monitoring_objective_configs or any
combination of its nested fields, such as:
model_deployment_monitoring_objective_configs.objective_config.training_dataset.
Updatable fields:
- ``display_name``
- ``model_deployment_monitoring_schedule_config``
- ``model_monitoring_alert_config``
- ``logging_sampling_strategy``
- ``labels``
- ``log_ttl``
- ``enable_monitoring_pipeline_logs`` . and
- ``model_deployment_monitoring_objective_configs`` . or
- ``model_deployment_monitoring_objective_configs.objective_config.training_dataset``
- ``model_deployment_monitoring_objective_configs.objective_config.training_prediction_skew_detection_config``
- ``model_deployment_monitoring_objective_configs.objective_config.prediction_drift_detection_config``
"""
model_deployment_monitoring_job = proto.Field(
proto.MESSAGE,
number=1,
message=gca_model_deployment_monitoring_job.ModelDeploymentMonitoringJob,
)
update_mask = proto.Field(
proto.MESSAGE, number=2, message=field_mask_pb2.FieldMask,
)
class DeleteModelDeploymentMonitoringJobRequest(proto.Message):
r"""Request message for
[JobService.DeleteModelDeploymentMonitoringJob][google.cloud.aiplatform.v1.JobService.DeleteModelDeploymentMonitoringJob].
Attributes:
name (str):
Required. The resource name of the model monitoring job to
delete. Format:
``projects/{project}/locations/{location}/modelDeploymentMonitoringJobs/{model_deployment_monitoring_job}``
"""
name = proto.Field(proto.STRING, number=1,)
class PauseModelDeploymentMonitoringJobRequest(proto.Message):
r"""Request message for
[JobService.PauseModelDeploymentMonitoringJob][google.cloud.aiplatform.v1.JobService.PauseModelDeploymentMonitoringJob].
Attributes:
name (str):
Required. The resource name of the
ModelDeploymentMonitoringJob to pause. Format:
``projects/{project}/locations/{location}/modelDeploymentMonitoringJobs/{model_deployment_monitoring_job}``
"""
name = proto.Field(proto.STRING, number=1,)
class ResumeModelDeploymentMonitoringJobRequest(proto.Message):
r"""Request message for
[JobService.ResumeModelDeploymentMonitoringJob][google.cloud.aiplatform.v1.JobService.ResumeModelDeploymentMonitoringJob].
Attributes:
name (str):
Required. The resource name of the
ModelDeploymentMonitoringJob to resume. Format:
``projects/{project}/locations/{location}/modelDeploymentMonitoringJobs/{model_deployment_monitoring_job}``
"""
name = proto.Field(proto.STRING, number=1,)
class UpdateModelDeploymentMonitoringJobOperationMetadata(proto.Message):
r"""Runtime operation information for
[JobService.UpdateModelDeploymentMonitoringJob][google.cloud.aiplatform.v1.JobService.UpdateModelDeploymentMonitoringJob].
Attributes:
generic_metadata (google.cloud.aiplatform_v1.types.GenericOperationMetadata):
The operation generic information.
"""
generic_metadata = proto.Field(
proto.MESSAGE, number=1, message=operation.GenericOperationMetadata,
)
__all__ = tuple(sorted(__protobuf__.manifest))