Skip to content

Commit

Permalink
Flipped keep_backend to True for vlm_pipeline assembly to work
Browse files Browse the repository at this point in the history
Signed-off-by: Maksym Lysak <[email protected]>
  • Loading branch information
Maksym Lysak committed Jan 16, 2025
1 parent 632a4f4 commit 354c90a
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions docling/pipeline/base_pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ class PaginatedPipeline(BasePipeline): # TODO this is a bad name.

def __init__(self, pipeline_options: PipelineOptions):
super().__init__(pipeline_options)
self.keep_backend = False
self.keep_backend = True

def _apply_on_pages(
self, conv_res: ConversionResult, page_batch: Iterable[Page]
Expand Down Expand Up @@ -198,12 +198,12 @@ def _build_document(self, conv_res: ConversionResult) -> ConversionResult:
return conv_res

def _unload(self, conv_res: ConversionResult) -> ConversionResult:
# for page in conv_res.pages:
# if page._backend is not None:
# page._backend.unload()
for page in conv_res.pages:
if page._backend is not None:
page._backend.unload()

# if conv_res.input._backend:
# conv_res.input._backend.unload()
if conv_res.input._backend:
conv_res.input._backend.unload()
return conv_res

def _determine_status(self, conv_res: ConversionResult) -> ConversionStatus:
Expand Down

0 comments on commit 354c90a

Please sign in to comment.