pm.sample cannot pickle LimbDark object
See original GitHub issueError
Getting TypeError: cannot pickle 'exoplanet.theano_ops.driver.LimbDark' object
when sampling a model containing LimbDarkLightCurve
Reproduction
Fresh virtualenv with exoplanet
, pymc3
, tqdm
installed
python3 -m venv xotest
source ./xotest/bin/activate.fish
pip install tqdm exoplanet pymc3
and running docs/tutorials/transit.py
cd xotest
curl -O https://raw.githubusercontent.com/exoplanet-dev/exoplanet/main/docs/tutorials/transit.py
python ./transit.py
Setup:
- exoplanet==0.4.0
- macOS 10.14.6
- Python 3.8.5
- pip 20.1.1
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
TypeError: cannot pickle 'fortran' object - PyMC Discourse
Hi, Facing issue while running pm.sample “Multiprocess sampling (2 chains in 2 jobs) NUTS: [gamma, alpha, beta_comp, beta, decay, peak, ...
Read more >Python: can't pickle module objects error - Stack Overflow
It checks the object in question to see if it fails pickling. Then iterates trying to pickle the keys in __dict__ returning the...
Read more >PyAstronomy Documentation - Read the Docs
PyAstronomy (PyA) is a collection of astronomy related packages. The aim of PyAstronomy is to provide a collection of packages, ...
Read more >Exoplanet Handbook
hints of planetary mass objects orbiting other stars were reported in the late 1980s. ... giants piled up towards 0.03 AU that cannot...
Read more >47263-8.txt - Project Gutenberg
I gathered some fruits, but they are not quite ripe; I am trying to ripen them ... Again we find that certain peaches...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
This will all have something to do with running in a Jupyter environment vs a script. These tutorials are designed to be run using jupytext, not directly as a script. #120 fixes the issue with pickling and #121 will track documenting best practices for running parallel sampling as a script (this is where the
__name__
part comes in!).OK - I’ll take a look into this because it would be good to be able to pickle these models, but I don’t understand why I haven’t run into a sampling issue before if you’re still getting it. I use parallel sampling on macos and ubuntu every day with v0.4 and the tutorial is automatically run on CI for every push.