Closed LucaNap closed 3 years ago
This is probably not a starry
issue. See here for a similar issue using pymc3
: https://github.com/pymc-devs/pymc3/issues/3388. It actually seems to be specifically an issue for multiprocessing in Jupyter notebooks on Windows: https://github.com/pymc-devs/pymc3/issues/3388#issuecomment-468636046
One of their suggestions is to use cores=1
to disable multiprocessing.
This is probably not a
starry
issue. See here for a similar issue usingpymc3
: pymc-devs/pymc3#3388. It actually seems to be specifically an issue for multiprocessing in Jupyter notebooks on Windows: pymc-devs/pymc3#3388 (comment)One of their suggestions is to use
cores=1
to disable multiprocessing.
Spot on! Also, apparently sometimes it's useful to use the option pickle_backend='dill'
.
Just for the record, I am having a couple of problems with the planetary radius sometimes going negative in the sampling (thus interrupting the process), but the issue is probably going to be fixed by:
p_radius = pm.Bound(pm.Normal, lower=0.01, upper=0.2)("p_radius", mu=0.1, sd=0.05)
Thank you
Yes, that will probably do it. Just keep in mind that you might have to explicitly pass a testval
when using pm.Bound
:
p_radius = pm.Bound(pm.Normal, lower=0.01, upper=0.2)("p_radius", mu=0.1, sd=0.05, testval=0.1)
I remember an issue (which may have been fixed) that it defaults to zero, which could cause trouble. But I could be wrong!
OS: Windows 10, with latest version of Starry on Anaconda
I have encountered this issue while trying to fit my own data so I tried to replicate it into the Hot Jupiter notebook in order to make it simple to debug: basically I am trying to find the planet radius injected into the system (r=0.1) by using in the pymc3 model:
p_radius = pm.Normal("p_radius", mu=0.1, sd=0.02)
and
b = starry.Secondary( starry.Map(ydeg=1, udeg=0, amp=10 ** log_amp, inc=90.0, obl=0.0), m=0.0, r=p_radius, prot=1.0, porb=1.0, )
and the notebook runs fine up until I try to evaluate the posteriors over the model parameters. At this point, for some reason (which might be more related to pymc3 rather than starry itself), the chains get stuck at 0% and the following error is returned:
The same goes for the star radius, masses and so on. Am I doing anything wrong?