Skip to content

Commit 21766c4

Browse files
docs(datalabeling): update docstrings; bump copyright year to 2020 (via synth) (#10229)
1 parent 96b9553 commit 21766c4

29 files changed

+2343
-4719
lines changed

datalabeling/google/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# -*- coding: utf-8 -*-
22
#
3-
# Copyright 2019 Google LLC
3+
# Copyright 2020 Google LLC
44
#
55
# Licensed under the Apache License, Version 2.0 (the "License");
66
# you may not use this file except in compliance with the License.

datalabeling/google/cloud/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# -*- coding: utf-8 -*-
22
#
3-
# Copyright 2019 Google LLC
3+
# Copyright 2020 Google LLC
44
#
55
# Licensed under the Apache License, Version 2.0 (the "License");
66
# you may not use this file except in compliance with the License.

datalabeling/google/cloud/datalabeling.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# -*- coding: utf-8 -*-
22
#
3-
# Copyright 2019 Google LLC
3+
# Copyright 2020 Google LLC
44
#
55
# Licensed under the Apache License, Version 2.0 (the "License");
66
# you may not use this file except in compliance with the License.

datalabeling/google/cloud/datalabeling_v1beta1/gapic/data_labeling_service_client.py

+155-119
Large diffs are not rendered by default.

datalabeling/google/cloud/datalabeling_v1beta1/gapic/data_labeling_service_client_config.py

+35-35
Original file line numberDiff line numberDiff line change
@@ -9,127 +9,132 @@
99
"default": {
1010
"initial_retry_delay_millis": 100,
1111
"retry_delay_multiplier": 1.3,
12-
"max_retry_delay_millis": 30000,
12+
"max_retry_delay_millis": 60000,
1313
"initial_rpc_timeout_millis": 20000,
1414
"rpc_timeout_multiplier": 1.0,
1515
"max_rpc_timeout_millis": 20000,
16-
"total_timeout_millis": 300000,
16+
"total_timeout_millis": 600000,
1717
}
1818
},
1919
"methods": {
2020
"CreateDataset": {
21-
"timeout_millis": 30000,
21+
"timeout_millis": 60000,
2222
"retry_codes_name": "non_idempotent",
2323
"retry_params_name": "default",
2424
},
2525
"GetDataset": {
26-
"timeout_millis": 30000,
26+
"timeout_millis": 60000,
2727
"retry_codes_name": "idempotent",
2828
"retry_params_name": "default",
2929
},
3030
"ListDatasets": {
31-
"timeout_millis": 30000,
31+
"timeout_millis": 60000,
3232
"retry_codes_name": "idempotent",
3333
"retry_params_name": "default",
3434
},
3535
"DeleteDataset": {
36-
"timeout_millis": 30000,
37-
"retry_codes_name": "idempotent",
36+
"timeout_millis": 60000,
37+
"retry_codes_name": "non_idempotent",
3838
"retry_params_name": "default",
3939
},
4040
"ImportData": {
41-
"timeout_millis": 30000,
41+
"timeout_millis": 60000,
4242
"retry_codes_name": "non_idempotent",
4343
"retry_params_name": "default",
4444
},
4545
"ExportData": {
46-
"timeout_millis": 30000,
47-
"retry_codes_name": "idempotent",
46+
"timeout_millis": 60000,
47+
"retry_codes_name": "non_idempotent",
4848
"retry_params_name": "default",
4949
},
5050
"GetDataItem": {
51-
"timeout_millis": 30000,
51+
"timeout_millis": 60000,
5252
"retry_codes_name": "idempotent",
5353
"retry_params_name": "default",
5454
},
5555
"ListDataItems": {
56-
"timeout_millis": 30000,
56+
"timeout_millis": 60000,
5757
"retry_codes_name": "idempotent",
5858
"retry_params_name": "default",
5959
},
6060
"GetAnnotatedDataset": {
61-
"timeout_millis": 30000,
61+
"timeout_millis": 60000,
6262
"retry_codes_name": "idempotent",
6363
"retry_params_name": "default",
6464
},
6565
"ListAnnotatedDatasets": {
66-
"timeout_millis": 30000,
66+
"timeout_millis": 60000,
6767
"retry_codes_name": "idempotent",
6868
"retry_params_name": "default",
6969
},
70+
"DeleteAnnotatedDataset": {
71+
"timeout_millis": 60000,
72+
"retry_codes_name": "non_idempotent",
73+
"retry_params_name": "default",
74+
},
7075
"LabelImage": {
71-
"timeout_millis": 30000,
76+
"timeout_millis": 60000,
7277
"retry_codes_name": "non_idempotent",
7378
"retry_params_name": "default",
7479
},
7580
"LabelVideo": {
76-
"timeout_millis": 30000,
81+
"timeout_millis": 60000,
7782
"retry_codes_name": "non_idempotent",
7883
"retry_params_name": "default",
7984
},
8085
"LabelText": {
81-
"timeout_millis": 30000,
86+
"timeout_millis": 60000,
8287
"retry_codes_name": "non_idempotent",
8388
"retry_params_name": "default",
8489
},
8590
"GetExample": {
86-
"timeout_millis": 30000,
91+
"timeout_millis": 60000,
8792
"retry_codes_name": "idempotent",
8893
"retry_params_name": "default",
8994
},
9095
"ListExamples": {
91-
"timeout_millis": 30000,
96+
"timeout_millis": 60000,
9297
"retry_codes_name": "idempotent",
9398
"retry_params_name": "default",
9499
},
95100
"CreateAnnotationSpecSet": {
96-
"timeout_millis": 30000,
101+
"timeout_millis": 60000,
97102
"retry_codes_name": "non_idempotent",
98103
"retry_params_name": "default",
99104
},
100105
"GetAnnotationSpecSet": {
101-
"timeout_millis": 30000,
106+
"timeout_millis": 60000,
102107
"retry_codes_name": "idempotent",
103108
"retry_params_name": "default",
104109
},
105110
"ListAnnotationSpecSets": {
106-
"timeout_millis": 30000,
111+
"timeout_millis": 60000,
107112
"retry_codes_name": "idempotent",
108113
"retry_params_name": "default",
109114
},
110115
"DeleteAnnotationSpecSet": {
111-
"timeout_millis": 30000,
112-
"retry_codes_name": "idempotent",
116+
"timeout_millis": 60000,
117+
"retry_codes_name": "non_idempotent",
113118
"retry_params_name": "default",
114119
},
115120
"CreateInstruction": {
116-
"timeout_millis": 30000,
121+
"timeout_millis": 60000,
117122
"retry_codes_name": "non_idempotent",
118123
"retry_params_name": "default",
119124
},
120125
"GetInstruction": {
121-
"timeout_millis": 30000,
126+
"timeout_millis": 60000,
122127
"retry_codes_name": "idempotent",
123128
"retry_params_name": "default",
124129
},
125130
"ListInstructions": {
126-
"timeout_millis": 30000,
131+
"timeout_millis": 60000,
127132
"retry_codes_name": "idempotent",
128133
"retry_params_name": "default",
129134
},
130135
"DeleteInstruction": {
131-
"timeout_millis": 30000,
132-
"retry_codes_name": "idempotent",
136+
"timeout_millis": 60000,
137+
"retry_codes_name": "non_idempotent",
133138
"retry_params_name": "default",
134139
},
135140
"GetEvaluation": {
@@ -174,19 +179,14 @@
174179
},
175180
"DeleteEvaluationJob": {
176181
"timeout_millis": 60000,
177-
"retry_codes_name": "idempotent",
182+
"retry_codes_name": "non_idempotent",
178183
"retry_params_name": "default",
179184
},
180185
"ListEvaluationJobs": {
181186
"timeout_millis": 60000,
182187
"retry_codes_name": "idempotent",
183188
"retry_params_name": "default",
184189
},
185-
"DeleteAnnotatedDataset": {
186-
"timeout_millis": 60000,
187-
"retry_codes_name": "non_idempotent",
188-
"retry_params_name": "default",
189-
},
190190
},
191191
}
192192
}

