From 44e8bf6e8a6d9b1bfee121e4717a49a03d2262f0 Mon Sep 17 00:00:00 2001 From: Gaetan Lepage Date: Mon, 3 Mar 2025 10:31:54 +0100 Subject: [PATCH 1/2] python312Packages.docling-ibm-models: 3.3.2 -> 3.4.1 Diff: https://github.com/DS4SD/docling-ibm-models/compare/refs/tags/v3.3.2...v3.4.1 Changelog: https://github.com/DS4SD/docling-ibm-models/blob/v3.4.1/CHANGELOG.md --- .../docling-ibm-models/default.nix | 50 +++++++++++-------- 1 file changed, 29 insertions(+), 21 deletions(-) diff --git a/pkgs/development/python-modules/docling-ibm-models/default.nix b/pkgs/development/python-modules/docling-ibm-models/default.nix index 86c1c595d7b1..38137792b16c 100644 --- a/pkgs/development/python-modules/docling-ibm-models/default.nix +++ b/pkgs/development/python-modules/docling-ibm-models/default.nix @@ -2,31 +2,40 @@ lib, buildPythonPackage, fetchFromGitHub, + + # build-system poetry-core, + # dependencies - torch, - torchvision, - transformers, + docling-core, huggingface-hub, jsonlines, numpy, opencv-python-headless, pillow, - tqdm, + pydantic, safetensors, + torch, + torchvision, + tqdm, + transformers, + + # tests + datasets, pytestCheckHook, + writableTmpDirAsHomeHook, }: buildPythonPackage rec { pname = "docling-ibm-models"; - version = "3.3.2"; + version = "3.4.1"; pyproject = true; src = fetchFromGitHub { owner = "DS4SD"; repo = "docling-ibm-models"; tag = "v${version}"; - hash = "sha256-8mqDgbTj5g6jXEumj16Me9NjHLCOdR+pXmAwn2dghfg="; + hash = "sha256-IgKP+4en0N6xLBjzwmddDk8z5P3J1vo+UMW+65a01Ww="; }; build-system = [ @@ -34,21 +43,21 @@ buildPythonPackage rec { ]; dependencies = [ + docling-core + huggingface-hub + jsonlines + numpy + opencv-python-headless + pillow + pydantic + safetensors torch torchvision - transformers - numpy - jsonlines - pillow tqdm - opencv-python-headless - huggingface-hub - safetensors + transformers ]; pythonRelaxDeps = [ - "pillow" - "torchvision" "transformers" "numpy" ]; @@ -58,19 +67,18 @@ buildPythonPackage rec { ]; nativeCheckInputs = [ + datasets pytestCheckHook + writableTmpDirAsHomeHook ]; - preCheck = '' - export HOME="$TEMPDIR" - ''; - disabledTests = [ # Requires network access - "test_layoutpredictor" - "test_tf_predictor" "test_code_formula_predictor" # huggingface_hub.errors.LocalEntryNotFoundError "test_figure_classifier" # huggingface_hub.errors.LocalEntryNotFoundError + "test_layoutpredictor" + "test_readingorder" + "test_tf_predictor" ]; meta = { From 4c5af10411bc08932cde9badaec212b988ce6c5b Mon Sep 17 00:00:00 2001 From: Gaetan Lepage Date: Mon, 3 Mar 2025 10:28:51 +0100 Subject: [PATCH 2/2] python312Packages.docling: 2.23.0 -> 2.25.1 Diff: https://github.com/DS4SD/docling/compare/refs/tags/v2.23.0...v2.25.1 Changelog: https://github.com/DS4SD/docling/blob/refs/tags/v2.25.1/CHANGELOG.md --- .../python-modules/docling/default.nix | 21 ++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/pkgs/development/python-modules/docling/default.nix b/pkgs/development/python-modules/docling/default.nix index bd0de9cf152a..e878ac9cfb87 100644 --- a/pkgs/development/python-modules/docling/default.nix +++ b/pkgs/development/python-modules/docling/default.nix @@ -9,7 +9,6 @@ # dependencies beautifulsoup4, certifi, - deepsearch-glm, docling-core, docling-ibm-models, docling-parse, @@ -49,14 +48,14 @@ buildPythonPackage rec { pname = "docling"; - version = "2.23.0"; + version = "2.25.1"; pyproject = true; src = fetchFromGitHub { owner = "DS4SD"; repo = "docling"; tag = "v${version}"; - hash = "sha256-ySywKaLxjtgQM7RtzJrxZDS3z8uMwAwPDYO51uKHT28="; + hash = "sha256-uJZIwXVwGd9xDBQkZ/uz2XLJ+lL1ZAZHJv/jHtW/LCk="; }; build-system = [ @@ -66,7 +65,6 @@ buildPythonPackage rec { dependencies = [ beautifulsoup4 certifi - deepsearch-glm docling-core docling-ibm-models docling-parse @@ -133,6 +131,19 @@ buildPythonPackage rec { "test_e2e_pdfs_conversions" # AssertionError: ## TableFormer: Table Structure Understanding with Transf "test_e2e_conversions" # RuntimeError: Tesseract is not available + # AssertionError + # assert doc.export_to_markdown() == pair[1], f"Error in case {idx}" + "test_ordered_lists" + + # AssertionError: export to md + "test_e2e_html_conversions" + + # AssertionError: assert 'Unordered li...d code block:' == 'Unordered li...d code block:' + "test_convert_valid" + + # AssertionError: Markdown file mismatch against groundtruth pftaps057006474.md + "test_patent_groundtruth" + # huggingface_hub.errors.LocalEntryNotFoundError: An error happened "test_cli_convert" "test_code_and_formula_conversion" @@ -152,7 +163,7 @@ buildPythonPackage rec { meta = { description = "Get your documents ready for gen AI"; homepage = "https://github.com/DS4SD/docling"; - changelog = "https://github.com/DS4SD/docling/blob/${src.rev}/CHANGELOG.md"; + changelog = "https://github.com/DS4SD/docling/blob/v${version}/CHANGELOG.md"; license = lib.licenses.mit; maintainers = with lib.maintainers; [ happysalada ]; mainProgram = "docling";