-
Notifications
You must be signed in to change notification settings - Fork 69
added sample_filter_outputs utility and accompanying simple tests #526
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
jessegrabowski
merged 5 commits into
pymc-devs:main
from
Dekermanjian:filter_outputs_utility
Jul 28, 2025
Merged
Changes from 1 commit
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
fd87691
added sample_filter_outputs utility and accompanying simple tests
Dekermanjian 5b064d4
1. removed modelcontext call that is not needed
Dekermanjian d142a91
updated plurality for some of the constants in constants.py
Dekermanjian 9e78bae
cleaned up commented code, moved internal checks to the top, reduced …
Dekermanjian 46149ac
updated kalman filter outputs to use names defined in constants.py, u…
Dekermanjian File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we shouldn't treat these as special (even though I agree it's silly to ask for them). I'd be confused if I tried to ask for them and it said it's not a valid filter output name.
Having everything in one place is convenient, even if it's duplicative.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay, yeah I agree with you.
I just wasn't sure because in
constants.py
FILTER_OUTPUT_DIMS
haspredicted_observed_states
andpredicted_observed_covariances
but the output fromkalman_filter.build_graph()
doesn't havepredicted_observed_states
andpredicted_observed_covariances
it seems like these are namedobserved_states
andobserved_covariances
.Should I change the names in
constants.py
to match the returned names fromkalman_filter.build_graph()
?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, these should be consistent. But where does the name change currently happen between the filter and the idata? Maybe this is an issue for another PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jessegrabowski, I believe this happens in
_postprocess_scan_results()
inkalman_filter.py
. It looks like the names of the filter outputs are hardcoded in there.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you want to make this consistent in this PR I have no objection. I don't have a good sense if you should change FILTER_OUTPUT_DIMS to match the output names, or change the output names to match the FILTER_OUTPUT_DIMS. I'll defer to you if you have a sense of which one is better.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay, I will do it in this PR because I think it is somewhat related. I think the names should match whatever we put in
FILTER_OUTPUT_DIMS