datalabeling/google/cloud/datalabeling_v1beta1/gapic/enums.py

+44-13
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# -*- coding: utf-8 -*-
22
#
3-
# Copyright 2019 Google LLC
3+
# Copyright 2020 Google LLC
44
#
55
# Licensed under the Apache License, Version 2.0 (the "License");
66
# you may not use this file except in compliance with the License.
@@ -34,7 +34,8 @@ class AnnotationSentiment(enum.IntEnum):
3434

3535
class AnnotationSource(enum.IntEnum):
3636
"""
37-
Specifies where is the answer from.
37+
Specifies where the annotation comes from (whether it was provided by a
38+
human labeler or a different source).
3839
3940
Attributes:
4041
ANNOTATION_SOURCE_UNSPECIFIED (int)
@@ -49,8 +50,9 @@ class AnnotationType(enum.IntEnum):
4950
"""
5051
Attributes:
5152
ANNOTATION_TYPE_UNSPECIFIED (int)
52-
IMAGE_CLASSIFICATION_ANNOTATION (int): Classification annotations in an image.
53-
IMAGE_BOUNDING_BOX_ANNOTATION (int): Bounding box annotations in an image.
53+
IMAGE_CLASSIFICATION_ANNOTATION (int): Classification annotations in an image. Allowed for continuous evaluation.
54+
IMAGE_BOUNDING_BOX_ANNOTATION (int): Bounding box annotations in an image. A form of image object detection.
55+
Allowed for continuous evaluation.
5456
IMAGE_ORIENTED_BOUNDING_BOX_ANNOTATION (int): Oriented bounding box. The box does not have to be parallel to horizontal
5557
line.
5658
IMAGE_BOUNDING_POLY_ANNOTATION (int): Bounding poly annotations in an image.
@@ -60,9 +62,9 @@ class AnnotationType(enum.IntEnum):
6062
VIDEO_OBJECT_TRACKING_ANNOTATION (int): Video object tracking annotation.
6163
VIDEO_OBJECT_DETECTION_ANNOTATION (int): Video object detection annotation.
6264
VIDEO_EVENT_ANNOTATION (int): Video event annotation.
63-
TEXT_CLASSIFICATION_ANNOTATION (int): Classification for text.
65+
TEXT_CLASSIFICATION_ANNOTATION (int): Classification for text. Allowed for continuous evaluation.
6466
TEXT_ENTITY_EXTRACTION_ANNOTATION (int): Entity extraction for text.
65-
GENERAL_CLASSIFICATION_ANNOTATION (int): General classification.
67+
GENERAL_CLASSIFICATION_ANNOTATION (int): General classification. Allowed for continuous evaluation.
6668
"""
6769

6870
ANNOTATION_TYPE_UNSPECIFIED = 0
@@ -85,10 +87,10 @@ class DataType(enum.IntEnum):
8587
"""
8688
Attributes:
8789
DATA_TYPE_UNSPECIFIED (int)
88-
IMAGE (int)
90+
IMAGE (int): Allowed for continuous evaluation.
8991
VIDEO (int)
90-
TEXT (int)
91-
GENERAL_DATA (int)
92+
TEXT (int): Allowed for continuous evaluation.
93+
GENERAL_DATA (int): Allowed for continuous evaluation.
9294
"""
9395

9496
DATA_TYPE_UNSPECIFIED = 0
@@ -120,10 +122,39 @@ class State(enum.IntEnum):
120122
121123
Attributes:
122124
STATE_UNSPECIFIED (int)
123-
SCHEDULED (int)
124-
RUNNING (int)
125-
PAUSED (int)
126-
STOPPED (int)
125+
SCHEDULED (int): The job is scheduled to run at the ``configured interval``. You can
126+
``pause`` or ``delete`` the job.
127+
128+
When the job is in this state, it samples prediction input and output
129+
from your model version into your BigQuery table as predictions occur.
130+
RUNNING (int): The job is currently running. When the job runs, Data Labeling Service
131+
does several things:
132+
133+
1. If you have configured your job to use Data Labeling Service for
134+
ground truth labeling, the service creates a ``Dataset`` and a
135+
labeling task for all data sampled since the last time the job ran.
136+
Human labelers provide ground truth labels for your data. Human
137+
labeling may take hours, or even days, depending on how much data has
138+
been sampled. The job remains in the ``RUNNING`` state during this
139+
time, and it can even be running multiple times in parallel if it
140+
gets triggered again (for example 24 hours later) before the earlier
141+
run has completed. When human labelers have finished labeling the
142+
data, the next step occurs. If you have configured your job to
143+
provide your own ground truth labels, Data Labeling Service still
144+
creates a ``Dataset`` for newly sampled data, but it expects that you
145+
have already added ground truth labels to the BigQuery table by this
146+
time. The next step occurs immediately.
147+
148+
2. Data Labeling Service creates an ``Evaluation`` by comparing your
149+
model version's predictions with the ground truth labels.
150+
151+
If the job remains in this state for a long time, it continues to sample
152+
prediction data into your BigQuery table and will run again at the next
153+
interval, even if it causes the job to run multiple times in parallel.
154+
PAUSED (int): The job is not sampling prediction input and output into your BigQuery
155+
table and it will not run according to its schedule. You can ``resume``
156+
the job.
157+
STOPPED (int): The job has this state right before it is deleted.
127158
"""
128159

129160
STATE_UNSPECIFIED = 0

0 commit comments

Comments
 (0)