fix(pipeline): default missing feature configs - #5371
Open
RerankerGuo wants to merge 1 commit into
Open
Conversation
RerankerGuo
force-pushed
the
fix/issue-5317-missing-pipeline-config
branch
from
August 8, 2026 12:03
abbd2bc to
5c1542a
Compare
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.
Motivation
Fixes #5317.
MineruPipelineModelassumes bothformula_configandtable_configaredictionaries. Direct integrations that omit either optional config, or pass
it as
None, fail before model initialization:The standard CLI supplies both dictionaries, but the model class accepts
keyword arguments directly and should preserve its documented default-enabled
behavior when those optional dictionaries are absent.
Modification
Noneformula_configto an empty dictionary.Nonetable_configto an empty dictionary.None, and explicit{"enable": False}values.GPU is required.
BC-breaking (Optional)
No. Missing configs now use the existing default of
enable=True. Explicitenable=Falsevalues remain unchanged.Verification
The same regression test was run against the original and patched code.
Before:
After:
Commands:
PYTHONPATH=. uv run --python 3.12 --with pytest --with torch \ --with torchvision --with loguru --with numpy --with opencv-python \ --with transformers --with modelscope --with pypdfium2 --with pypdf \ --with pdftext --with pillow --with shapely --with pyclipper \ --with onnxruntime --with fast-langdetect --with six \ --with beautifulsoup4 --no-project pytest -q -o addopts='' \ tests/unittest/test_pipeline_model_config.py uvx ruff check --ignore ANN mineru/backend/pipeline/model_init.py uvx ruff check tests/unittest/test_pipeline_model_config.pyNo model or GPU end-to-end run is needed for this constructor-level change;
the regression test replaces all atom model factories and exercises the
configuration boundary directly.
Checklist
Before PR:
After PR: