Closed larryshamalama closed 2 years ago
Can you add a test? Your example should be fine just assert that the warning raised in one case but not the other, but the output is the same.
Done! There was already a test for this, I just added a verification for warn_missing_rvs=False
. Here, is it better to have both commits as one?
Failing test as described in #148:
You can just cherry pick (or copy) this commit: https://github.com/aesara-devs/aeppl/commit/e0f9623fa6734061e05850eb14c72e18ddd7027f
You can just cherry pick (or copy) this commit: e0f9623
Done!
You should have the two commits separate.
One for the xfail and the other for the bugfix and new test condition.
You should have the two commits separate.
One for the xfail and the other for the bugfix and new test condition.
Done! Thanks for the clarification
Small nitpick: the test and respective bugfix make sense to go in the same commit
Small nitpick: the test and respective bugfix make sense to go in the same commit
After several attempts and many force pushes, I think that I got it right (?) 😅
Merging #151 (832e329) into main (cc78f30) will increase coverage by
0.00%
. The diff coverage is100.00%
.
@@ Coverage Diff @@
## main #151 +/- ##
=======================================
Coverage 94.88% 94.88%
=======================================
Files 12 12
Lines 1779 1780 +1
Branches 262 263 +1
=======================================
+ Hits 1688 1689 +1
Misses 51 51
Partials 40 40
Impacted Files | Coverage Δ | |
---|---|---|
aeppl/joint_logprob.py | 96.92% <100.00%> (+0.04%) |
:arrow_up: |
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact)
,ø = not affected
,? = missing data
Powered by Codecov. Last update cc78f30...832e329. Read the comment docs.
Currently, random variables that are not provided with their value variable equivalent can result in a
KeyError
infactorized_joint_logprob
when givenwarn_missing_rvs=False
. This error rose when working with a graph corresponding to a Gaussian random walk.The following code chunk yields a
KeyError
:but setting
warn_missing_rvs=True
only issues warnings.In this PR, so far, I fix the case where users decide to not issue warnings.