Give user more control over docling processing - #509
Merged
Conversation
Closed
Contributor
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 21 out of 21 changed files in this pull request and generated 1 comment.
Suppressed comments (3)
examples/execution_basics/README.rst:151
- The JSON example is invalid (missing a comma after
trueand includes a trailing comma), and it also usesdocling_timeoutinstead of the implementeddocument_timeoutkey.
"pdf_pipeline_options": {
"do_ocr": true,
"do_table_structure": true
"docling_timeout": 1800,
}
compass/services/cpu.py:592
- _validate_docling_timeout validates the value taken from pdf_pipeline_options["document_timeout"], but the error message refers to
docling_timeout, which is confusing for users configuring Docling.
def _validate_docling_timeout(timeout):
"""Validate the configured Docling deadline"""
if (
isinstance(timeout, bool)
or not isinstance(timeout, (int, float))
or not math.isfinite(timeout)
or timeout <= 0
):
msg = "`docling_timeout` must be a positive number of seconds"
raise COMPASSValueError(msg)
examples/execution_basics/README.rst:140
- The docs describe configuring
docling_timeout, but the implementation and tests use Docling’sdocument_timeoutoption (passed viapdf_pipeline_options). As written, this will mislead users into setting a key that the code doesn’t read.
This issue also appears on line 147 of the same file.
**Docling conversion deadline**
When using the Docling file loader, set ``docling_timeout`` in
``file_loader_kwargs.pdf_pipeline_options`` to apply a wall-clock deadline to each document.
COMPASS runs the conversion in a disposable child process and terminates that
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Also adds option to use fast ELM parsing as fallback if docling processing fails.