fix(phase-02/03): handle empty cells in Julia build_metrics - #435
pchukwuemeka424 wants to merge 1 commit into
Conversation
Strict thresholds can yield all-negative predictions; filtered sum() then throws ArgumentError on empty generators during threshold tuning. Co-authored-by: Cursor <[email protected]>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
Included review availability: Your plan provides up to 10 included reviews per hour; 9 remain after this review. 📝 WalkthroughWalkthrough
ChangesClassification metrics robustness
Estimated code review effort: 2 (Simple) | ~5 minutes Merge Risk: ⚪ Minimal · up to The change makes threshold tuning return zero counts for empty prediction groups instead of throwing; no actionable merge-blocking risk remains after normal checks and review. 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
Full details: Docstring CoverageExplanation No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0 files. (1 skipped: 1 unsupported.) ✨ Finishing Touches 💡 1🛠️ Fix failing CI checks 💡
🧪 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 |
Summary
build_metricscrashed withArgumentError: reducing over an empty collectionwhen a threshold produced all-negative (or otherwise empty-cell) predictions.sum(1 for ... if ...)withcount(...), which returns0for empty matches so threshold tuning completes.Test plan
julia main.jl/ fullmain()completes through threshold tuning and the rest of the demoMade with Cursor