Skip to content

Add optional check_finite flag to process_x#1828

Open
patelshivani2283-lab wants to merge 2 commits intosbi-dev:mainfrom
patelshivani2283-lab:fix-nan-padding-check
Open

Add optional check_finite flag to process_x#1828
patelshivani2283-lab wants to merge 2 commits intosbi-dev:mainfrom
patelshivani2283-lab:fix-nan-padding-check

Conversation

@patelshivani2283-lab
Copy link
Copy Markdown
Contributor

This PR adds an optional check_finite argument to process_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.

@patelshivani2283-lab
Copy link
Copy Markdown
Contributor Author

This is an initial step toward #1717. I can extend this to propagate the flag through posterior classes if needed.

@codecov
Copy link
Copy Markdown

codecov bot commented Mar 31, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 86.31%. Comparing base (937efc2) to head (dd290ee).
⚠️ Report is 43 commits behind head on main.

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     
Flag Coverage Δ
fast 82.77% <100.00%> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
sbi/utils/user_input_checks.py 76.80% <100.00%> (+0.12%) ⬆️

... and 77 files with indirect coverage changes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant