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


#1

Hallo
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/BNN_V1.py”, line 189, in construct_nn_L1
train_trace = pm.sample(draws =5000, tune = 3000)
File “/home/user/anaconda3/lib/python3.6/site-packages/pymc3/sampling.py”, line 442, in sample
trace = _mp_sample(**sample_args)
File “/home/user/anaconda3/lib/python3.6/site-packages/pymc3/sampling.py”, line 982, in _mp_sample
traces = Parallel(n_jobs=cores, mmap_mode=None)(jobs)
File “/home/user/anaconda3/lib/python3.6/site-packages/joblib/parallel.py”, line 789, in call
self.retrieve()
File “/home/user/anaconda3/lib/python3.6/site-packages/joblib/parallel.py”, line 699, in retrieve
self._output.extend(job.get(timeout=self.timeout))
File “/home/user/anaconda3/lib/python3.6/multiprocessing/pool.py”, line 644, in get
raise self._value
File “/home/user/anaconda3/lib/python3.6/multiprocessing/pool.py”, line 424, in _handle_tasks
put(task)
File “/home/user/anaconda3/lib/python3.6/site-packages/joblib/pool.py”, line 371, in send
CustomizablePickler(buffer, self._reducers).dump(obj)
TypeError: can’t pickle fortran objects


#2

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


#3

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


#4

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