From 60382a2900d5aa122e4c336eac885ed0d79cdce9 Mon Sep 17 00:00:00 2001 From: Ben Mares Date: Wed, 6 Jul 2022 22:17:48 +0200 Subject: [PATCH 1/5] Bump Aesara to v2.7.5 --- conda-envs/environment-dev.yml | 2 +- conda-envs/environment-test.yml | 2 +- conda-envs/windows-environment-dev.yml | 2 +- conda-envs/windows-environment-test.yml | 2 +- requirements-dev.txt | 2 +- requirements.txt | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/conda-envs/environment-dev.yml b/conda-envs/environment-dev.yml index 8524033ce3..c4ca323475 100644 --- a/conda-envs/environment-dev.yml +++ b/conda-envs/environment-dev.yml @@ -6,7 +6,7 @@ channels: dependencies: # Base dependencies - aeppl=0.0.31 -- aesara=2.7.4 +- aesara=2.7.5 - arviz>=0.12.0 - blas - cachetools>=4.2.1 diff --git a/conda-envs/environment-test.yml b/conda-envs/environment-test.yml index cf3f5e2b66..1093d125d1 100644 --- a/conda-envs/environment-test.yml +++ b/conda-envs/environment-test.yml @@ -6,7 +6,7 @@ channels: dependencies: # Base dependencies - aeppl=0.0.31 -- aesara=2.7.4 +- aesara=2.7.5 - arviz>=0.12.0 - blas - cachetools>=4.2.1 diff --git a/conda-envs/windows-environment-dev.yml b/conda-envs/windows-environment-dev.yml index 6fd8e87023..2981234981 100644 --- a/conda-envs/windows-environment-dev.yml +++ b/conda-envs/windows-environment-dev.yml @@ -6,7 +6,7 @@ channels: dependencies: # Base dependencies (see install guide for Windows) - aeppl=0.0.31 -- aesara=2.7.4 +- aesara=2.7.5 - arviz>=0.12.0 - blas - cachetools>=4.2.1 diff --git a/conda-envs/windows-environment-test.yml b/conda-envs/windows-environment-test.yml index 2eefc6fa31..a0132aa9b8 100644 --- a/conda-envs/windows-environment-test.yml +++ b/conda-envs/windows-environment-test.yml @@ -6,7 +6,7 @@ channels: dependencies: # Base dependencies (see install guide for Windows) - aeppl=0.0.31 -- aesara=2.7.4 +- aesara=2.7.5 - arviz>=0.12.0 - blas - cachetools>=4.2.1 diff --git a/requirements-dev.txt b/requirements-dev.txt index f9f0ba2cfe..fbae9352e9 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -2,7 +2,7 @@ # See that file for comments about the need/usage of each dependency. aeppl==0.0.31 -aesara==2.7.4 +aesara==2.7.5 arviz>=0.12.0 cachetools>=4.2.1 cloudpickle diff --git a/requirements.txt b/requirements.txt index 860ed7c2d4..6e0a36be1d 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,5 +1,5 @@ aeppl==0.0.31 -aesara==2.7.4 +aesara==2.7.5 arviz>=0.12.0 cachetools>=4.2.1 cloudpickle From 08ff01d37e36e0f1f075cf983c91b135e38393db Mon Sep 17 00:00:00 2001 From: Ben Mares Date: Wed, 6 Jul 2022 22:21:29 +0200 Subject: [PATCH 2/5] Bump aeppl to v0.0.32 --- conda-envs/environment-dev.yml | 2 +- conda-envs/environment-test.yml | 2 +- conda-envs/windows-environment-dev.yml | 2 +- conda-envs/windows-environment-test.yml | 2 +- requirements-dev.txt | 2 +- requirements.txt | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/conda-envs/environment-dev.yml b/conda-envs/environment-dev.yml index c4ca323475..7ee5eda730 100644 --- a/conda-envs/environment-dev.yml +++ b/conda-envs/environment-dev.yml @@ -5,7 +5,7 @@ channels: - defaults dependencies: # Base dependencies -- aeppl=0.0.31 +- aeppl=0.0.32 - aesara=2.7.5 - arviz>=0.12.0 - blas diff --git a/conda-envs/environment-test.yml b/conda-envs/environment-test.yml index 1093d125d1..c400e2c3c1 100644 --- a/conda-envs/environment-test.yml +++ b/conda-envs/environment-test.yml @@ -5,7 +5,7 @@ channels: - defaults dependencies: # Base dependencies -- aeppl=0.0.31 +- aeppl=0.0.32 - aesara=2.7.5 - arviz>=0.12.0 - blas diff --git a/conda-envs/windows-environment-dev.yml b/conda-envs/windows-environment-dev.yml index 2981234981..6477a25caa 100644 --- a/conda-envs/windows-environment-dev.yml +++ b/conda-envs/windows-environment-dev.yml @@ -5,7 +5,7 @@ channels: - defaults dependencies: # Base dependencies (see install guide for Windows) -- aeppl=0.0.31 +- aeppl=0.0.32 - aesara=2.7.5 - arviz>=0.12.0 - blas diff --git a/conda-envs/windows-environment-test.yml b/conda-envs/windows-environment-test.yml index a0132aa9b8..6cc829a3ad 100644 --- a/conda-envs/windows-environment-test.yml +++ b/conda-envs/windows-environment-test.yml @@ -5,7 +5,7 @@ channels: - defaults dependencies: # Base dependencies (see install guide for Windows) -- aeppl=0.0.31 +- aeppl=0.0.32 - aesara=2.7.5 - arviz>=0.12.0 - blas diff --git a/requirements-dev.txt b/requirements-dev.txt index fbae9352e9..cd0c647a91 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -1,7 +1,7 @@ # 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 +aeppl==0.0.32 aesara==2.7.5 arviz>=0.12.0 cachetools>=4.2.1 diff --git a/requirements.txt b/requirements.txt index 6e0a36be1d..6d52a9c242 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,4 +1,4 @@ -aeppl==0.0.31 +aeppl==0.0.32 aesara==2.7.5 arviz>=0.12.0 cachetools>=4.2.1 From 6014e8f57bdb728cc835a6cb822679cdf5f6cbfc Mon Sep 17 00:00:00 2001 From: Ben Mares Date: Thu, 7 Jul 2022 14:33:51 +0200 Subject: [PATCH 3/5] Revert warn_missing_rvs to default value of True See https://github.com/pymc-devs/pymc/pull/5955#issuecomment-1177514485 --- pymc/distributions/logprob.py | 1 - 1 file changed, 1 deletion(-) diff --git a/pymc/distributions/logprob.py b/pymc/distributions/logprob.py index d67dc35ed1..088b76e2ae 100644 --- a/pymc/distributions/logprob.py +++ b/pymc/distributions/logprob.py @@ -236,7 +236,6 @@ def joint_logp( tmp_rvs_to_values, extra_rewrites=transform_opt, use_jacobian=jacobian, - warn_missing_rvs=False, **kwargs, ) From b2359419e6a5431b1ff831b063e403d1921dffb6 Mon Sep 17 00:00:00 2001 From: Ben Mares Date: Thu, 7 Jul 2022 15:01:42 +0200 Subject: [PATCH 4/5] Test for aeppl warning about missing RV This adapts to the change in behavior introduced in aesara-devs/aeppl#151. --- pymc/tests/test_logprob.py | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/pymc/tests/test_logprob.py b/pymc/tests/test_logprob.py index d0be51e833..c388af397c 100644 --- a/pymc/tests/test_logprob.py +++ b/pymc/tests/test_logprob.py @@ -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 @@ -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()}) From 5a0f7b1e65ae3f732fdbee49552d33f7dfa8621b Mon Sep 17 00:00:00 2001 From: Ben Mares Date: Thu, 7 Jul 2022 15:15:20 +0200 Subject: [PATCH 5/5] Bump mypy dependencies in pre-commit-config --- .pre-commit-config.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 69985c3fca..8791fb8308 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -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