Use yield from correctly?

Signed-off-by: Vinay Damodaran <vrdn@hey.com>
This commit is contained in:
Vinay Damodaran 2025-05-07 20:50:52 -07:00
parent e82bcaae61
commit 45c5a9445a
2 changed files with 2 additions and 4 deletions

View File

@ -70,5 +70,4 @@ class ApiVlmModel(BasePageModel):
return page
with ThreadPoolExecutor(max_workers=concurrency) as executor:
for result in executor.map(_vlm_request, page_batch):
yield from result
yield from executor.map(_vlm_request, page_batch)

View File

@ -62,5 +62,4 @@ class PictureDescriptionApiModel(PictureDescriptionBaseModel):
)
with ThreadPoolExecutor(max_workers=concurrency) as executor:
for result in executor.map(_api_request, images):
yield from result
yield from executor.map(_api_request, images)