Add unit test for .psis_subset() output structure#519
Add unit test for .psis_subset() output structure#519utkarshpawade wants to merge 5 commits intostan-dev:masterfrom
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #519 +/- ##
=======================================
Coverage 99.15% 99.15%
=======================================
Files 35 35
Lines 5920 5920
=======================================
Hits 5870 5870
Misses 50 50 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Pull request overview
Adds a regression/unit test to ensure .psis_subset() returns a valid loo::psis object with expected internal structure, acting as a canary if loo changes psis internals.
Changes:
- Added a new test verifying
.psis_subset()output class,log_weights, diagnostics, and key attributes/dimensions. - Added a NEWS entry noting the new unit test.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| tests/testthat/test-ppc-loo.R | Adds a structure-focused unit test for .psis_subset() output. |
| NEWS.md | Documents the addition of the new unit test. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
jgabry
left a comment
There was a problem hiding this comment.
I don't think we need this because we already have ppc_loo_intervals and ppc_loo_ribbon tests that use the subset argument. Those tests would fail if loo changes something that breaks .psis_subset.
Fixes #518
Summary
.psis_subset()preserves psis object structure (class, log_weights, diagnostics, dims, norm_const_log, tail_len, r_eff)loochanges its psis internals