Skip to content

Small compatibility fix for master of Theano-PyMc #4293

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
Dec 10, 2020
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
2 changes: 1 addition & 1 deletion .github/workflows/arviz_compat.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
runs-on: ${{ matrix.os }}
env:
TEST_SUBSET: ${{ matrix.test-subset }}
THEANO_FLAGS: floatX=${{ matrix.floatx }},gcc.cxxflags='-march=native'
THEANO_FLAGS: floatX=${{ matrix.floatx }},gcc__cxxflags='-march=native'
defaults:
run:
shell: bash -l {0}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pytest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ jobs:
runs-on: ${{ matrix.os }}
env:
TEST_SUBSET: ${{ matrix.test-subset }}
THEANO_FLAGS: floatX=${{ matrix.floatx }},gcc.cxxflags='-march=native'
THEANO_FLAGS: floatX=${{ matrix.floatx }},gcc__cxxflags='-march=native'
defaults:
run:
shell: bash -l {0}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
runs-on: ${{ matrix.os }}
env:
TEST_SUBSET: ${{ matrix.test-subset }}
THEANO_FLAGS: floatX=${{ matrix.floatx }},gcc.cxxflags='-march=core2'
THEANO_FLAGS: floatX=${{ matrix.floatx }},gcc__cxxflags='-march=core2'
defaults:
run:
shell: bash -l {0}
Expand Down
2 changes: 1 addition & 1 deletion conda-envs/environment-dev-py36.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ channels:
dependencies:
- python=3.6
- arviz>=0.9
- theano-pymc==1.0.11
- theano-pymc==1.0.12
- numpy>=1.13
- scipy>=0.18
- pandas>=0.18
Expand Down
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:
dependencies:
- python=3.7
- arviz>=0.9
- theano-pymc==1.0.11
- theano-pymc==1.0.12
- numpy>=1.13
- scipy>=0.18
- pandas>=0.18
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:
dependencies:
- python=3.8
- arviz>=0.9
- theano-pymc==1.0.11
- theano-pymc==1.0.12
- numpy>=1.13
- scipy>=0.18
- pandas>=0.18
Expand Down
4 changes: 2 additions & 2 deletions pymc3/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ def __set_compiler_flags():
# Workarounds for Theano compiler problems on various platforms
import theano

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


__set_compiler_flags()
Expand Down
2 changes: 1 addition & 1 deletion pymc3/distributions/multivariate.py
Original file line number Diff line number Diff line change
Expand Up @@ -724,7 +724,7 @@ def perform(self, node, inputs, outputs):
pm._log.exception("Failed to check if %s positive definite", x)
raise

def infer_shape(self, node, shapes):
def infer_shape(self, fgraph, node, shapes):
return [[]]

def grad(self, inp, grads):
Expand Down
4 changes: 2 additions & 2 deletions pymc3/math.py
Original file line number Diff line number Diff line change
Expand Up @@ -363,7 +363,7 @@ def grad(self, inputs, gout):
idx = tt.arange(gz.shape[-1])
return [gz[..., idx, idx]]

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


Expand Down Expand Up @@ -422,7 +422,7 @@ def grad(self, inputs, gout):
]
return [gout[0][slc] for slc in slices]

def infer_shape(self, nodes, shapes):
def infer_shape(self, fgraph, nodes, shapes):
first, second = zip(*shapes)
return [(tt.add(*first), tt.add(*second))]

Expand Down
2 changes: 1 addition & 1 deletion pymc3/ode/ode.py
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ def perform(self, node, inputs_storage, output_storage):
# simulate states and sensitivities in one forward pass
output_storage[0][0], output_storage[1][0] = self._simulate(y0, theta)

def infer_shape(self, node, input_shapes):
def infer_shape(self, fgraph, node, input_shapes):
s_y0, s_theta = input_shapes
output_shapes = [(self.n_times, self.n_states), (self.n_times, self.n_states, self.n_p)]
return output_shapes
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@ numpy>=1.13.0
pandas>=0.18.0
patsy>=0.5.1
scipy>=0.18.1
theano-pymc==1.0.11
theano-pymc==1.0.12
typing-extensions>=3.7.4
2 changes: 1 addition & 1 deletion scripts/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
set -e

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