-
-
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
num_chains argument fails silently for unsupported algorithms, still creates output files #1057
Comments
num_chains is currently only supported with NUTS + dense_e or diag_e. Anything else is not supported. A helpful error message would be nice though. |
Silently ignoring that it was requested is pretty bad, yeah. The fact that it outputs 7 files still is even worse, especially when combined with the current behavior that fixed_params can be turned on without the user asking for it |
Same problem for nuts without adaptation. |
@nsiccha so your model has parameters and you set |
@rok-cesnovar Yes, Multiple files are created, only the first contains draws and no error is reported. I doubt that it can work for you. First, there is a hidden error message describing this lacking feature but which doesn't get printed here: cmdstan/src/cmdstan/command.hpp Lines 359 to 361 in 34145a3
Second, the calls to non-adapting nuts extract only the first "context", see e.g. here: cmdstan/src/cmdstan/command.hpp Lines 815 to 819 in 34145a3
Finally, there's simply no mention at all of num_chains outside of the adapting nuts calls: https://github.com/stan-dev/stan/search?q=num_chains+path%3Asrc%2Fstan%2Fservices |
Ah yes, this is simply because |
Well I'll simply not use it till everything is ready, so no big deal for me. 🤷 |
That sounds reasonable. The error messaging will definitely be improved for the next release, not sure on providing multiple chains within a single executable for all services. That will probably be extended more slowly. |
Updated the title to reflect that this isn't just a fixed_param issue but any unsupported sampler |
@rok-cesnovar will this be improved before 2.29? |
Yeah, should have time to expand error messaging this week. |
Summary:
When
algorithm=fixed_param
(either implicitly as is being removed in #1054 or explicitly) and num_chains is set to a value other than1
, multiple files are created but only the first contains any draws.Reproducible Steps:
Model:
data:
command:
./bernoulli_datagen sample num_chains=7 algorithm=fixed_param data file=data.json
Current Output:
Files
output_#.csv
for 1 to 7. File 1 contains draws, remainder contain only the CmdStan header comment with no csv data.Expected Output:
Either this should produce an error or each file should contain draws
Additional Information:
Related:
stan-dev/cmdstanpy#495
Current Version:
v2.28.1
The text was updated successfully, but these errors were encountered: