Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Slice sampler & n_chains>1: AttributeError: Can't pickle local object 'main.<locals>.logp' #25

Open
Gabriel-p opened this issue Aug 21, 2018 · 0 comments

Comments

@Gabriel-p
Copy link

I'm using the master branch of sampyl. My conda environment:

$ conda list
# packages in environment at /home/gabriel/anaconda3/envs/asteca3:
#
# Name                    Version                   Build  Channel
astropy                   3.0.4            py37h14c3975_0  
atomicwrites              1.1.5                    py37_0  
attrs                     18.1.0                   py37_0  
autograd                  1.2                       <pip>
blas                      1.0                         mkl  
ca-certificates           2018.03.07                    0  
certifi                   2018.8.13                py37_0  
cycler                    0.10.0                   py37_0  
cython                    0.28.5           py37hf484d3e_0  
dbus                      1.13.2               h714fa37_1  
emcee                     2.2.1              pyh24bf2e0_4    astropy
expat                     2.2.5                he0dffb1_0  
fontconfig                2.13.0               h9420a91_0  
freetype                  2.9.1                h8a8886c_0  
future                    0.16.0                    <pip>
glib                      2.56.1               h000015b_0  
gst-plugins-base          1.14.0               hbbd80ab_1  
gstreamer                 1.14.0               hb453b48_1  
icu                       58.2                 h9c2bf20_1  
intel-openmp              2018.0.3                      0  
jpeg                      9b                   h024ee3a_2  
kiwisolver                1.0.1            py37hf484d3e_0  
libedit                   3.1.20170329         h6b74fdf_2  
libffi                    3.2.1                hd88cf55_4  
libgcc-ng                 7.2.0                hdf63c60_3  
libgfortran-ng            7.2.0                hdf63c60_3  
libpng                    1.6.34               hb9fc6fc_0  
libstdcxx-ng              7.2.0                hdf63c60_3  
libuuid                   1.0.3                h1bed415_2  
libxcb                    1.13                 h1bed415_1  
libxml2                   2.9.8                h26e45fe_1  
matplotlib                2.2.2            py37hb69df0a_2  
mkl                       2018.0.3                      1  
mkl_fft                   1.0.4            py37h4414c95_1  
mkl_random                1.0.1            py37h4414c95_1  
more-itertools            4.2.0                    py37_0  
ncurses                   6.1                  hf484d3e_0  
numpy                     1.15.0           py37h1b885b7_0  
numpy-base                1.15.0           py37h3dfced4_0  
openssl                   1.0.2p               h14c3975_0  
pandas                    0.23.3           py37h04863e7_0  
patsy                     0.5.0                    py37_0  
pcre                      8.42                 h439df22_0  
pip                       10.0.1                   py37_0  
pip                       18.0                      <pip>
pluggy                    0.6.0                    py37_0  
psutil                    5.4.6            py37h14c3975_0  
py                        1.5.4                    py37_0  
pyparsing                 2.2.0                    py37_1  
pyqt                      5.9.2            py37h22d08a2_0  
pytest                    3.6.3                    py37_0  
pytest-arraydiff          0.2              py37h39e3cac_0  
pytest-astropy            0.4.0                    py37_0  
pytest-doctestplus        0.1.3                    py37_0  
pytest-openfiles          0.3.0                    py37_0  
pytest-remotedata         0.3.0                    py37_0  
python                    3.7.0                hc3d631a_0  
python-dateutil           2.7.3                    py37_0  
pytz                      2018.5                   py37_0  
qt                        5.9.6                h52aff34_0  
readline                  7.0                  ha6073c6_4  
scipy                     1.1.0            py37hc49cb51_0  
seaborn                   0.9.0                    py37_0  
setuptools                39.2.0                   py37_0  
sip                       4.19.8           py37hf484d3e_0  
six                       1.11.0                   py37_1  
sqlite                    3.24.0               h84994c4_0  
statsmodels               0.9.0            py37h035aef0_0  
tk                        8.6.7                hc745277_3  
tornado                   5.0.2            py37h14c3975_0  
wheel                     0.31.1                   py37_0  
xz                        5.2.4                h14c3975_4  
zlib                      1.2.11               ha838bed_2  

I get a AttributeError: Can't pickle local object 'main.<locals>.logp' in the line

new_chains = pool.map(func, samplers)

whenever I use more than one chain and the Slice sampler.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant