-
-
Notifications
You must be signed in to change notification settings - Fork 93
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
Don't enforce fixed_param
sampler when model has no parameters
#1054
Conversation
thank you for undoing a really ugly hack. after stan-dev/stan#3071 plus this,
|
It says
Yes. Adaptive and non-adaptive HMC samplers both use |
thanks for checking. the problem is some combination of logic here:
will fix for next release. |
Is this a safe bet for 2.29? Downstream processing would be a lot easier |
This is blocked on #1057. If that's going to be resolved with just a better error message then this PR isn't viable; the adaptive and nonadaptive HMC samplers must be interchangeable. |
Disregard the last comment; this works even without #1057 because stan-dev/stan#3071 now fixes adaptive samplers too. |
is this outdated? close PR? |
Submisison Checklist
./runCmdStanTests.py src/test
Summary:
Before CmdStan 2.27 you could not sample from a parameterless model with the default settings. CmdStan 2.27 fixes this annoyance by automatically switching to
fixed_param
sampler when model has zero parameters. (It changes not only defaults but also forcesfixed_param
even if HMC is explicitly specified.)This fix however causes problems for interfaces like CmdStanPy because the interface thinks the sampler is HMC and the output CSV from
fixed_param
is missing expected adaptation info. PR #1030 intends to fix that issue by adjusting the sampler config recorded in the CSV file.This PR is an alternative to #1030. Instead of modifying the config info this simply reverses the
fixed_param
hack; HMC is always the default. Parameterless models will be able to run HMC just fine after stan-dev/stan#3071 is merged.Copyright and Licensing
Please list the copyright holder for the work you are submitting (this will be you or your assignee, such as a university or company): Niko Huurre
By submitting this pull request, the copyright holder is agreeing to license the submitted work under the following licenses: