Skip to content

Commit

Permalink
Update as_op import and stack_search usage
Browse files Browse the repository at this point in the history
  • Loading branch information
brandonwillard committed Jan 4, 2021
1 parent e783106 commit e5e53d6
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion pymc3/model_graph.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ def _expand(node) -> Optional[Iterator[Tensor]]:
else:
return None

stack_search(start=deque([func]), expand=_expand, mode="bfs")
list(stack_search(deque([func]), _expand, bfs=True))
return retval

def _filter_parents(self, var, parents) -> Set[VarName]:
Expand Down
4 changes: 3 additions & 1 deletion pymc3/tests/test_parallel_sampling.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@
import theano
import theano.tensor as tt

from theano.compile.ops import as_op

import pymc3 as pm
import pymc3.parallel_sampling as ps

Expand Down Expand Up @@ -61,7 +63,7 @@ def test_bad_unpickle():
tt_vector = tt.TensorType(theano.config.floatX, [False])


@theano.as_op([tt_vector, tt.iscalar], [tt_vector])
@as_op([tt_vector, tt.iscalar], [tt_vector])
def _crash_remote_process(a, master_pid):
if os.getpid() != master_pid:
os.exit(0)
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@ numpy>=1.13.0
pandas>=0.18.0
patsy>=0.5.1
scipy>=0.18.1
theano-pymc==1.0.14
theano-pymc==1.0.15
typing-extensions>=3.7.4

0 comments on commit e5e53d6

Please sign in to comment.