Skip to content
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

Environment checks in system progress preperation throws error in Positron #1149

Open
milesalanmoore opened this issue Jan 13, 2025 · 0 comments

Comments

@milesalanmoore
Copy link

milesalanmoore commented Jan 13, 2025

Hi stan-dev!

I have been trying out the new IDE from Posit, Positron, and have been really loving it. However, when I run a parallelized stan model (by specifying cores in the call to a brms model for example), rstan opens up a port in my browser with the following error message:

Cannot GET /var/folders/lm/4jkt0_jd37j4c_68xmrxp7f00000gn/T//Rtmpp3I1Pz/file5568b9aee29_StanProgress.txt

This behavior is OS agnostic and only applies to the case when a user runs chains in parallel as in:

library(brms)

# This runs without issue
brms::brm(
  mpg ~ hp * cyl, 
  data = mtcars)

# This opens the browser tab
m_mpg = brm(
  mpg ~ hp * cyl, 
  data = mtcars,
chains=4, cores=4)

For reference, see my issue on Positron's repo here.

In it, @juliasilge points out that this behavior is likely a result of rstan's environment checks with Sys.getenv("RSTUDIO"). See the code below, which would not be set to 1 for users working in Positron. Is it possible to generalize these checks a bit to include Positron, @juliasilge provides an example of what she thinks this might look like (linked above).

!identical(Sys.getenv("RSTUDIO"), "1"),

I am happy to take a swing at implementing this if helpful, as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant