An error message about 'can't pickle fortran objects'


I got a question…
I had my model run before, but today I got the error message.
The only thing I could possible change is that I upgraded the package…I am not sure if it could be related. Does someone have some information about this issue? Thanks a lot.

File “/home/user/Documents/PyMC3/”, line 189, in construct_nn_L1
train_trace = pm.sample(draws =5000, tune = 3000)
File “/home/user/anaconda3/lib/python3.6/site-packages/pymc3/”, line 442, in sample
trace = _mp_sample(**sample_args)
File “/home/user/anaconda3/lib/python3.6/site-packages/pymc3/”, line 982, in _mp_sample
traces = Parallel(n_jobs=cores, mmap_mode=None)(jobs)
File “/home/user/anaconda3/lib/python3.6/site-packages/joblib/”, line 789, in call
File “/home/user/anaconda3/lib/python3.6/site-packages/joblib/”, line 699, in retrieve
File “/home/user/anaconda3/lib/python3.6/multiprocessing/”, line 644, in get
raise self._value
File “/home/user/anaconda3/lib/python3.6/multiprocessing/”, line 424, in _handle_tasks
File “/home/user/anaconda3/lib/python3.6/site-packages/joblib/”, line 371, in send
CustomizablePickler(buffer, self._reducers).dump(obj)
TypeError: can’t pickle fortran objects


Can you try setting cores=1 in pm.sample?


Then it works. But why is that before it is not a problem ? :thinking:


Then this is not related to PyMC3 - it is a joblib problem.
Try upgrading joblib, please report back if you still seeing this problem.