mirror of
https://github.com/DS4SD/docling.git
synced 2025-12-08 20:58:11 +00:00
perf: Clean up resources with docling-parse v4, no parsed_page output by default (#2105)
* Call PdfDocument.unload_pages from the pipelines where needed, delete parsed_page data unless requested to keep Signed-off-by: Christoph Auer <cau@zurich.ibm.com> * pin docling-parse and update lock Signed-off-by: Michele Dolfi <dol@zurich.ibm.com> * Reinstate pipeline_options.generate_parsed_page Signed-off-by: Christoph Auer <cau@zurich.ibm.com> --------- Signed-off-by: Christoph Auer <cau@zurich.ibm.com> Signed-off-by: Michele Dolfi <dol@zurich.ibm.com> Co-authored-by: Michele Dolfi <dol@zurich.ibm.com>
This commit is contained in:
@@ -3,6 +3,7 @@ from pathlib import Path
|
||||
|
||||
import pytest
|
||||
|
||||
from docling.datamodel.accelerator_options import AcceleratorDevice
|
||||
from docling.datamodel.base_models import DocumentStream, InputFormat
|
||||
from docling.datamodel.pipeline_options import PdfPipelineOptions
|
||||
from docling.document_converter import DocumentConverter, PdfFormatOption
|
||||
@@ -24,6 +25,8 @@ def converter():
|
||||
pipeline_options.do_ocr = False
|
||||
pipeline_options.do_table_structure = True
|
||||
pipeline_options.table_structure_options.do_cell_matching = True
|
||||
pipeline_options.accelerator_options.device = AcceleratorDevice.CPU
|
||||
pipeline_options.generate_parsed_pages = True
|
||||
|
||||
converter = DocumentConverter(
|
||||
format_options={
|
||||
|
||||
Reference in New Issue
Block a user