Skip to content

Preserve legacy picture description filters#105

Open
drukpa1455 wants to merge 1 commit intodocling-project:mainfrom
drukpa1455:drukpa1455/fix-picture-description-classification-filters
Open

Preserve legacy picture description filters#105
drukpa1455 wants to merge 1 commit intodocling-project:mainfrom
drukpa1455:drukpa1455/fix-picture-description-classification-filters

Conversation

@drukpa1455
Copy link

Summary

Legacy picture-description requests can carry a local/API model config, but they currently drop the classification filter fields before those options reach Docling core.

This patch keeps the legacy path honest:

  • preserve classification_allow
  • preserve classification_deny
  • preserve classification_min_confidence

Why

Docling core already supports classify-first-then-describe filtering.

The gap is in docling-jobkit:

  • PictureDescriptionLocal and PictureDescriptionApi do not define the classification filter fields
  • DoclingConverterManager later does model_dump() on those legacy models
  • so the filters disappear before PictureDescriptionVlmOptions / PictureDescriptionApiOptions are built

The result in docling-serve is surprising:

  • the request validates
  • selective picture description appears configured
  • but the filters are silently ignored

Changes

  • add the three classification filter fields to PictureDescriptionLocal
  • add the same fields to PictureDescriptionApi
  • add regression coverage proving the legacy request path preserves those fields into the final pipeline options

Test

uv run --directory /tmp/docling-jobkit-2345 pytest tests/test_options.py -q -k 'legacy_picture_description_filters_reach_pipeline_options or legacy_picture_description_api_filters_reach_pipeline_options'

Closes #104.

@github-actions
Copy link
Contributor

github-actions bot commented Mar 6, 2026

DCO Check Failed

Hi @drukpa1455, your pull request has failed the Developer Certificate of Origin (DCO) check.

This repository supports remediation commits, so you can fix this without rewriting history — but you must follow the required message format.


🛠 Quick Fix: Add a remediation commit

Run this command:

git commit --allow-empty -s -m "DCO Remediation Commit for drk <drukpa1455@gmail.com>

I, drk <drukpa1455@gmail.com>, hereby add my Signed-off-by to this commit: 748c9a98d29ab05d0c6e5da79ff652964f05c429"
git push

🔧 Advanced: Sign off each commit directly

For the latest commit:

git commit --amend --signoff
git push --force-with-lease

For multiple commits:

git rebase --signoff origin/main
git push --force-with-lease

More info: DCO check report

@mergify
Copy link

mergify bot commented Mar 6, 2026

Merge Protections

Your pull request matches the following merge protections and will not be merged until they are valid.

🔴 Enforce conventional commit

This rule is failing.

Make sure that we follow https://www.conventionalcommits.org/en/v1.0.0/

  • title ~= ^(fix|feat|docs|style|refactor|perf|test|build|ci|chore|revert)(?:\(.+\))?(!)?:

@dolfim-ibm dolfim-ibm self-requested a review March 6, 2026 11:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

legacy picture description filters are dropped before they reach Docling

1 participant