rstan/brms导致R和RStudio会话中止。

huangapple go评论73阅读模式
英文:

rstan/brms cause R and RStudio session abort

问题

我遇到了与https://stackoverflow.com/questions/72168874/rstan-and-brms-cause-r-and-rstudio-session-abort/76575711#76575711非常相似的问题。每当开始抽样时,R会崩溃(R会话中止)。

我已经尝试重新安装rstan以及建议的依赖项,但没有起作用。

你是否有任何建议?

  • 更新 1
英文:

I am experiencing a very similar issue as https://stackoverflow.com/questions/72168874/rstan-and-brms-cause-r-and-rstudio-session-abort/76575711#76575711. Whenever it starts sampling, R crashes (R session abort).

I have tried reinstalling rstan along the suggested dependencies, but it has not worked.

Would you happen to have any suggestions?

  • update 1
─ Session info ────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
 setting  value
 version  R version 4.3.1 (2023-06-16)
 os       macOS Ventura 13.4.1
 system   x86_64, darwin20
 ui       RStudio
 language (EN)
 collate  en_US.UTF-8
 ctype    en_US.UTF-8
 tz       Europe/London
 date     2023-06-28
 rstudio  2023.03.0+386 Cherry Blossom (desktop)
 pandoc   2.11 @ /Users/edoardogiuseppeostinelli/opt/anaconda3/bin/pandoc

─ Packages ────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
 package     * version date (UTC) lib source
 cachem        1.0.8   2023-05-01 [1] CRAN (R 4.3.0)
 callr         3.7.3   2022-11-02 [1] CRAN (R 4.3.0)
 cli           3.6.1   2023-03-23 [1] CRAN (R 4.3.0)
 crayon        1.5.2   2022-09-29 [1] CRAN (R 4.3.0)
 devtools      2.4.5   2022-10-11 [1] CRAN (R 4.3.0)
 digest        0.6.32  2023-06-26 [1] CRAN (R 4.3.0)
 ellipsis      0.3.2   2021-04-29 [1] CRAN (R 4.3.0)
 fastmap       1.1.1   2023-02-24 [1] CRAN (R 4.3.0)
 fs            1.6.2   2023-04-25 [1] CRAN (R 4.3.0)
 glue          1.6.2   2022-02-24 [1] CRAN (R 4.3.0)
 htmltools     0.5.5   2023-03-23 [1] CRAN (R 4.3.0)
 htmlwidgets   1.6.2   2023-03-17 [1] CRAN (R 4.3.0)
 httpuv        1.6.11  2023-05-11 [1] CRAN (R 4.3.0)
 later         1.3.1   2023-05-02 [1] CRAN (R 4.3.0)
 lifecycle     1.0.3   2022-10-07 [1] CRAN (R 4.3.0)
 magrittr      2.0.3   2022-03-30 [1] CRAN (R 4.3.0)
 memoise       2.0.1   2021-11-26 [1] CRAN (R 4.3.0)
 mime          0.12    2021-09-28 [1] CRAN (R 4.3.0)
 miniUI        0.1.1.1 2018-05-18 [1] CRAN (R 4.3.0)
 pkgbuild      1.4.2   2023-06-26 [1] CRAN (R 4.3.0)
 pkgload       1.3.2   2022-11-16 [1] CRAN (R 4.3.0)
 prettyunits   1.1.1   2020-01-24 [1] CRAN (R 4.3.0)
 processx      3.8.1   2023-04-18 [1] CRAN (R 4.3.0)
 profvis       0.3.8   2023-05-02 [1] CRAN (R 4.3.0)
 promises      1.2.0.1 2021-02-11 [1] CRAN (R 4.3.0)
 ps            1.7.5   2023-04-18 [1] CRAN (R 4.3.0)
 purrr         1.0.1   2023-01-10 [1] CRAN (R 4.3.0)
 R6            2.5.1   2021-08-19 [1] CRAN (R 4.3.0)
 Rcpp          1.0.10  2023-01-22 [1] CRAN (R 4.3.0)
 remotes       2.4.2   2021-11-30 [1] CRAN (R 4.3.0)
 rlang         1.1.1   2023-04-28 [1] CRAN (R 4.3.0)
 rstudioapi    0.14    2022-08-22 [1] CRAN (R 4.3.0)
 sessioninfo   1.2.2   2021-12-06 [1] CRAN (R 4.3.0)
 shiny         1.7.4   2022-12-15 [1] CRAN (R 4.3.0)
 stringi       1.7.12  2023-01-11 [1] CRAN (R 4.3.0)
 stringr       1.5.0   2022-12-02 [1] CRAN (R 4.3.0)
 urlchecker    1.0.1   2021-11-30 [1] CRAN (R 4.3.0)
 usethis       2.2.1   2023-06-23 [1] CRAN (R 4.3.0)
 vctrs         0.6.3   2023-06-14 [1] CRAN (R 4.3.0)
 xtable        1.8-4   2019-04-21 [1] CRAN (R 4.3.0)

 [1] /Library/Frameworks/R.framework/Versions/4.3-x86_64/Resources/library

答案1

得分: 1

尝试使用cmdstanr后端

backend: 字符串,用于指定用于拟合Stan模型的后端包名称。选项为‘"rstan"’(默认值)或‘"cmdstanr"’。可以通过当前R会话的‘"brms.backend"’选项(请参阅‘options’)在全局范围内进行设置。有关‘rstan’和‘cmdstanr’包的详细信息分别可在<https://mc-stan.org/rstan/>和<https://mc-stan.org/cmdstanr/>找到。

我还在这里提供了一些设置说明。

英文:

Try using the cmdstanr backend

> backend: Character string naming the package to use as the backend for
fitting the Stan model. Options are ‘"rstan"’ (the default)
or ‘"cmdstanr"’. Can be set globally for the current R
session via the ‘"brms.backend"’ option (see ‘options’).
Details on the ‘rstan’ and ‘cmdstanr’ packages are available
at <https://mc-stan.org/rstan/> and
<https://mc-stan.org/cmdstanr/>, respectively.

I also have some setup instructions here.

huangapple
  • 本文由 发表于 2023年6月29日 04:03:01
  • 转载请务必保留本文链接:https://go.coder-hub.com/76576373.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定