Skip to content

Commit 4fd56fd

Browse files
Small compatibility fix for master of Theano-PyMc (#4293)
* Update theano-pymc version * Update infer_shape signatures * Updates for new double-underscore config settings Co-authored-by: Brandon T. Willard <[email protected]>
1 parent 0431292 commit 4fd56fd

12 files changed

+14
-14
lines changed

Diff for: .github/workflows/arviz_compat.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
runs-on: ${{ matrix.os }}
1919
env:
2020
TEST_SUBSET: ${{ matrix.test-subset }}
21-
THEANO_FLAGS: floatX=${{ matrix.floatx }},gcc.cxxflags='-march=native'
21+
THEANO_FLAGS: floatX=${{ matrix.floatx }},gcc__cxxflags='-march=native'
2222
defaults:
2323
run:
2424
shell: bash -l {0}

Diff for: .github/workflows/pytest.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ jobs:
5959
runs-on: ${{ matrix.os }}
6060
env:
6161
TEST_SUBSET: ${{ matrix.test-subset }}
62-
THEANO_FLAGS: floatX=${{ matrix.floatx }},gcc.cxxflags='-march=native'
62+
THEANO_FLAGS: floatX=${{ matrix.floatx }},gcc__cxxflags='-march=native'
6363
defaults:
6464
run:
6565
shell: bash -l {0}

Diff for: .github/workflows/windows.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
runs-on: ${{ matrix.os }}
1818
env:
1919
TEST_SUBSET: ${{ matrix.test-subset }}
20-
THEANO_FLAGS: floatX=${{ matrix.floatx }},gcc.cxxflags='-march=core2'
20+
THEANO_FLAGS: floatX=${{ matrix.floatx }},gcc__cxxflags='-march=core2'
2121
defaults:
2222
run:
2323
shell: bash -l {0}

Diff for: conda-envs/environment-dev-py36.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ channels:
55
dependencies:
66
- python=3.6
77
- arviz>=0.9
8-
- theano-pymc==1.0.11
8+
- theano-pymc==1.0.12
99
- numpy>=1.13
1010
- scipy>=0.18
1111
- pandas>=0.18

Diff for: conda-envs/environment-dev-py37.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ channels:
55
dependencies:
66
- python=3.7
77
- arviz>=0.9
8-
- theano-pymc==1.0.11
8+
- theano-pymc==1.0.12
99
- numpy>=1.13
1010
- scipy>=0.18
1111
- pandas>=0.18

Diff for: conda-envs/environment-dev-py38.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ channels:
55
dependencies:
66
- python=3.8
77
- arviz>=0.9
8-
- theano-pymc==1.0.11
8+
- theano-pymc==1.0.12
99
- numpy>=1.13
1010
- scipy>=0.18
1111
- pandas>=0.18

Diff for: pymc3/__init__.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,8 @@ def __set_compiler_flags():
3232
# Workarounds for Theano compiler problems on various platforms
3333
import theano
3434

35-
current = theano.config.gcc.cxxflags
36-
theano.config.gcc.cxxflags = f"{current} -Wno-c++11-narrowing"
35+
current = theano.config.gcc__cxxflags
36+
theano.config.gcc__cxxflags = f"{current} -Wno-c++11-narrowing"
3737

3838

3939
__set_compiler_flags()

Diff for: pymc3/distributions/multivariate.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -724,7 +724,7 @@ def perform(self, node, inputs, outputs):
724724
pm._log.exception("Failed to check if %s positive definite", x)
725725
raise
726726

727-
def infer_shape(self, node, shapes):
727+
def infer_shape(self, fgraph, node, shapes):
728728
return [[]]
729729

730730
def grad(self, inp, grads):

Diff for: pymc3/math.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -363,7 +363,7 @@ def grad(self, inputs, gout):
363363
idx = tt.arange(gz.shape[-1])
364364
return [gz[..., idx, idx]]
365365

366-
def infer_shape(self, nodes, shapes):
366+
def infer_shape(self, fgraph, nodes, shapes):
367367
return [(shapes[0][0],) + (shapes[0][1],) * 2]
368368

369369

@@ -422,7 +422,7 @@ def grad(self, inputs, gout):
422422
]
423423
return [gout[0][slc] for slc in slices]
424424

425-
def infer_shape(self, nodes, shapes):
425+
def infer_shape(self, fgraph, nodes, shapes):
426426
first, second = zip(*shapes)
427427
return [(tt.add(*first), tt.add(*second))]
428428

Diff for: pymc3/ode/ode.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,7 @@ def perform(self, node, inputs_storage, output_storage):
213213
# simulate states and sensitivities in one forward pass
214214
output_storage[0][0], output_storage[1][0] = self._simulate(y0, theta)
215215

216-
def infer_shape(self, node, input_shapes):
216+
def infer_shape(self, fgraph, node, input_shapes):
217217
s_y0, s_theta = input_shapes
218218
output_shapes = [(self.n_times, self.n_states), (self.n_times, self.n_states, self.n_p)]
219219
return output_shapes

Diff for: requirements.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,5 @@ numpy>=1.13.0
77
pandas>=0.18.0
88
patsy>=0.5.1
99
scipy>=0.18.1
10-
theano-pymc==1.0.11
10+
theano-pymc==1.0.12
1111
typing-extensions>=3.7.4

Diff for: scripts/test.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@
33
set -e
44

55
_FLOATX=${FLOATX:=float64}
6-
THEANO_FLAGS="floatX=${_FLOATX},gcc.cxxflags='-march=core2'" pytest -v --cov=pymc3 --cov-report=xml "$@" --cov-report term
6+
THEANO_FLAGS="floatX=${_FLOATX},gcc__cxxflags='-march=core2'" pytest -v --cov=pymc3 --cov-report=xml "$@" --cov-report term

0 commit comments

Comments
 (0)