-
-
Notifications
You must be signed in to change notification settings - Fork 60
fix autoreparam because dims are no longer static #363
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
Merged
Changes from 9 commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
c87db47
fix autoreparam because dims are no longer static
ferrine 2d80fdf
fix: Handle case with size passed as None
ferrine 9ec41cd
fix: use constant_fold instead of manual eval
ferrine 949d2e9
Revert "fix: use constant_fold instead of manual eval"
ferrine a3907f0
fix: do not trigger C compile when evaluating shape
ferrine d2b3584
Evaluate the rv.shape directly
ferrine c2cdbdc
Revert "Evaluate the rv.shape directly"
ferrine 75c98ec
test: Check both variants of static and not static shape
ferrine a9f582c
refactor: Use infer_static_shape from pytensor
ferrine 82a1a24
Revert "refactor: Use infer_static_shape from pytensor"
ferrine d5355a5
Update pymc_experimental/model/transforms/autoreparam.py
ferrine bcdea46
add failing test for all cases of how shape can go
ferrine 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
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
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.
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.
Do you want to raise NotImplementedError for op.ndim_supp>0?
Not sure if for those you would want one lambda per shape or size, mentioning because those will always be different for multivariate RVs
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.
it will not pass the dispatch anyway, it is not needed
Uh oh!
There was an error while loading. Please reload this page.
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.
ndim_supp>0, will never be supported I think, but I'm not sure, maybe it will, e.g. Dirichlet, there are some reparameterizations with Gamma https://stats.stackexchange.com/questions/548620/reparameterization-trick-for-the-dirichlet-distribution
Uh oh!
There was an error while loading. Please reload this page.
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.
Per size for sure 100%
I believe that if I work with multivariate rv, it will be the only way to have one lambda per size (one per independent draw)