Skip to content

Commit 600ed93

Browse files
committed
Add test for pickle with dill
1 parent 9789ec6 commit 600ed93

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

pymc3/tests/test_parallel_sampling.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,13 +51,21 @@ def test_bad_unpickle():
5151

5252

5353
tt_vector = tt.TensorType(theano.config.floatX, [False])
54+
55+
5456
@theano.as_op([tt_vector, tt.iscalar], [tt_vector])
5557
def _crash_remote_process(a, master_pid):
5658
if os.getpid() != master_pid:
5759
os.exit(0)
5860
return 2 * np.array(a)
5961

6062

63+
def test_dill():
64+
with pm.Model():
65+
pm.Normal('x')
66+
pm.sample(tune=1, draws=1, chains=2, cores=2, pickle_backend="dill", mp_ctx="spawn")
67+
68+
6169
def test_remote_pipe_closed():
6270
master_pid = os.getpid()
6371
with pm.Model():

requirements-dev.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,3 +18,4 @@ seaborn>=0.8.1
1818
sphinx-autobuild==0.7.1
1919
sphinx>=1.5.5
2020
watermark
21+
dill

0 commit comments

Comments
 (0)