Skip to content

Commit

Permalink
Add test for #5007 regression
Browse files Browse the repository at this point in the history
Co-authored-by: kc611 <[email protected]>
  • Loading branch information
ricardoV94 and kc611 committed Oct 21, 2021
1 parent 2baa8ce commit 5ec3e0b
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions pymc/tests/test_logprob.py
Original file line number Diff line number Diff line change
Expand Up @@ -190,3 +190,16 @@ def test_logcdf_helper():

x_logp = logcdf(x, [0, 1], sum=False)
np.testing.assert_almost_equal(x_logp.eval(), sp.norm(0, 1).logcdf([0, 1]))


def test_model_unchanged_logprob_access_():
# Issue #5007
with Model() as model:
a = Normal("a")
c = Uniform("c", lower=a - 1, upper=1)

original_inputs = set(aesara.graph.graph_inputs([c]))
# Extract model.logpt
model.logpt
new_inputs = set(aesara.graph.graph_inputs([c]))
assert original_inputs == new_inputs

0 comments on commit 5ec3e0b

Please sign in to comment.