exoplanet-dev / exoplanet-dev/exoplanet

PyMC v5 Sampling Performance Issues

Open
#349 7 comments 2 reactions 0 assignees View on GitHub
bug
Dominant language
Python
Stars
239
Forks
57
PR merge metrics
No merged PRs in 30d

Description

Sampling performance when using PyMC v5 compared to PyMC3 seems to be significantly degraded, both in sampling speed and accuracy. Running the [transit.ipynb tutorial](https://gallery.exoplanet.codes/tutorials/transit/) in separate conda environments with each version shows this.

PyMC3 Results:
Sampler:
![Image](https://github.com/user-attachments/assets/6e0a566c-43f5-4664-b2d9-9eeb95f08d85)

Arviz Summary:
![Image](https://github.com/user-attachments/assets/2b7d8d31-5d7e-4446-8066-9bb64edba0a7)

Corner plot:
![Image](https://github.com/user-attachments/assets/a2940ce6-8837-4860-a975-1596226eeda8)

Compare to the PyMC5 Results:
Sampler:
![Image](https://github.com/user-attachments/assets/06af415f-9e28-422b-ae40-116446e3c174)
Arviz Summary:
![Image](https://github.com/user-attachments/assets/ef2ea820-9a6a-45f1-929d-f9dacb8d0b03)
Corner plot:
![Image](https://github.com/user-attachments/assets/538e3743-e947-4f08-b52c-1930b6241068)

I have no idea why this might be the case, and it'd be nice to be able to use current versions of PyMC for various applications.

Contributor guide

Open the contributing guide

Research direction

Start by running the transit.ipynb tutorial in separate conda environments with PyMC3 and PyMC v5, as described in the issue, and compare sampling speed, accuracy, ArviZ summaries, and corner plots. Done means identifying the source of the regression or narrowing it to a reproducible component with evidence from the tutorial comparison.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
data, performance
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.