Add optional check_finite flag to process_x#1828
Add optional check_finite flag to process_x#1828patelshivani2283-lab wants to merge 2 commits intosbi-dev:mainfrom
Conversation
|
This is an initial step toward #1717. I can extend this to propagate the flag through posterior classes if needed. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1828 +/- ##
==========================================
- Coverage 88.54% 86.31% -2.23%
==========================================
Files 137 143 +6
Lines 11515 17753 +6238
==========================================
+ Hits 10196 15324 +5128
- Misses 1319 2429 +1110
Flags with carried forward coverage won't be shown. Click here to find out more.
|
|
Hi! Just wanted to follow up on this PR I added the I was also thinking about whether this should be propagated further (e.g., through posterior classes), but I wasn’t sure if that’s the intended direction or if a more minimal change is preferred. Happy to adjust based on your feedback |
|
Hi @patelshivani2283-lab, thanks for picking this up and sorry for the slow response on my side! You correctly identified PR #1701 added I suggest the following:
Note: MCMC / rejection / VI / importance subclass
Your other questions:
Sorry for the back-and-forth on the design! Your initial PR pointed at the right function and that's what made the cleaner approach visible. Thanks for sticking with this 🙏 |
This PR adds an optional
check_finiteargument toprocess_x.By default it is set to
True, so the existing behavior stays the same.If set to
False, it skips the NaN/Inf check (assert_all_finite).This can be useful in cases where the data is already validated and the extra check is not needed.