question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

pm.sample cannot pickle LimbDark object

See original GitHub issue

Error 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:closed
  • Created 3 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
dfmcommented, Oct 20, 2020

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!).

1reaction
dfmcommented, Oct 20, 2020

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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found