feat(sampling): allow dynamic tuning steps (Fixes #8080)#8110
Open
Jayant-kernel wants to merge 3 commits intopymc-devs:mainfrom
Open
feat(sampling): allow dynamic tuning steps (Fixes #8080)#8110Jayant-kernel wants to merge 3 commits intopymc-devs:mainfrom
Jayant-kernel wants to merge 3 commits intopymc-devs:mainfrom
Conversation
Author
|
@ricardoV94 @aloctavodia The implementation allows steps to declare their own tuning needs (e.g., Gibbs tune=0) and falls back to the default otherwise. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR allows step methods to declare their required number of tuning steps, instead of relying on the hardcoded default of 1000. This is efficient for samplers like [CategoricalGibbsMetropolis]
(cci:2://file:///c:/Users/jayan/Desktop/pymc/pymc/step_methods/metropolis.py:687:0-865:38) which require 0 tuning steps.
Changes:
Added
default_tune_stepsattribute to [BlockedStep](cci:2://file:///c:/Users/jayan/Desktop/pymc/pymc/step_methods/compound.py:103:0-238:56) (defaults to
None-> 1000).Set
default_tune_steps = 0for [CategoricalGibbsMetropolis](cci:2://file:///c:/Users/jayan/Desktop/pymc/pymc/step_methods/metropolis.py:687:0-865:38) and BinaryGibbsMetropolis.
Updated
pm.sampleto resolvetune=Noneby checking the step methods.I verified this with new unit tests and by confirming that
CategoryGibbsMetropolisnow produces traces with 0 warmup steps by default. @ricardoV94 this is ready for your review.Related Issue:
markdown
Checklist:
markdown