Repository navigation
Conversation
Because docling uses PyTorch, which on OSX uses MPS, it silently crashes the subprocess resulting in like a no text found. It is interesting that this is a new error. That didn't happen before. Since this is an OSX only change, it shouldn't affect our production runs.
There was a problem hiding this comment.
🟢 Approval recommended
The focused platform check addresses the macOS crash while preserving existing behavior elsewhere.
0 open findings
What changed in this PR
Updates Docling subprocess creation to avoid PyTorch/MPS crashes on macOS.
Changes:
- Uses
spawnon macOS or whenforkis unavailable. - Retains
forkon supported non-macOS platforms.
| File | Description |
|---|---|
compass/services/cpu.py |
Selects a platform-safe multiprocessing start method for Docling. |
🧠 Review effort: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Codecov Report❌ Patch coverage is
❌ Your patch status has failed because the patch coverage (60.00%) is below the target coverage (80.00%). You can increase the patch coverage or adjust the target coverage. Additional details and impacted files@@ Coverage Diff @@
## main #577 +/- ##
==========================================
+ Coverage 66.72% 69.55% +2.82%
==========================================
Files 78 80 +2
Lines 7751 8166 +415
Branches 788 862 +74
==========================================
+ Hits 5172 5680 +508
+ Misses 2404 2301 -103
- Partials 175 185 +10
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
ppinchuk
left a comment
There was a problem hiding this comment.
Is there any way we can add a test for this?
Bonus points if we can show that a test fails in CI for this particular case
Because docling uses PyTorch, which on OSX uses MPS, it silently crashes the subprocess resulting in like a no text found.
It is interesting that this is a new error. That didn't happen before. Since this is an OSX only change, it shouldn't affect our production runs.