Change to always return warmup period when save_warmup is TRUE #28
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.
You previously commited this change to fix a bug I reported in this issue. The main issue was fixed but it introduced a new bug.
When the user sets
save_warmup=TRUEthe diagnostic output gets trimmed, which is correct for checking diagnostics, but it then returns that. So downstream the user cannot look at the sampler parameters during the warmup. This e.g., breaks a link to something like ShinyStan. It is also unexpected from a user perspective thatsave_warmupdoes not control whether the warmup samples are saved.This PR just moves the filtering of warmup samples when calling
check_hmc_diagnostics.It passes tests locally. A quick reprex from the README shows the behavior:
Where the first has 2000 rows and the second 1000 rows.