Skip to content

Commit

Permalink
Update Aesara dependency and add regression test for #5090
Browse files Browse the repository at this point in the history
  • Loading branch information
ricardoV94 committed Nov 3, 2021
1 parent 8a27ff4 commit e52b2f7
Show file tree
Hide file tree
Showing 11 changed files with 20 additions and 10 deletions.
2 changes: 1 addition & 1 deletion conda-envs/environment-dev-py37.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ channels:
- defaults
dependencies:
- aeppl>=0.0.13
- aesara>=2.2.2
- aesara>=2.2.6
- arviz>=0.11.4
- cachetools>=4.2.1
- cloudpickle
Expand Down
2 changes: 1 addition & 1 deletion conda-envs/environment-dev-py38.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ channels:
- defaults
dependencies:
- aeppl>=0.0.13
- aesara>=2.2.2
- aesara>=2.2.6
- arviz>=0.11.4
- cachetools>=4.2.1
- cloudpickle
Expand Down
2 changes: 1 addition & 1 deletion conda-envs/environment-dev-py39.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ channels:
- defaults
dependencies:
- aeppl>=0.0.13
- aesara>=2.2.2
- aesara>=2.2.6
- arviz>=0.11.4
- cachetools>=4.2.1
- cloudpickle
Expand Down
2 changes: 1 addition & 1 deletion conda-envs/environment-test-py37.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ channels:
- defaults
dependencies:
- aeppl>=0.0.13
- aesara>=2.2.2
- aesara>=2.2.6
- arviz>=0.11.4
- cachetools>=4.2.1
- cloudpickle
Expand Down
2 changes: 1 addition & 1 deletion conda-envs/environment-test-py38.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ channels:
- defaults
dependencies:
- aeppl>=0.0.13
- aesara>=2.2.2
- aesara>=2.2.6
- arviz>=0.11.4
- cachetools>=4.2.1
- cloudpickle
Expand Down
2 changes: 1 addition & 1 deletion conda-envs/environment-test-py39.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ channels:
- defaults
dependencies:
- aeppl>=0.0.13
- aesara>=2.2.2
- aesara>=2.2.6
- arviz>=0.11.4
- cachetools
- cloudpickle
Expand Down
2 changes: 1 addition & 1 deletion conda-envs/windows-environment-dev-py38.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ channels:
dependencies:
# base dependencies (see install guide for Windows)
- aeppl>=0.0.13
- aesara>=2.2.2
- aesara>=2.2.6
- arviz>=0.11.4
- cachetools>=4.2.1
- cloudpickle
Expand Down
2 changes: 1 addition & 1 deletion conda-envs/windows-environment-test-py38.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ channels:
dependencies:
# base dependencies (see install guide for Windows)
- aeppl>=0.0.13
- aesara>=2.2.2
- aesara>=2.2.6
- arviz>=0.11.2
- cachetools
- cloudpickle
Expand Down
10 changes: 10 additions & 0 deletions pymc/tests/test_initial_point.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
# limitations under the License.
import aesara
import aesara.tensor as at
import cloudpickle
import numpy as np
import pytest

Expand Down Expand Up @@ -218,3 +219,12 @@ def test_moment_from_dims(self, rv_cls):
assert not hasattr(rv.tag, "test_value")
assert tuple(get_moment(rv).shape.eval()) == (4, 3)
pass


def test_pickling_issue_5090():
with pm.Model() as model:
pm.Normal("x", initval="prior")
ip_before = model.recompute_initial_point(seed=5090)
model = cloudpickle.loads(cloudpickle.dumps(model))
ip_after = model.recompute_initial_point(seed=5090)
assert ip_before["x"] == ip_after["x"]
2 changes: 1 addition & 1 deletion requirements-dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# See that file for comments about the need/usage of each dependency.

aeppl>=0.0.13
aesara>=2.2.2
aesara>=2.2.6
arviz>=0.11.4
cachetools>=4.2.1
cloudpickle
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
aeppl>=0.0.13
aesara>=2.2.2
aesara>=2.2.6
arviz>=0.11.4
cachetools>=4.2.1
cloudpickle
Expand Down

0 comments on commit e52b2f7

Please sign in to comment.