You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Because the second condition checks for execute permissions, the path is not used if these permissions do not exist. However, at least for saving the CSV files, such permissions are not needed.
Reproducible Steps:
When using
m <- stan_model(model_code = 'parameters {real y;} model {y ~ normal(0,1);}')
f <- sampling(m, iter = 100, sample_file = "W:/debug/samples.csv", cores= 1) # with multiple cores the warning is not shown
I get a warning "W:/debug" is not writable; use "W:\debug\tmp\Rtmp6tv72d" instead. But changing to that folder gives the same error due to the lack of execute permissions on our server.
But mocking the is_dir_writable function so that it always returns TRUE, allows me to performs sampling to samples.csv without any problems:
mockthat::local_mock(is_dir_writable = TRUE, mock_env = "rstan")
f <- sampling(m, iter = 100, sample_file = "W:/debug/samples.csv", cores= 1)
fit <- read_stan_csv(c("W:/debug/samples_1.csv", "W:/debug/samples_2.csv"))
RStan Version:
2.32.6
R Version:
4.3.1
Operating System:
Windows 10
The text was updated successfully, but these errors were encountered:
Summary:
You can't save the CSV output of Stan user-defined files if the user does not have execute permissions on that folder.
Description:
When using
sample_file
anddiagnostic_file
arguments, the file path permissions are checked with theis_dir_writable
function:Because the second condition checks for execute permissions, the path is not used if these permissions do not exist. However, at least for saving the CSV files, such permissions are not needed.
Reproducible Steps:
When using
I get a warning
"W:/debug" is not writable; use "W:\debug\tmp\Rtmp6tv72d" instead
. But changing to that folder gives the same error due to the lack of execute permissions on our server.But mocking the
is_dir_writable
function so that it always returns TRUE, allows me to performs sampling tosamples.csv
without any problems:RStan Version:
2.32.6
R Version:
4.3.1
Operating System:
Windows 10
The text was updated successfully, but these errors were encountered: