Skip to content

fix: constrain numpy<2.4 and document format_block_content image path behavior#5046

Open
TingquanGao wants to merge 1 commit intoPaddlePaddle:developfrom
TingquanGao:fix_issues
Open

fix: constrain numpy<2.4 and document format_block_content image path behavior#5046
TingquanGao wants to merge 1 commit intoPaddlePaddle:developfrom
TingquanGao:fix_issues

Conversation

@TingquanGao
Copy link
Copy Markdown
Collaborator

@TingquanGao TingquanGao commented Mar 16, 2026

Summary

Changes

  • `setup.py`: Add numpy upper bound `< 2.4`
  • `docs/pipeline_usage/tutorials/ocr_pipelines/PaddleOCR-VL.md`: Supplement `format_block_content` description
  • `docs/pipeline_usage/tutorials/ocr_pipelines/PaddleOCR-VL.en.md`: Supplement `format_block_content` description
  • `docs/pipeline_usage/tutorials/ocr_pipelines/PP-StructureV3.md`: Supplement `format_block_content` description
  • `docs/pipeline_usage/tutorials/ocr_pipelines/PP-StructureV3.en.md`: Supplement `format_block_content` description

Test plan

  • Verify `numpy>=2.4` is no longer installed when following PaddleX install instructions
  • Verify JSON output contains image paths when `format_block_content=True`
  • Verify JSON output does NOT contain image paths when `format_block_content=False`

Fixes PaddlePaddle/PaddleOCR#17495
Fixes PaddlePaddle/PaddleOCR#17143

🤖 Generated with Claude Code

… behavior

- Constrain numpy version to >=1.24,<2.4 in setup.py to avoid
  incompatibility with numpy>=2.4 where implicit scalar conversion
  raises TypeError instead of DeprecationWarning (fixes #17495)
- Supplement docs for format_block_content parameter in PaddleOCR-VL
  and PP-StructureV3 pipelines to clarify that image-type block's
  block_content includes image path (e.g. <img src="..." />) only when
  format_block_content=True; when False (default) only OCR text is
  included without image paths (fixes #17143)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@paddle-bot
Copy link
Copy Markdown

paddle-bot bot commented Mar 16, 2026

Thanks for your contribution!

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.

1 participant