Skip to content

Give user more control over docling processing - #509

Merged
ppinchuk merged 57 commits into
mainfrom
pp/docling_guards
Aug 3, 2026
Merged

Give user more control over docling processing#509
ppinchuk merged 57 commits into
mainfrom
pp/docling_guards

Conversation

@ppinchuk

Copy link
Copy Markdown
Collaborator

Also adds option to use fast ELM parsing as fallback if docling processing fails.

@ppinchuk ppinchuk self-assigned this Jul 27, 2026
Copilot AI review requested due to automatic review settings July 27, 2026 21:40
@ppinchuk
ppinchuk requested a review from castelao as a code owner July 27, 2026 21:40
@ppinchuk ppinchuk added enhancement Update to logic or general code improvements topic-python-general Issues/pull requests related to python p-high Priority: high labels Jul 27, 2026
@ppinchuk ppinchuk linked an issue Aug 2, 2026 that may be closed by this pull request

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 true and includes a trailing comma), and it also uses docling_timeout instead of the implemented document_timeout key.
        "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’s document_timeout option (passed via pdf_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

Comment thread compass/services/cpu.py
@ppinchuk
ppinchuk merged commit 8b2418f into main Aug 3, 2026
23 checks passed
@ppinchuk
ppinchuk deleted the pp/docling_guards branch August 3, 2026 23:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement Update to logic or general code improvements p-high Priority: high topic-python-general Issues/pull requests related to python

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Slug-ify log file names

3 participants