Skip to content

Commit

Permalink
docs(datalabeling): update docstrings; bump copyright year to 2020 (v…
Browse files Browse the repository at this point in the history
…ia synth) (#10229)
  • Loading branch information
yoshi-automation authored Jan 30, 2020
1 parent 96b9553 commit 21766c4
Show file tree
Hide file tree
Showing 29 changed files with 2,343 additions and 4,719 deletions.
2 changes: 1 addition & 1 deletion datalabeling/google/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
#
# Copyright 2019 Google LLC
# 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.
Expand Down
2 changes: 1 addition & 1 deletion datalabeling/google/cloud/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
#
# Copyright 2019 Google LLC
# 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.
Expand Down
2 changes: 1 addition & 1 deletion datalabeling/google/cloud/datalabeling.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
#
# Copyright 2019 Google LLC
# 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.
Expand Down

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -9,127 +9,132 @@
"default": {
"initial_retry_delay_millis": 100,
"retry_delay_multiplier": 1.3,
"max_retry_delay_millis": 30000,
"max_retry_delay_millis": 60000,
"initial_rpc_timeout_millis": 20000,
"rpc_timeout_multiplier": 1.0,
"max_rpc_timeout_millis": 20000,
"total_timeout_millis": 300000,
"total_timeout_millis": 600000,
}
},
"methods": {
"CreateDataset": {
"timeout_millis": 30000,
"timeout_millis": 60000,
"retry_codes_name": "non_idempotent",
"retry_params_name": "default",
},
"GetDataset": {
"timeout_millis": 30000,
"timeout_millis": 60000,
"retry_codes_name": "idempotent",
"retry_params_name": "default",
},
"ListDatasets": {
"timeout_millis": 30000,
"timeout_millis": 60000,
"retry_codes_name": "idempotent",
"retry_params_name": "default",
},
"DeleteDataset": {
"timeout_millis": 30000,
"retry_codes_name": "idempotent",
"timeout_millis": 60000,
"retry_codes_name": "non_idempotent",
"retry_params_name": "default",
},
"ImportData": {
"timeout_millis": 30000,
"timeout_millis": 60000,
"retry_codes_name": "non_idempotent",
"retry_params_name": "default",
},
"ExportData": {
"timeout_millis": 30000,
"retry_codes_name": "idempotent",
"timeout_millis": 60000,
"retry_codes_name": "non_idempotent",
"retry_params_name": "default",
},
"GetDataItem": {
"timeout_millis": 30000,
"timeout_millis": 60000,
"retry_codes_name": "idempotent",
"retry_params_name": "default",
},
"ListDataItems": {
"timeout_millis": 30000,
"timeout_millis": 60000,
"retry_codes_name": "idempotent",
"retry_params_name": "default",
},
"GetAnnotatedDataset": {
"timeout_millis": 30000,
"timeout_millis": 60000,
"retry_codes_name": "idempotent",
"retry_params_name": "default",
},
"ListAnnotatedDatasets": {
"timeout_millis": 30000,
"timeout_millis": 60000,
"retry_codes_name": "idempotent",
"retry_params_name": "default",
},
"DeleteAnnotatedDataset": {
"timeout_millis": 60000,
"retry_codes_name": "non_idempotent",
"retry_params_name": "default",
},
"LabelImage": {
"timeout_millis": 30000,
"timeout_millis": 60000,
"retry_codes_name": "non_idempotent",
"retry_params_name": "default",
},
"LabelVideo": {
"timeout_millis": 30000,
"timeout_millis": 60000,
"retry_codes_name": "non_idempotent",
"retry_params_name": "default",
},
"LabelText": {
"timeout_millis": 30000,
"timeout_millis": 60000,
"retry_codes_name": "non_idempotent",
"retry_params_name": "default",
},
"GetExample": {
"timeout_millis": 30000,
"timeout_millis": 60000,
"retry_codes_name": "idempotent",
"retry_params_name": "default",
},
"ListExamples": {
"timeout_millis": 30000,
"timeout_millis": 60000,
"retry_codes_name": "idempotent",
"retry_params_name": "default",
},
"CreateAnnotationSpecSet": {
"timeout_millis": 30000,
"timeout_millis": 60000,
"retry_codes_name": "non_idempotent",
"retry_params_name": "default",
},
"GetAnnotationSpecSet": {
"timeout_millis": 30000,
"timeout_millis": 60000,
"retry_codes_name": "idempotent",
"retry_params_name": "default",
},
"ListAnnotationSpecSets": {
"timeout_millis": 30000,
"timeout_millis": 60000,
"retry_codes_name": "idempotent",
"retry_params_name": "default",
},
"DeleteAnnotationSpecSet": {
"timeout_millis": 30000,
"retry_codes_name": "idempotent",
"timeout_millis": 60000,
"retry_codes_name": "non_idempotent",
"retry_params_name": "default",
},
"CreateInstruction": {
"timeout_millis": 30000,
"timeout_millis": 60000,
"retry_codes_name": "non_idempotent",
"retry_params_name": "default",
},
"GetInstruction": {
"timeout_millis": 30000,
"timeout_millis": 60000,
"retry_codes_name": "idempotent",
"retry_params_name": "default",
},
"ListInstructions": {
"timeout_millis": 30000,
"timeout_millis": 60000,
"retry_codes_name": "idempotent",
"retry_params_name": "default",
},
"DeleteInstruction": {
"timeout_millis": 30000,
"retry_codes_name": "idempotent",
"timeout_millis": 60000,
"retry_codes_name": "non_idempotent",
"retry_params_name": "default",
},
"GetEvaluation": {
Expand Down Expand Up @@ -174,19 +179,14 @@
},
"DeleteEvaluationJob": {
"timeout_millis": 60000,
"retry_codes_name": "idempotent",
"retry_codes_name": "non_idempotent",
"retry_params_name": "default",
},
"ListEvaluationJobs": {
"timeout_millis": 60000,
"retry_codes_name": "idempotent",
"retry_params_name": "default",
},
"DeleteAnnotatedDataset": {
"timeout_millis": 60000,
"retry_codes_name": "non_idempotent",
"retry_params_name": "default",
},
},
}
}
Expand Down
57 changes: 44 additions & 13 deletions datalabeling/google/cloud/datalabeling_v1beta1/gapic/enums.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
#
# Copyright 2019 Google LLC
# 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.
Expand Down Expand Up @@ -34,7 +34,8 @@ class AnnotationSentiment(enum.IntEnum):

class AnnotationSource(enum.IntEnum):
"""
Specifies where is the answer from.
Specifies where the annotation comes from (whether it was provided by a
human labeler or a different source).
Attributes:
ANNOTATION_SOURCE_UNSPECIFIED (int)
Expand All @@ -49,8 +50,9 @@ class AnnotationType(enum.IntEnum):
"""
Attributes:
ANNOTATION_TYPE_UNSPECIFIED (int)
IMAGE_CLASSIFICATION_ANNOTATION (int): Classification annotations in an image.
IMAGE_BOUNDING_BOX_ANNOTATION (int): Bounding box annotations in an image.
IMAGE_CLASSIFICATION_ANNOTATION (int): Classification annotations in an image. Allowed for continuous evaluation.
IMAGE_BOUNDING_BOX_ANNOTATION (int): Bounding box annotations in an image. A form of image object detection.
Allowed for continuous evaluation.
IMAGE_ORIENTED_BOUNDING_BOX_ANNOTATION (int): Oriented bounding box. The box does not have to be parallel to horizontal
line.
IMAGE_BOUNDING_POLY_ANNOTATION (int): Bounding poly annotations in an image.
Expand All @@ -60,9 +62,9 @@ class AnnotationType(enum.IntEnum):
VIDEO_OBJECT_TRACKING_ANNOTATION (int): Video object tracking annotation.
VIDEO_OBJECT_DETECTION_ANNOTATION (int): Video object detection annotation.
VIDEO_EVENT_ANNOTATION (int): Video event annotation.
TEXT_CLASSIFICATION_ANNOTATION (int): Classification for text.
TEXT_CLASSIFICATION_ANNOTATION (int): Classification for text. Allowed for continuous evaluation.
TEXT_ENTITY_EXTRACTION_ANNOTATION (int): Entity extraction for text.
GENERAL_CLASSIFICATION_ANNOTATION (int): General classification.
GENERAL_CLASSIFICATION_ANNOTATION (int): General classification. Allowed for continuous evaluation.
"""

ANNOTATION_TYPE_UNSPECIFIED = 0
Expand All @@ -85,10 +87,10 @@ class DataType(enum.IntEnum):
"""
Attributes:
DATA_TYPE_UNSPECIFIED (int)
IMAGE (int)
IMAGE (int): Allowed for continuous evaluation.
VIDEO (int)
TEXT (int)
GENERAL_DATA (int)
TEXT (int): Allowed for continuous evaluation.
GENERAL_DATA (int): Allowed for continuous evaluation.
"""

DATA_TYPE_UNSPECIFIED = 0
Expand Down Expand Up @@ -120,10 +122,39 @@ class State(enum.IntEnum):
Attributes:
STATE_UNSPECIFIED (int)
SCHEDULED (int)
RUNNING (int)
PAUSED (int)
STOPPED (int)
SCHEDULED (int): The job is scheduled to run at the ``configured interval``. You can
``pause`` or ``delete`` the job.
When the job is in this state, it samples prediction input and output
from your model version into your BigQuery table as predictions occur.
RUNNING (int): The job is currently running. When the job runs, Data Labeling Service
does several things:
1. If you have configured your job to use Data Labeling Service for
ground truth labeling, the service creates a ``Dataset`` and a
labeling task for all data sampled since the last time the job ran.
Human labelers provide ground truth labels for your data. Human
labeling may take hours, or even days, depending on how much data has
been sampled. The job remains in the ``RUNNING`` state during this
time, and it can even be running multiple times in parallel if it
gets triggered again (for example 24 hours later) before the earlier
run has completed. When human labelers have finished labeling the
data, the next step occurs. If you have configured your job to
provide your own ground truth labels, Data Labeling Service still
creates a ``Dataset`` for newly sampled data, but it expects that you
have already added ground truth labels to the BigQuery table by this
time. The next step occurs immediately.
2. Data Labeling Service creates an ``Evaluation`` by comparing your
model version's predictions with the ground truth labels.
If the job remains in this state for a long time, it continues to sample
prediction data into your BigQuery table and will run again at the next
interval, even if it causes the job to run multiple times in parallel.
PAUSED (int): The job is not sampling prediction input and output into your BigQuery
table and it will not run according to its schedule. You can ``resume``
the job.
STOPPED (int): The job has this state right before it is deleted.
"""

STATE_UNSPECIFIED = 0
Expand Down
Loading

0 comments on commit 21766c4

Please sign in to comment.