Skip to content

Update Aesara version and unpin numpy #5369

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 3 commits into from
Jan 20, 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 conda-envs/environment-dev-py37.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@ channels:
- defaults
dependencies:
- aeppl=0.0.18
- aesara=2.3.2
- aesara=2.3.6
- arviz>=0.11.4
- cachetools>=4.2.1
- cloudpickle
- fastprogress>=0.2.0
- h5py>=2.7
- ipython
- myst-nb
- numpy>=1.15.0,<1.22.0
- numpy>=1.15
- numpydoc>=0.9
- pandas>=0.24
- pre-commit>=2.8.0
Expand Down
4 changes: 2 additions & 2 deletions conda-envs/environment-dev-py38.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@ channels:
- defaults
dependencies:
- aeppl=0.0.18
- aesara=2.3.2
- aesara=2.3.6
- arviz>=0.11.4
- cachetools>=4.2.1
- cloudpickle
- fastprogress>=0.2.0
- h5py>=2.7
- ipython
- myst-nb
- numpy>=1.15.0,<1.22.0
- numpy>=1.15.0
- numpydoc>=0.9
- pandas>=0.24.0
- pre-commit>=2.8.0
Expand Down
4 changes: 2 additions & 2 deletions conda-envs/environment-dev-py39.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@ channels:
- defaults
dependencies:
- aeppl=0.0.18
- aesara=2.3.2
- aesara=2.3.6
- arviz>=0.11.4
- cachetools>=4.2.1
- cloudpickle
- fastprogress>=0.2.0
- h5py>=2.7
- ipython
- myst-nb
- numpy>=1.15.0,<1.22.0
- numpy>=1.15.0
- numpydoc>=0.9
- pandas
- pre-commit>=2.8.0
Expand Down
4 changes: 2 additions & 2 deletions 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.18
- aesara=2.3.2
- aesara=2.3.6
- arviz>=0.11.4
- cachetools>=4.2.1
- cloudpickle
Expand All @@ -14,7 +14,7 @@ dependencies:
- ipython
- libblas=*=*mkl
- mkl-service
- numpy>=1.15.0,<1.22.0
- numpy>=1.15.0
- pandas>=0.24
- pre-commit>=2.8.0
- pytest-cov>=2.5
Expand Down
4 changes: 2 additions & 2 deletions 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.18
- aesara=2.3.2
- aesara=2.3.6
- arviz>=0.11.4
- cachetools>=4.2.1
- cloudpickle
Expand All @@ -14,7 +14,7 @@ dependencies:
- ipython
- libblas=*=*mkl
- mkl-service
- numpy>=1.15.0,<1.22.0
- numpy>=1.15.0
- pandas
- pre-commit>=2.8.0
- pytest-cov>=2.5
Expand Down
4 changes: 2 additions & 2 deletions 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.18
- aesara=2.3.2
- aesara=2.3.6
- arviz>=0.11.4
- cachetools
- cloudpickle
Expand All @@ -14,7 +14,7 @@ dependencies:
- ipython>=7.16
- libblas=*=*mkl
- mkl-service
- numpy>=1.15.0,<1.22.0
- numpy>=1.15.0
- pandas
- pre-commit>=2.8.0
- pytest-cov>=2.5
Expand Down
4 changes: 2 additions & 2 deletions conda-envs/windows-environment-dev-py38.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@ channels:
dependencies:
# base dependencies (see install guide for Windows)
- aeppl=0.0.18
- aesara=2.3.2
- aesara=2.3.6
- arviz>=0.11.4
- cachetools>=4.2.1
- cloudpickle
- fastprogress>=0.2.0
- h5py
- numpy>=1.15.0,<1.22.0
- numpy>=1.15.0
- pandas
- pip
- python=3.8
Expand Down
4 changes: 2 additions & 2 deletions 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.18
- aesara=2.3.2
- aesara=2.3.6
- arviz>=0.11.2
- cachetools
- cloudpickle
Expand All @@ -15,7 +15,7 @@ dependencies:
- mkl==2020.4
- mkl-service==2.3.0
- m2w64-toolchain
- numpy>=1.15.0,<1.22.0
- numpy>=1.15.0
- pandas
- pip
- python=3.8
Expand Down
2 changes: 1 addition & 1 deletion pymc/distributions/multivariate.py
Original file line number Diff line number Diff line change
Expand Up @@ -1742,7 +1742,7 @@ def dist(
dist_shape = (rowchol_cov.shape[0], colchol_cov.shape[0])

# Broadcasting mu
mu = at.extra_ops.broadcast_to(a=mu, shape=dist_shape)
mu = at.extra_ops.broadcast_to(mu, shape=dist_shape)

mu = at.as_tensor_variable(floatX(mu))
# mean = median = mode = mu
Expand Down
2 changes: 1 addition & 1 deletion pymc/ode/ode.py
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ def __call__(self, y0, theta, return_sens=False, **kwargs):
theta = at.cast(at.unbroadcast(at.as_tensor_variable(theta), 0), floatX)
inputs = [y0, theta]
for i, (input_val, itype) in enumerate(zip(inputs, self._itypes)):
if not input_val.type == itype:
if not input_val.type.in_same_class(itype):
raise ValueError(
f"Input {i} of type {input_val.type} does not have the expected type of {itype}"
)
Expand Down
17 changes: 5 additions & 12 deletions pymc/tests/test_smc.py
Original file line number Diff line number Diff line change
Expand Up @@ -140,20 +140,13 @@ def test_marginal_likelihood(self):
with pm.Model() as model:
a = pm.Beta("a", alpha, beta)
y = pm.Bernoulli("y", a, observed=data)
trace = pm.sample_smc(2000, return_inferencedata=False)
marginals.append(trace.report.log_marginal_likelihood)
trace = pm.sample_smc(2000, chains=2, return_inferencedata=False)
# log_marignal_likelihood is found in the last value of each chain
lml = np.mean([chain[-1] for chain in trace.report.log_marginal_likelihood])
marginals.append(lml)

# compare to the analytical result
assert (
np.abs(
np.exp(
np.nanmean(np.array(marginals[1], dtype=float))
- np.nanmean(np.array(marginals[0], dtype=float))
- 4.0
)
)
<= 1
)
assert abs(np.exp(marginals[1] - marginals[0]) - 4.0) <= 1

def test_start(self):
with pm.Model() as model:
Expand Down
4 changes: 2 additions & 2 deletions requirements-dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@
# See that file for comments about the need/usage of each dependency.

aeppl==0.0.18
aesara==2.3.2
aesara==2.3.6
arviz>=0.11.4
cachetools>=4.2.1
cloudpickle
fastprogress>=0.2.0
h5py>=2.7
ipython
myst-nb
numpy>=1.15.0,<1.22.0
numpy>=1.15.0
numpydoc>=0.9
pandas
pre-commit>=2.8.0
Expand Down
4 changes: 2 additions & 2 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
aeppl==0.0.18
aesara==2.3.2
aesara==2.3.6
arviz>=0.11.4
cachetools>=4.2.1
cloudpickle
fastprogress>=0.2.0
numpy>=1.15.0,<1.22.0
numpy>=1.15.0
pandas>=0.24.0
scipy>=1.4.1
typing-extensions>=3.7.4