From a095a7c5b76a7275ac7e75927f0c175e162a299e Mon Sep 17 00:00:00 2001 From: Maksym Lysak Date: Mon, 24 Feb 2025 15:13:59 +0100 Subject: [PATCH] removing changes from base_pipeline Signed-off-by: Maksym Lysak --- docling/pipeline/base_pipeline.py | 1 + docling/pipeline/vlm_pipeline.py | 2 +- pyproject.toml | 4 ++++ 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/docling/pipeline/base_pipeline.py b/docling/pipeline/base_pipeline.py index a0796349..1bf48ef0 100644 --- a/docling/pipeline/base_pipeline.py +++ b/docling/pipeline/base_pipeline.py @@ -206,6 +206,7 @@ class PaginatedPipeline(BasePipeline): # TODO this is a bad name. if conv_res.input._backend: conv_res.input._backend.unload() + return conv_res def _determine_status(self, conv_res: ConversionResult) -> ConversionStatus: diff --git a/docling/pipeline/vlm_pipeline.py b/docling/pipeline/vlm_pipeline.py index 6deb16b3..5e641ddc 100644 --- a/docling/pipeline/vlm_pipeline.py +++ b/docling/pipeline/vlm_pipeline.py @@ -374,7 +374,7 @@ class VlmPipeline(PaginatedPipeline): rf"{DocItemLabel.LIST_ITEM}|{DocItemLabel.FOOTNOTE}|{DocItemLabel.CODE}|" rf"{DocItemLabel.SECTION_HEADER}_level_1|otsl)>.*?" ) - + # DocumentToken.OTSL pattern = re.compile(tag_pattern, re.DOTALL) # Go through each match in order diff --git a/pyproject.toml b/pyproject.toml index 7bf71c69..02097d73 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -58,6 +58,7 @@ onnxruntime = [ { version = ">=1.7.0,<1.20.0", optional = true, markers = "python_version < '3.10'" }, { version = "^1.7.0", optional = true, markers = "python_version >= '3.10'" } ] + transformers = [ {markers = "sys_platform != 'darwin' or platform_machine != 'x86_64'", version = "^4.46.0", optional = true }, {markers = "sys_platform == 'darwin' and platform_machine == 'x86_64'", version = "~4.42.0", optional = true } @@ -65,6 +66,9 @@ transformers = [ pillow = ">=10.0.0,<12.0.0" tqdm = "^4.65.0" +# transformers = "^4.47.1" +# accelerate = "^1.2.1" + [tool.poetry.group.dev.dependencies] black = {extras = ["jupyter"], version = "^24.4.2"} pytest = "^7.2.2"