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

problems in R 4.3.0 #3

Open
2723-ship opened this issue Jun 14, 2023 · 0 comments
Open

problems in R 4.3.0 #3

2723-ship opened this issue Jun 14, 2023 · 0 comments

Comments

@2723-ship
Copy link

source("_drake.R")
drake::make(plan, targets = "stan_output", lock_envir = FALSE)
▶ target stan_output
recompiling to avoid crashing R session
starting worker pid=7620 on localhost:11988 at 13:30:47.134
starting worker pid=7633 on localhost:11988 at 13:30:47.234
starting worker pid=7646 on localhost:11988 at 13:30:47.334
starting worker pid=7659 on localhost:11988 at 13:30:47.434

SAMPLING FOR MODEL '776747e20548c5cc12105b46e5d596ab' NOW (CHAIN 1).

SAMPLING FOR MODEL '776747e20548c5cc12105b46e5d596ab' NOW (CHAIN 2).

SAMPLING FOR MODEL '776747e20548c5cc12105b46e5d596ab' NOW (CHAIN 3).
✖ fail stan_output
Error: target stan_output failed.
diagnose(stan_output)$error$message:
error reading from connection
diagnose(stan_output)$error$calls:
run_eqn1_stan(data, list(phytoplankton = phyto_stan, zooplankton = zoo_stan))
plyr::dlply(data, .(sample), function(x, stan_list) {
stan_data <- list(N = nrow(x), Y = x$add15N_perc, Time_days = x$day,
NJ = length(unique(x$pond)), half_NJ = length(unique(x$pond))/2,
J = as.integer(as.factor(x$pond)))
type <- unique(x$sample)
model_code <- stan_list[[type]]
init_list <- list(create_new_inits(seed = 10, type), create_new_inits(seed = 23,
type), create_new_inits(seed = 31, type), create_new_inits(seed = 40,
type))
set.seed(15)
model <- rstan::stan(model_code = model_code, data = stan_data,
chains = 4, cores = 4, iter = 30000, warmup = 25000,
control = list(adapt_delta = 0.99, max_treedepth = 20),
init = init_list)
list(data = x, model = model)
}, ...)
llply(.

SAMPLING FOR MODEL '776747e20548c5cc12105b46e5d596ab' NOW (CHAIN 4).

✖ fail stan_output
Warning messages:
1: In mccollect(jobs) : 4 parallel jobs did not deliver results
2:
Having problems with parallel::mclapply(), future::future(), or furrr::future_map() in drake? Try one of the workarounds at https://books.ropensci.org/drake/hpc.html#parallel-computing-within-targets or ropensci/drake#675.

Error:
! in callr subprocess.
Caused by error:
! target stan_output failed.
diagnose(stan_output)$error$message:
no applicable method for @ applied to an object of class "NULL"

Having problems with parallel::mclapply(), future::future(), or furrr::future_map() in drake? Try one of the workarounds at https://books.ropensci.org/drake/hpc.html#parallel-computing-within-targets or ropensci/drake#675.

diagnose(stan_output)$error$calls:
run_eqn1_stan(data, list(phytoplankton = phyto_stan, zooplankton = zoo_stan))
plyr::dlply(data, .(sample), function(x, stan_list) {
stan_data <- list(N = nrow(x), Y = x$add15N_perc, Time_days = x$day,
NJ = length(unique(x$pond)), half_NJ = length(unique(x$pond))/2,
J = as.integer(as.factor(x$pond)))
type <- unique(x$sample)
model_code <- stan_list[[type]]
init_list <- list(create_new_inits(seed = 10, type), create_new_inits(seed = 23,
type), create_new_inits(seed = 31, type), create_new_inits(seed = 40,
type))
set.seed(15)
model <- rstan::stan(model_code = model_code, data = stan_data,
chains = 4, cores = 4, iter = 30000, warmup = 25000,
control = list(adapt_delta = 0.99, max_treedepth = 20),
init = init_list)
list(data = x, model = model)
}, ...)
llply(.data = pieces, .fun = .fun, ..., .progress = .progress,
.inform = .inform, .parallel = .parallel, .paropts = .paropts)
loop_apply(n, do.ply)
<fn>(1L)
.fun(piece, ...)
rstan::stan(model_code = model_code, data = stan_data, chains = 4,
cores = 4, iter = 30000, warmup = 25000, control = list(adapt_delta = 0.99,
max_treedepth = 20), init = init_list)
sampling(sm, data, pars, chains, iter, warmup, thin, seed, init,
check_data = TRUE, sample_file = sample_file, diagnostic_file = diagnostic_file,
verbose = verbose, algorithm = match.arg(algorithm), control = control,
check_unknown_args = FALSE, cores = cores, open_progress = open_progress,
include = include, ...)
sampling(sm, data, pars, chains, iter, warmup, thin, seed, init,
check_data = TRUE, sample_file = sample_file, diagnostic_file = diagnostic_file,
verbose = verbose, algorithm = match.arg(algorithm), control = control,
check_unknown_args = FALSE, cores = cores, open_progress = open_progress,
include = include, ...)
.local(object, ...)
sapply(nfits, FUN = function(x) x@mode == 0)
lapply(X = X, FUN = FUN, ...)
FUN(X[[i]], ...)
ℹ See $stdout and $stderr for standard output and error.
Type .Last.error to see the more details.

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