我尝试将PyMC3与各种不同的模型一起使用,但始终收到相同的错误:“ TypeError:无法腌制CVM对象”。
这是完整的追溯:
Traceback (most recent call last):
File "<ipython-input-4-4b462b460b57>", line 3, in <module>
trace = pm.sample(500)
File "/anaconda3/lib/python3.6/site-packages/pymc3/sampling.py", line 442, in sample
trace = _mp_sample(**sample_args)
File "/anaconda3/lib/python3.6/site-packages/pymc3/sampling.py", line 982, in _mp_sample
traces = Parallel(n_jobs=cores, mmap_mode=None)(jobs)
File "/anaconda3/lib/python3.6/site-packages/joblib/parallel.py", line 962, in __call__
self.retrieve()
File "/anaconda3/lib/python3.6/site-packages/joblib/parallel.py", line 865, in retrieve
self._output.extend(job.get(timeout=self.timeout))
File "/anaconda3/lib/python3.6/site-packages/joblib/_parallel_backends.py", line 515, in wrap_future_result
return future.result(timeout=timeout)
File "/anaconda3/lib/python3.6/site-packages/joblib/externals/loky/_base.py", line 431, in result
return self.__get_result()
File "/anaconda3/lib/python3.6/site-packages/joblib/externals/loky/_base.py", line 382, in __get_result
raise self._exception
TypeError: can't pickle CVM objects
我尝试寻找解决此错误的方法,但尚未找到解决方法。有什么建议吗?
答案 0 :(得分:1)
从master分支安装似乎可以解决问题:pip3 install -U git + https://github.com/pymc-devs/pymc3.git
希望这对某人有帮助!