Skip to content

Commit

Permalink
Clarifying comment for batch requests (#3071)
Browse files Browse the repository at this point in the history
* Clarifying comment for batch requests

* vision: fixing linter for batch
  • Loading branch information
czahedi authored Mar 11, 2020
1 parent 9b85e57 commit 6c39e0b
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,17 @@ def sample_async_batch_annotate_images(
{"type": enums.Feature.Type.LABEL_DETECTION},
{"type": enums.Feature.Type.IMAGE_PROPERTIES},
]

# Each requests element corresponds to a single image. To annotate more
# images, create a request element for each image and add it to
# the array of requests
requests = [{"image": image, "features": features}]
gcs_destination = {"uri": output_uri}

# The max number of responses to output in each JSON file
batch_size = 2
output_config = {"gcs_destination": gcs_destination, "batch_size": batch_size}
output_config = {"gcs_destination": gcs_destination,
"batch_size": batch_size}

operation = client.async_batch_annotate_images(requests, output_config)

Expand Down

0 comments on commit 6c39e0b

Please sign in to comment.