pymc-devs / pymc

Bayesian Modeling and Probabilistic Programming in Python
https://docs.pymc.io/
Other
8.49k stars 1.97k forks source link

Make default STEP_METHODS a list that can be modified #7231

Closed ricardoV94 closed 3 months ago

ricardoV94 commented 3 months ago

Description

Having as a tuple is a bit cumbersome and makes it seem like it should not be modified. However, until we have a more proper system (disptach based probably), this is the API for other packages (including BART, pymc-experimental) to define default samplers.

This PR makes it a list (and over-engineers a fixture for the test :D, happy to remove if you think it's silly)

Related Issue

Checklist

Type of change

codecov[bot] commented 3 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 92.29%. Comparing base (22e8f0b) to head (68457f2).

Additional details and impacted files [![Impacted file tree graph](https://app.codecov.io/gh/pymc-devs/pymc/pull/7231/graphs/tree.svg?width=650&height=150&src=pr&token=JFuXtOJ4Cb&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pymc-devs)](https://app.codecov.io/gh/pymc-devs/pymc/pull/7231?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pymc-devs) ```diff @@ Coverage Diff @@ ## main #7231 +/- ## ======================================= Coverage 92.29% 92.29% ======================================= Files 101 101 Lines 16892 16892 ======================================= Hits 15590 15590 Misses 1302 1302 ``` | [Files](https://app.codecov.io/gh/pymc-devs/pymc/pull/7231?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pymc-devs) | Coverage Δ | | |---|---|---| | [pymc/step\_methods/\_\_init\_\_.py](https://app.codecov.io/gh/pymc-devs/pymc/pull/7231?src=pr&el=tree&filepath=pymc%2Fstep_methods%2F__init__.py&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pymc-devs#diff-cHltYy9zdGVwX21ldGhvZHMvX19pbml0X18ucHk=) | `100.00% <100.00%> (ø)` | |
ricardoV94 commented 3 months ago

The order should not be important, except that for RNG reproducibility it always ends up being important. Repeated entries shouldn't be a problem