Skip to content

Bump Aesara to 2.7.5, aeppl to 0.0.32, update tests for aeppl #5955

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

Merged
merged 5 commits into from
Jul 7, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's some other file, either pre-commit or mypy something that specifies aesara/aeppl versions that have to be updated as well.

Checking the last commit where these dependencies were changed should show it.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch! Last time we actually missed bumping Aesara in this location.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do I need to squash this last commit with my previous "Bump Aesara" and "Bump aeppl" commits?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can just squash-merge once we get greens.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No need, if you don't mind we squashing all the commits when merging. Otherwise you can.

We are less strict about this here than in Aesara for example

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Squash merge sounds great! 😅

- 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