Validate user-provided pit at the entry point#504
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #504 +/- ##
==========================================
- Coverage 99.19% 99.18% -0.02%
==========================================
Files 35 35
Lines 6115 6113 -2
==========================================
- Hits 6066 6063 -3
- Misses 49 50 +1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
Hi @utkarshpawade, thanks for the PR. I provided a small discussion about your observation in the corresponding Issue. Probably you could adjust the PR accordingly. |
There was a problem hiding this comment.
Pull request overview
This PR addresses #503 by moving validation of user-supplied LOO-PIT (pit) inputs earlier in the ppc_loo_* pipeline to prevent downstream failures during boundary-corrected KDE processing.
Changes:
- Validate user-provided
pitat the start ofppc_loo_pit_data()andppc_loo_pit_qq()viavalidate_pit(). - Update unit tests to assert errors for invalid user-provided
pitvalues. - Modify
.kde_correction()by removing the prior infinite-value filtering and adding an abort when the convolution result is entirelyNA.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
R/ppc-loo.R |
Routes user-supplied pit through validate_pit() and adjusts .kde_correction() failure handling. |
tests/testthat/test-ppc-loo.R |
Replaces .kde_correction() warning test with entry-point validation error tests for ppc_loo_pit_data() / ppc_loo_pit_qq(). |
NEWS.md |
Documents the new pit validation behavior for ppc_loo_pit_data() and ppc_loo_pit_qq(). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Fixes #503
Summary
Validates user provided
pitargument immediately when it is provided