Skip to content
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

Scan RVs cannot be composed with other measurable operations #178

Open
ricardoV94 opened this issue Sep 12, 2022 · 0 comments
Open

Scan RVs cannot be composed with other measurable operations #178

ricardoV94 opened this issue Sep 12, 2022 · 0 comments
Labels
help wanted Extra attention is needed op-probability Involves the implementation of log-probabilities for Aesara `Op`s scan

Comments

@ricardoV94
Copy link
Contributor

ricardoV94 commented Sep 12, 2022

Scan rewrite seems to require a value variable directly associated with it. For this reason the following simple case fails:

import aesara, aesara.tensor as at
from aeppl import factorized_joint_logprob

x, x_updates = aesara.scan(
    fn=lambda: at.random.normal(0, 1),
    n_steps=10,
)
x.name = "x"
x_vv = x.clone()
assert factorized_joint_logprob({x: x_vv})  # Fine

sx = x + 5
sx.name = "sx"
sx_vv = sx.clone()
assert factorized_joint_logprob({sx: sx_vv})  # AssertionError

This was brought up in pymc-devs/pymc#6119, where a concatenated graph would be the goal.

@brandonwillard brandonwillard added scan help wanted Extra attention is needed op-probability Involves the implementation of log-probabilities for Aesara `Op`s labels Sep 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed op-probability Involves the implementation of log-probabilities for Aesara `Op`s scan
Projects
None yet
Development

No branches or pull requests

2 participants