Don't enforce fixed_param sampler when model has no parameters#1054
Don't enforce fixed_param sampler when model has no parameters#1054nhuurre wants to merge 2 commits intostan-dev:developfrom
fixed_param sampler when model has no parameters#1054Conversation
|
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/testSummary:
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_paramsampler when model has zero parameters. (It changes not only defaults but also forcesfixed_parameven 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_paramis 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_paramhack; 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: