Skip to content

Commit 6c39e0b

Browse files
authored
Clarifying comment for batch requests (#3071)
* Clarifying comment for batch requests * vision: fixing linter for batch
1 parent 9b85e57 commit 6c39e0b

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

vision/cloud-client/detect/vision_async_batch_annotate_images.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,12 +31,17 @@ def sample_async_batch_annotate_images(
3131
{"type": enums.Feature.Type.LABEL_DETECTION},
3232
{"type": enums.Feature.Type.IMAGE_PROPERTIES},
3333
]
34+
35+
# Each requests element corresponds to a single image. To annotate more
36+
# images, create a request element for each image and add it to
37+
# the array of requests
3438
requests = [{"image": image, "features": features}]
3539
gcs_destination = {"uri": output_uri}
3640

3741
# The max number of responses to output in each JSON file
3842
batch_size = 2
39-
output_config = {"gcs_destination": gcs_destination, "batch_size": batch_size}
43+
output_config = {"gcs_destination": gcs_destination,
44+
"batch_size": batch_size}
4045

4146
operation = client.async_batch_annotate_images(requests, output_config)
4247

0 commit comments

Comments
 (0)