docs(jax): correct postprocessing_vectorize default in sample_jax_nuts docstring#8283
Open
xodn348 wants to merge 1 commit into
Open
docs(jax): correct postprocessing_vectorize default in sample_jax_nuts docstring#8283xodn348 wants to merge 1 commit into
xodn348 wants to merge 1 commit into
Conversation
…s docstring The docstring claimed the default was 'scan', but the function body sets it to 'vmap' when None is supplied (the actual default). Fixes the misleading documentation that caused users to accidentally rely on the wrong default after removing an explicit argument. Fixes pymc-devs#8238
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.
Description
Fixes a docstring inaccuracy in
sample_numpyro_nuts/sample_blackjax_nuts(the shared parameter section inpymc/sampling/jax.py).The parameter description for
postprocessing_vectorizestatesdefault "scan", but the actual runtime default is"vmap". Whenpostprocessing_vectorize=None(i.e., the caller uses the default), the function body sets it to"vmap":This mismatch led a user (#8238) to remove their explicit
postprocessing_vectorize="scan"argument (after reading that "scan" was the default) and accidentally switch to"vmap", causing an out-of-memory error.The one-character change corrects
default "scan"→default "vmap"so the docstring matches the actual behaviour.Related Issue
Checklist
pre-commit run --files pymc/sampling/jax.py— all hooks passed)Type of change
Local verification