-
-
Notifications
You must be signed in to change notification settings - Fork 269
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
rstan
fails to read cmdstanr
output .csv files
#1133
Comments
I can reproduce the issue - outputs from CmdStan 2.34.1 are read fine, outputs from 2.35.0 cause problems. Although I get a different error message (maybe because of using R 4.3.2)
I'll also note that the problem is made worse by the code at: rstan/rstan/rstan/R/stan_csv.R Line 220 in 9b8d8fe
save_warmup is not all 0 or all 1, n_kept never gets assigned.
|
Thanks. I think this might be fixed by #1131. Or at least the |
Ah good point. Perhaps we should revert #1131 and figure out a more general approach? @bgoodri @andrjohns we probably need to decide whether we want to keep supporting this functionality in RStan. If there continue to be changes in the CSV files created by CmdStan I don't think RStan can keep up with releases in order to make sure |
The approach I took for |
Note that using cmdstanr with brms relies on read_stan_csv. We probably
should add a test with fixed CSVs from s couple CmdStan versions and it
should be OK....
Dne st 31. 7. 2024 19:37 uživatel Andrew Johnson ***@***.***>
napsal:
… The approach I took for cmdstanr for compatibility with both was to convert
any true/false to 0/1
<https://github.com/stan-dev/cmdstanr/blob/0e3a99a52bc5ad15d9e386e9993c10ad6905818b/R/csv.R#L843>,
so that the parsing logic for the rest stayed the same
—
Reply to this email directly, view it on GitHub
<#1133 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ACILKU3PJQLPI4IAEB7ONHDZPEOFFAVCNFSM6AAAAABKVJVGVGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDENRRGAZDMNZXGE>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
It doesn't look like that's the case anymore (which makes sense, otherwise there would have been a ton of bug reports in |
Yeah that would have been a mess! |
Summary:
rstan::read_stan_csv()
no longer works for for .csv files produced bycmdstanr
Description:
It seems that
rstan
expects thesave_warmup
field to be an integer value, butcmdstanr
instead writes this as a logical value (e.g.,false
) to the conversion to integer fails inrstan:::parse_stancsv_comments()
resulting in anNA
value forsave_warmup
. This used to work with earlier versions ofcmdstanr
/CmdStan
.Reproducible Steps:
Created on 2024-07-10 with reprex v2.1.1
RStan Version:
2.32.6
R Version:
R version 4.4.0 (2024-04-24 ucrt)
Operating System:
Windows 11 Pro 23H2
The text was updated successfully, but these errors were encountered: