Skip to content

⚡ Bolt: Disable verbose output in YOLO predictions - #11

Draft
kingkillery wants to merge 1 commit into
mainfrom
bolt-optimize-yolo-inference-10868000950469200779
Draft

⚡ Bolt: Disable verbose output in YOLO predictions#11
kingkillery wants to merge 1 commit into
mainfrom
bolt-optimize-yolo-inference-10868000950469200779

Conversation

@kingkillery

@kingkillery kingkillery commented Apr 9, 2026

Copy link
Copy Markdown
Owner

💡 What:
Added verbose=False to the Ultralytics YOLO model.predict() calls inside extract_widgets (for both fast/ONNX and regular execution paths).

🎯 Why:
By default, Ultralytics YOLO prints detection summaries to stdout. This synchronous logging acts as a blocking I/O operation which can significantly slow down the inference loop, especially when processing multiple pages/images. Disabling it prevents this blocking overhead.

📊 Impact:
Expected inference time reduction per page by eliminating I/O blocking overhead, resulting in a cleaner and faster execution cycle when parsing multi-page documents.

🔬 Measurement:
Compare processing time of a multi-page PDF before and after this change. The test suite pass without regression. Run:
uv run -m pytest
uv run ruff check commonforms/ tests/


PR created automatically by Jules for task 10868000950469200779 started by @kingkillery

Summary by CodeRabbit

Release Notes

  • Bug Fixes

    • Reduced prediction processing overhead by optimizing output verbosity in model inference operations, particularly when executing multiple sequential predictions.
  • Documentation

    • Added internal documentation detailing model prediction performance characteristics and optimization considerations.

Added `verbose=False` to `model.predict()` calls in `extract_widgets`
to prevent synchronous stdout blocking overhead during inference loops.

Co-authored-by: kingkillery <200727508+kingkillery@users.noreply.github.com>
@google-labs-jules

Copy link
Copy Markdown

👋 Jules, reporting for duty! I'm here to lend a hand with this pull request.

When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down.

I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job!

For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!

New to Jules? Learn more at jules.google/docs.


For security, I will only act on instructions from the user who triggered this task.

@coderabbitai

coderabbitai Bot commented Apr 9, 2026

Copy link
Copy Markdown

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: f07ce552-a93e-4fce-8fbf-cb51ad3c0410

📥 Commits

Reviewing files that changed from the base of the PR and between e00f2d1 and c9c8355.

📒 Files selected for processing (2)
  • .jules/bolt.md
  • commonforms/inference.py

Walkthrough

Added documentation and configuration changes to suppress verbose output from YOLO model predictions. A new note file documents performance overhead from stdout blocking, while code modifications set verbose=False in the extract_widgets function's prediction calls across both inference modes.

Changes

Cohort / File(s) Summary
Documentation
.jules/bolt.md
New dated entry documenting that verbose YOLO prediction output causes synchronous stdout blocking overhead, recommending verbose=False to mitigate.
Inference Configuration
commonforms/inference.py
Added verbose=False parameter to self.model.predict() calls in both fast (per-page ONNX) and non-fast (batched PyTorch) branches of extract_widgets function.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

🐰 Silence is golden, the rabbit did say,
When models predict in their chatterbox way!
With verbose=False, the output flows free,
And performance blooms like a carrot-filled tree! 🥕

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely summarizes the main change: disabling verbose output in YOLO predictions to improve performance.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch bolt-optimize-yolo-inference-10868000950469200779

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

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