mirror of
https://github.com/DS4SD/docling.git
synced 2025-12-08 12:48:28 +00:00
Fix page_range stopping at page 32 by using dynamic batch_size
Co-authored-by: cau-git <60343111+cau-git@users.noreply.github.com>
This commit is contained in:
@@ -252,7 +252,7 @@ class ThreadedLayoutVlmPipeline(BasePipeline):
|
|||||||
|
|
||||||
proc = ProcessingResult(total_expected=total_pages)
|
proc = ProcessingResult(total_expected=total_pages)
|
||||||
fed_idx = 0
|
fed_idx = 0
|
||||||
batch_size = 32
|
batch_size = total_pages
|
||||||
|
|
||||||
try:
|
try:
|
||||||
while proc.success_count + proc.failure_count < total_pages:
|
while proc.success_count + proc.failure_count < total_pages:
|
||||||
|
|||||||
@@ -545,7 +545,7 @@ class StandardPdfPipeline(ConvertPipeline):
|
|||||||
|
|
||||||
proc = ProcessingResult(total_expected=total_pages)
|
proc = ProcessingResult(total_expected=total_pages)
|
||||||
fed_idx: int = 0 # number of pages successfully queued
|
fed_idx: int = 0 # number of pages successfully queued
|
||||||
batch_size: int = 32 # drain chunk
|
batch_size: int = total_pages # drain chunk
|
||||||
try:
|
try:
|
||||||
while proc.success_count + proc.failure_count < total_pages:
|
while proc.success_count + proc.failure_count < total_pages:
|
||||||
# 1) feed - try to enqueue until the first queue is full
|
# 1) feed - try to enqueue until the first queue is full
|
||||||
|
|||||||
Reference in New Issue
Block a user