Skip to content

Commit

Permalink
Bump Aesara to 2.7.5, aeppl to 0.0.32, update tests for aeppl (#5955)
Browse files Browse the repository at this point in the history
* Bump Aesara to v2.7.5

* Bump aeppl to v0.0.32

* Revert warn_missing_rvs to default value of True

See #5955 (comment)

This adapts to the change in behavior introduced in
aesara-devs/aeppl#151.
  • Loading branch information
maresb authored Jul 7, 2022
1 parent 294ff4a commit 966aabf
Show file tree
Hide file tree
Showing 9 changed files with 26 additions and 19 deletions.
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ repos:
- types-filelock
- types-setuptools
- arviz
- aesara==2.7.3
- aeppl==0.0.31
- aesara==2.7.5
- aeppl==0.0.32
always_run: true
require_serial: true
pass_filenames: false
Expand Down
4 changes: 2 additions & 2 deletions conda-envs/environment-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ channels:
- defaults
dependencies:
# Base dependencies
- aeppl=0.0.31
- aesara=2.7.4
- aeppl=0.0.32
- aesara=2.7.5
- arviz>=0.12.0
- blas
- cachetools>=4.2.1
Expand Down
4 changes: 2 additions & 2 deletions conda-envs/environment-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ channels:
- defaults
dependencies:
# Base dependencies
- aeppl=0.0.31
- aesara=2.7.4
- aeppl=0.0.32
- aesara=2.7.5
- arviz>=0.12.0
- blas
- cachetools>=4.2.1
Expand Down
4 changes: 2 additions & 2 deletions conda-envs/windows-environment-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ channels:
- defaults
dependencies:
# Base dependencies (see install guide for Windows)
- aeppl=0.0.31
- aesara=2.7.4
- aeppl=0.0.32
- aesara=2.7.5
- arviz>=0.12.0
- blas
- cachetools>=4.2.1
Expand Down
4 changes: 2 additions & 2 deletions conda-envs/windows-environment-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ channels:
- defaults
dependencies:
# Base dependencies (see install guide for Windows)
- aeppl=0.0.31
- aesara=2.7.4
- aeppl=0.0.32
- aesara=2.7.5
- arviz>=0.12.0
- blas
- cachetools>=4.2.1
Expand Down
1 change: 0 additions & 1 deletion pymc/distributions/logprob.py
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,6 @@ def joint_logp(
tmp_rvs_to_values,
extra_rewrites=transform_opt,
use_jacobian=jacobian,
warn_missing_rvs=False,
**kwargs,
)

Expand Down
16 changes: 12 additions & 4 deletions pymc/tests/test_logprob.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
import warnings

import aesara
import aesara.tensor as at
import numpy as np
Expand Down Expand Up @@ -333,11 +335,17 @@ def logp(value, x):
with Model() as m:
x = Normal.dist()
y = DensityDist("y", x, logp=logp)
# Aeppl raises a KeyError when it finds an unexpected RV
with pytest.raises(KeyError):
joint_logp([y], {y: y.type()})
with pytest.warns(
UserWarning,
match="Found a random variable that was neither among the observations "
"nor the conditioned variables",
):
assert joint_logp([y], {y: y.type()})

# The above warning should go away with ignore_logprob.
with Model() as m:
x = ignore_logprob(Normal.dist())
y = DensityDist("y", x, logp=logp)
assert joint_logp([y], {y: y.type()})
with warnings.catch_warnings():
warnings.simplefilter("error")
assert joint_logp([y], {y: y.type()})
4 changes: 2 additions & 2 deletions requirements-dev.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# This file is auto-generated by scripts/generate_pip_deps_from_conda.py, do not modify.
# See that file for comments about the need/usage of each dependency.

aeppl==0.0.31
aesara==2.7.4
aeppl==0.0.32
aesara==2.7.5
arviz>=0.12.0
cachetools>=4.2.1
cloudpickle
Expand Down
4 changes: 2 additions & 2 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
aeppl==0.0.31
aesara==2.7.4
aeppl==0.0.32
aesara==2.7.5
arviz>=0.12.0
cachetools>=4.2.1
cloudpickle
Expand Down

0 comments on commit 966aabf

Please sign in to comment.