Repository navigation
fix(mineru): honor dataset language in figure prompts - #18188
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (3)
📝 WalkthroughWalkthroughMinerU now normalizes missing dataset languages to English and forwards explicit languages to VLM image-description prompts. Tests cover parser behavior and propagation from ChangesMinerU language-aware image descriptions
Estimated code review effort: 2 (Simple) | ~10 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #18188 +/- ##
==========================================
- Coverage 94.56% 90.65% -3.91%
==========================================
Files 10 10
Lines 717 717
Branches 118 118
==========================================
- Hits 678 650 -28
- Misses 25 39 +14
- Partials 14 28 +14 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Summary
Closes #17885.
MinerU figure enrichment now passes the resolved dataset language to
vision_llm_figure_describe_prompt. Missing and empty language values useEnglish, matching the other figure-description paths.This change is limited to MinerU. PR #18021 already fixed the Mistral path.
Root cause
by_minerupassedlangtoMinerUParser.parse_pdf, but the parser did not pass it to_enhance_images_with_vlm. The helper then called the prompt factory without a language, so figure descriptions used the English prompt for non-English datasets.Tests
6 failed, 11 deselected.pytest -q test/unit_test/deepdoc/parser/test_mineru_parser.py:17 passed.pytest -q --confcutdir=test/unit_test/rag/app test/unit_test/rag/app/test_vision_language_callers.py:9 passed.pytest -q test/unit_test/deepdoc/parser/test_mistral_parser.py:38 passed.ruff format --checkpassed for all three changed files.ruff checkreports the same 29 pre-existing findings as the base revision; this patch adds none.git diff --checkpassed.