-
-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Simplify mcmc module #6269
Simplify mcmc module #6269
Conversation
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## main #6269 +/- ##
===========================================
- Coverage 94.38% 82.46% -11.93%
===========================================
Files 108 111 +3
Lines 23839 23820 -19
===========================================
- Hits 22501 19643 -2858
- Misses 1338 4177 +2839
|
a4e92cb
to
217fa40
Compare
Is this similar to the "broken functionality" in this issue: #6116. If so we could also remove it there and close the issue |
This might be a matter of incorrect type annotation: In But yes, it sounds like a similar feature. If we want to support this, I would suggest to reintroduce it with a separate kwarg |
This is in preparation of decoupling population-sampling related code from other functions in `mcmc.py`.
This uncouples several things: * `_init_trace` is now independent of abstract step-methods * `mcmc` is now unaware of `NDArray` * code for population-sampling can now be extracted from `mcmc`
1df0698
to
21e9824
Compare
What is this PR about?
I'm refactoring
mcmc.py
(exsampling.py
) to prepare for extraction of population-sampling related code frommcmc.py
.Next to the simplification and moving of code, I also removed support for selecting which variables to include in the trace.
I have never seen this applied anywhere, but anybody feel free to object.
However, if we decide to not make this breaking change, we should still refactor the internal functions towards a clear distinction of
trace
vs.trace_vars
.Major / Breaking Changes
pm.sample(trace=[...])
.Bugfixes / New features
Docs / Maintenance
mcmc.py
down into other modules.