diff --git a/CHANGELOG.md b/CHANGELOG.md index 07a240c5..94e773c2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,9 @@ +## [v1.18.0](https://github.com/DS4SD/docling/releases/tag/v1.18.0) - 2024-10-03 + +### Feature + +* New torch-based docling models ([#120](https://github.com/DS4SD/docling/issues/120)) ([`2422f70`](https://github.com/DS4SD/docling/commit/2422f706a1b02a679bcbaaba097fef2f69aba0f4)) + ## [v1.17.0](https://github.com/DS4SD/docling/releases/tag/v1.17.0) - 2024-10-03 ### Feature diff --git a/docling/document_converter.py b/docling/document_converter.py index a4c55ab7..3eac36dd 100644 --- a/docling/document_converter.py +++ b/docling/document_converter.py @@ -199,9 +199,6 @@ class DocumentConverter: end_pb_time = time.time() - start_pb_time _log.info(f"Finished converting page batch time={end_pb_time:.3f}") - # Free up mem resources of PDF backend - in_doc._backend.unload() - conv_res.pages = all_assembled_pages self._assemble_doc(conv_res) @@ -227,6 +224,11 @@ class DocumentConverter: f"{trace}" ) + finally: + # Always unload the PDF backend, even in case of failure + if in_doc._backend: + in_doc._backend.unload() + end_doc_time = time.time() - start_doc_time _log.info( f"Finished converting document time-pages={end_doc_time:.2f}/{in_doc.page_count}" diff --git a/pyproject.toml b/pyproject.toml index 1ac9e5a0..41d21cfa 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "docling" -version = "1.17.0" # DO NOT EDIT, updated automatically +version = "1.18.0" # DO NOT EDIT, updated automatically description = "Docling PDF conversion package" authors = ["Christoph Auer ", "Michele Dolfi ", "Maxim Lysak ", "Nikos Livathinos ", "Ahmed Nassar ", "Peter Staar "] license = "MIT"