Repository navigation
fix: preserve explicit cuda selection in parallel workers - #770
Conversation
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configuration
📒 Files selected for processing (1)
💤 Files with no reviewable changes (1)
Included review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 7 remain after this review. 📝 WalkthroughWalkthrough
Priority: ⬇️ Low Estimated code review effort: 1 (Trivial) | ~5 minutes Change: Bug fix Merge Risk: ⚪ Minimal · up to This change makes parallel workers respect an explicit cuda selection, including CPU-only requests, while still assigning device IDs round-robin. No merge-blocking risk was identified. Security Architecture ReviewSecurity architecture risk: ⚪ Minimal · up to The change consistently preserves the pool’s device selection without introducing a new privilege boundary or weakening existing provider checks. No material security risk was identified in the reviewed change. Retained concerns Security review detailsSecurity Blast Radius
Trust Boundaries and Controls
Resilience and Maintainability Implications
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
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 |
When
device_idsis absent or empty,ParallelWorkerPool.start()omits its cuda setting from worker options. An explicitcuda=FalseCPU request can therefore be lost when the worker reconstructs its model with an automatic default.This always forwards the pool's cuda setting, while retaining round-robin device assignment. Tests run real child processes and reporting workers without a GPU or model download. They cover Boolean and Device enum selections, absent/empty/explicit device IDs, ordering, other options, and the pool option's precedence over conflicting worker kwargs. GPU inference was not tested.
Validation on Windows 11, Python 3.13.5, NumPy 2.3.5, FastEmbed 0.8.1:
python -m pytest -q tests/test_parallel_cuda_forwarding.py tests/test_parallel_processor.py.The full model/OS/Python CI matrix was not run locally.
Split from #766 following the maintainer's request for one PR per problem. This branch is based directly on current main and contains only this problem's production change and regression module.