metrumresearchgroup / bbr.bayes

Bayesian modeling with BBR
https://metrumresearchgroup.github.io/bbr.bayes/
Other
5 stars 1 forks source link

cmdstanr-related test failures #147

Closed kyleam closed 5 months ago

kyleam commented 5 months ago

main is currently failing due to an incompatibility between the latest cmdstan (2.35.0) and the cmdstanr version on MPN (0.7.1).

https://github.com/metrumresearchgroup/bbr.bayes/actions/runs/9452298953/job/26035173725

 ── Error ('test-workflow-stan.R:38:3'): stan: submit_model() works with copied model ──
Error in `!is.null(csv_contents$metadata$save_warmup) && csv_contents$metadata$save_warmup`: invalid 'y' type in 'x && y'
Backtrace:
     ▆
  1. ├─utils::capture.output(...) at test-workflow-stan.R:38:3
  2. │ └─base::withVisible(...elt(i))
  3. ├─bbr::submit_model(mod2, .mode = "local", .overwrite = TRUE)
  4. └─bbr.bayes:::submit_model.bbi_stan_model(...) at bbr/R/submit-model.R:61:3
  5.   └─bbr.bayes:::submit_stan_model_cmdstanr(...) at bbr.bayes/R/submit-model.R:127:3
  6.     ├─base::do.call(stanmod[[.method]], args = stanargs) at bbr.bayes/R/submit-model.R:226:3
  7.     └─cmdstanr (local) `<fn>`(...)
  8.       └─CmdStanMCMC$new(runset) at cmdstanr/R/model.R:1264:3
  9.         └─cmdstanr (local) initialize(...)
 10.           └─private$read_csv_(variables = "", sampler_diagnostics = convert_hmc_diagnostic_names(diagnostics)) at cmdstanr/R/fit.R:1335:11

I've confirmed that the bbr.bayes test suite passes with 1) the latest cmdstanr from https://mc-stan.org/r-packages (0.8.0) and the latest cmdstan and 2) the cmdstanr from MPN and the previous cmdstan (2.34.1).

At this point, the solution will just be to wait for a newer cmdstanr to hit MPN.

kyleam commented 5 months ago

Resolved with the latest MPN snapshot.

https://github.com/metrumresearchgroup/bbr.bayes/actions/runs/9556117284