Running ‘testthat.R’ [13s/7s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library(loo)
  This is loo version 2.10.0
  - Online documentation and vignettes at mc-stan.org/loo
  - As of v2.0.0 loo defaults to 1 core but we recommend using as many as possible. Use the 'cores' argument or set options(mc.cores = NUM_CORES) for an entire session. 
  > library(testthat)
  
  Attaching package: 'testthat'
  
  The following object is masked from 'package:loo':
  
      compare
  
  > Sys.setenv("R_TESTS" = "")
  > test_check("loo")
  Starting 2 test processes.
  > test_loo_and_waic.R: 
  > test_loo_and_waic.R:  *** caught segfault ***
  > test_loo_and_waic.R: address 0x110, cause 'invalid permissions'
  > test_loo_and_waic.R: 
  > test_loo_and_waic.R:  *** caught segfault ***
  > test_loo_and_waic.R: address 0x110, cause 'invalid permissions'
  > test_loo_and_waic.R: 
  > test_loo_and_waic.R: Traceback:
  > test_loo_and_waic.R:  1: outer(X, Y)
  > test_loo_and_waic.R:  2: -theta %o% x
  > test_loo_and_waic.R:  3: posterior::gpdfit(exp(x) - exp_cutoff, sort_x = FALSE)
  > test_loo_and_waic.R:  4: psis_smooth_tail(lw_tail, cutoff)
  > test_loo_and_waic.R:  5: is_fun(log_ratios_i = log_ratios[, i], tail_len_i = tail_len[i])
  > test_loo_and_waic.R:  6: 
  > test_loo_and_waic.R: Traceback:
  > test_loo_and_waic.R: FUN(X[[i]], ...) 1: 
  > test_loo_and_waic.R:  7: lapply(X = S, FUN = FUN, ...)
  > test_loo_and_waic.R:  8: doTryCatch(return(expr), name, parentenv, handler)
  > test_loo_and_waic.R: outer(X, Y) 9: 
  > test_loo_and_waic.R:  2: -theta %o% x
  > test_loo_and_waic.R:  3: tryCatchOne(expr, names, parentenv, handlers[[1L]])posterior::gpdfit(exp(x) - exp_cutoff, sort_x = FALSE)
  > test_loo_and_waic.R: 
  > test_loo_and_waic.R: 10:  4: tryCatchList(expr, classes, parentenv, handlers)psis_smooth_tail(lw_tail, cutoff)
  > test_loo_and_waic.R: 
  > test_loo_and_waic.R: 11:  5: tryCatch(expr, error = function(e) {is_fun(log_ratios_i = log_ratios[, i], tail_len_i = tail_len[i])    call <- conditionCall(e)
  > test_loo_and_waic.R:     if (!is.null(call)) { 6:         if (identical(call[[1L]], quote(doTryCatch)))             call <- sys.call(-4L)        dcall <- deparse(call, nlines = 1L)        prefix <- paste("Error in", dcall, ": ")        LONG <- 75L        sm <- strsplit(conditionMessage(e), "\n")[[1L]]        w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w")FUN(X[[i]], ...)
  > test_loo_and_waic.R:  7: lapply(X = S, FUN = FUN, ...)
  > test_loo_and_waic.R:         if (is.na(w))  8:             w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L],                 type = "b")        if (w > LONG)             prefix <- paste0(prefix, "\n  ")    }doTryCatch(return(expr), name, parentenv, handler)
  > test_loo_and_waic.R:  9: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  > test_loo_and_waic.R: 10: tryCatchList(expr, classes, parentenv, handlers)
  > test_loo_and_waic.R: 11: tryCatch(expr, error = function(e) {    call <- conditionCall(e)    if (!is.null(call)) {    else prefix <- "Error : "    msg <- paste0(prefix, conditionMessage(e), "\n")    .Internal(seterrmessage(msg[1L]))    if (!silent && isTRUE(getOption("show.error.messages"))) {        if (identical(call[[1L]], quote(doTryCatch)))             call <- sys.call(-4L)        dcall <- deparse(call, nlines = 1L)        prefix <- paste("Error in", dcall, ": ")        LONG <- 75L        sm <- strsplit(conditionMessage(e), "\n")[[1L]]        w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w")        if (is.na(w))         cat(msg, file = outFile)        .Internal(printDeferredWarnings())    }    invisible(structure(msg, class = "try-error", condition = e))})
  > test_loo_and_waic.R: 12: try(lapply(X = S, FUN = FUN, ...), silent = TRUE)
  > test_loo_and_waic.R: 13: sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE))
  > test_loo_and_waic.R: 14:             w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L], FUN(X[[i]], ...)                type = "b")        if (w > LONG)             prefix <- paste0(prefix, "\n  ")    }
  > test_loo_and_waic.R: 15: lapply(seq_len(cores), inner.do)
  > test_loo_and_waic.R: 16:     else prefix <- "Error : "    msg <- paste0(prefix, conditionMessage(e), "\n")    .Internal(seterrmessage(msg[1L]))    if (!silent && isTRUE(getOption("show.error.messages"))) {parallel::mclapply(X = seq_len(N), mc.cores = cores, FUN = function(i) is_fun(log_ratios_i = log_ratios[,     i], tail_len_i = tail_len[i]))
  > test_loo_and_waic.R: 17:         cat(msg, file = outFile)do_importance_sampling(log_ratios, r_eff = r_eff, cores = cores,         .Internal(printDeferredWarnings())    }    invisible(structure(msg, class = "try-error", condition = e))})
  > test_loo_and_waic.R:     method = method)
  > test_loo_and_waic.R: 18: 
  > test_loo_and_waic.R: importance_sampling.array(log_ratios = -x, r_eff = r_eff, cores = cores,     method = is_method)
  > test_loo_and_waic.R: 12: 19: try(lapply(X = S, FUN = FUN, ...), silent = TRUE)loo.array(LLarr, r_eff = r_eff_arr, cores = 2)
  > test_loo_and_waic.R: 
  > test_loo_and_waic.R: 20: loo(LLarr, r_eff = r_eff_arr, cores = 2)
  > test_loo_and_waic.R: 21: withCallingHandlers(expr, warning = function(w) if (inherits(w,     classes)) tryInvokeRestart("muffleWarning"))
  > test_loo_and_waic.R: 22: 13: suppressWarnings(loo(LLarr, r_eff = r_eff_arr, cores = 2))sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE))
  > test_loo_and_waic.R: 14: FUN(X[[i]], ...)
  > test_loo_and_waic.R: 
  > test_loo_and_waic.R: 23: eval(code, test_env)
  > test_loo_and_waic.R: 24: 15: lapply(seq_len(cores), inner.do)
  > test_loo_and_waic.R: 16: parallel::mclapply(X = seq_len(N), mc.cores = cores, FUN = function(i) is_fun(log_ratios_i = log_ratios[,     i], tail_len_i = tail_len[i]))
  > test_loo_and_waic.R: 17: eval(code, test_env)do_importance_sampling(log_ratios, r_eff = r_eff, cores = cores, 
  > test_loo_and_waic.R:     method = method)25: 
  > test_loo_and_waic.R: withCallingHandlers({    eval(code, test_env)    new_expectations <- the$test_expectations > starting_expectations    if (snapshot_skipped) {        skip("On CRAN")18: importance_sampling.array(log_ratios = -x, r_eff = r_eff, cores = cores,     method = is_method)
  > test_loo_and_waic.R: 19:     }loo.array(LLarr, r_eff = r_eff_arr, cores = 2)    else if (!new_expectations && skip_on_empty) {
  > test_loo_and_waic.R:         skip_empty()20:     }loo(LLarr, r_eff = r_eff_arr, cores = 2)}, expectation = handle_expectation, packageNotFoundError = function(e) {
  > test_loo_and_waic.R:     if (on_cran()) {21:         skip(paste0("{", e$package, "} is not installed."))withCallingHandlers(expr, warning = function(w) if (inherits(w,     }    classes)) tryInvokeRestart("muffleWarning"))}, snapshot_on_cran = function(cnd) {
  > test_loo_and_waic.R:     snapshot_skipped <<- TRUE22:     invokeRestart("muffle_cran_snapshot")suppressWarnings(loo(LLarr, r_eff = r_eff_arr, cores = 2))}, skip = handle_skip, warning = handle_warning, message = handle_message, 
  > test_loo_and_waic.R:     error = handle_error, interrupt = handle_interrupt)23: 
  > test_loo_and_waic.R: eval(code, test_env)26: 
  > test_loo_and_waic.R: doTryCatch(return(expr), name, parentenv, handler)24: 
  > test_loo_and_waic.R: eval(code, test_env)27: 
  > test_loo_and_waic.R: tryCatchOne(expr, names, parentenv, handlers[[1L]])25: 
  > test_loo_and_waic.R: withCallingHandlers({28:     eval(code, test_env)tryCatchList(expr, classes, parentenv, handlers)    new_expectations <- the$test_expectations > starting_expectations
  > test_loo_and_waic.R:     if (snapshot_skipped) {29:         skip("On CRAN")tryCatch(withCallingHandlers({    }    eval(code, test_env)    else if (!new_expectations && skip_on_empty) {    new_expectations <- the$test_expectations > starting_expectations        skip_empty()    if (snapshot_skipped) {    }        skip("On CRAN")}, expectation = handle_expectation, packageNotFoundError = function(e) {    }    if (on_cran()) {    else if (!new_expectations && skip_on_empty) {        skip(paste0("{", e$package, "} is not installed."))        skip_empty()    }}, expectation = handle_expectation, packageNotFoundError = function(e) {    if (on_cran()) {        skip(paste0("{", e$package, "} is not installed."))    }    }}, snapshot_on_cran = function(cnd) {    snapshot_skipped <<- TRUE    invokeRestart("muffle_cran_snapshot")}, skip = handle_skip, warning = handle_warning, message = handle_message, }, snapshot_on_cran = function(cnd) {    error = handle_error, interrupt = handle_interrupt)    snapshot_skipped <<- TRUE    invokeRestart("muffle_cran_snapshot")}, skip = handle_skip, warning = handle_warning, message = handle_message,     error = handle_error, interrupt = handle_interrupt), error = handle_fatal)
  > test_loo_and_waic.R: 26: doTryCatch(return(expr), name, parentenv, handler)
  > test_loo_and_waic.R: 27: 
  > test_loo_and_waic.R: tryCatchOne(expr, names, parentenv, handlers[[1L]])30: 
  > test_loo_and_waic.R: doWithOneRestart(return(expr), restart)28: 
  > test_loo_and_waic.R: tryCatchList(expr, classes, parentenv, handlers)31: 
  > test_loo_and_waic.R: withOneRestart(expr, restarts[[1L]])29: 
  > test_loo_and_waic.R: tryCatch(withCallingHandlers({32:     eval(code, test_env)withRestarts(tryCatch(withCallingHandlers({    new_expectations <- the$test_expectations > starting_expectations    eval(code, test_env)    if (snapshot_skipped) {        skip("On CRAN")    }    else if (!new_expectations && skip_on_empty) {        skip_empty()    new_expectations <- the$test_expectations > starting_expectations    }    if (snapshot_skipped) {}, expectation = handle_expectation, packageNotFoundError = function(e) {        skip("On CRAN")    }    else if (!new_expectations && skip_on_empty) {        skip_empty()    }    if (on_cran()) {}, expectation = handle_expectation, packageNotFoundError = function(e) {        skip(paste0("{", e$package, "} is not installed."))    }}, snapshot_on_cran = function(cnd) {    snapshot_skipped <<- TRUE    invokeRestart("muffle_cran_snapshot")    if (on_cran()) {}, skip = handle_skip, warning = handle_warning, message = handle_message,         skip(paste0("{", e$package, "} is not installed."))    }}, snapshot_on_cran = function(cnd) {    snapshot_skipped <<- TRUE    error = handle_error, interrupt = handle_interrupt), error = handle_fatal)    invokeRestart("muffle_cran_snapshot")
  > test_loo_and_waic.R: 30: doWithOneRestart(return(expr), restart)
  > test_loo_and_waic.R: 31: }, skip = handle_skip, warning = handle_warning, message = handle_message, withOneRestart(expr, restarts[[1L]])    error = handle_error, interrupt = handle_interrupt), error = handle_fatal),     end_test = function() {    })
  > test_loo_and_waic.R: 33: 
  > test_loo_and_waic.R: 32: withRestarts(tryCatch(withCallingHandlers({    eval(code, test_env)    new_expectations <- the$test_expectations > starting_expectationstest_code(code, parent.frame())    if (snapshot_skipped) {
  > test_loo_and_waic.R: 34: test_that("loo with cores=1 and cores=2 gives same results",     {        loo2 <- suppressWarnings(loo(LLarr, r_eff = r_eff_arr,         skip("On CRAN")    }    else if (!new_expectations && skip_on_empty) {        skip_empty()    }            cores = 2))}, expectation = handle_expectation, packageNotFoundError = function(e) {        expect_equal(loo1$estimates, loo2$estimates)    })
  > test_loo_and_waic.R: 35: eval(code, test_env)    if (on_cran()) {        skip(paste0("{", e$package, "} is not installed."))    }}, snapshot_on_cran = function(cnd) {    snapshot_skipped <<- TRUE
  > test_loo_and_waic.R:     invokeRestart("muffle_cran_snapshot")36: }, skip = handle_skip, warning = handle_warning, message = handle_message, eval(code, test_env)    error = handle_error, interrupt = handle_interrupt), error = handle_fatal), 
  > test_loo_and_waic.R:     end_test = function() {37:     })withCallingHandlers({
  > test_loo_and_waic.R:     eval(code, test_env)33:     new_expectations <- the$test_expectations > starting_expectationstest_code(code, parent.frame())    if (snapshot_skipped) {        skip("On CRAN")    }    else if (!new_expectations && skip_on_empty) {        skip_empty()
  > test_loo_and_waic.R: 34: test_that("loo with cores=1 and cores=2 gives same results",     {        loo2 <- suppressWarnings(loo(LLarr, r_eff = r_eff_arr,             cores = 2))        expect_equal(loo1$estimates, loo2$estimates)    }    })}, expectation = handle_expectation, packageNotFoundError = function(e) {
  > test_loo_and_waic.R:     if (on_cran()) {35:         skip(paste0("{", e$package, "} is not installed."))    }}, snapshot_on_cran = function(cnd) {    snapshot_skipped <<- TRUEeval(code, test_env)
  > test_loo_and_waic.R: 36: eval(code, test_env)
  > test_loo_and_waic.R:     invokeRestart("muffle_cran_snapshot")}, skip = handle_skip, warning = handle_warning, message = handle_message,     error = handle_error, interrupt = handle_interrupt)
  > test_loo_and_waic.R: 38: 37: doTryCatch(return(expr), name, parentenv, handler)withCallingHandlers({    eval(code, test_env)    new_expectations <- the$test_expectations > starting_expectations    if (snapshot_skipped) {        skip("On CRAN")
  > test_loo_and_waic.R: 39: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  > test_loo_and_waic.R: 40:     }    else if (!new_expectations && skip_on_empty) {        skip_empty()    }}, expectation = handle_expectation, packageNotFoundError = function(e) {tryCatchList(expr, classes, parentenv, handlers)    if (on_cran()) {
  > test_loo_and_waic.R: 41: tryCatch(withCallingHandlers({    eval(code, test_env)    new_expectations <- the$test_expectations > starting_expectations        skip(paste0("{", e$package, "} is not installed."))    }}, snapshot_on_cran = function(cnd) {    snapshot_skipped <<- TRUE    invokeRestart("muffle_cran_snapshot")    if (snapshot_skipped) {}, skip = handle_skip, warning = handle_warning, message = handle_message,         skip("On CRAN")    error = handle_error, interrupt = handle_interrupt)    }    else if (!new_expectations && skip_on_empty) {        skip_empty()    }
  > test_loo_and_waic.R: 38: 
  > test_loo_and_waic.R: }, expectation = handle_expectation, packageNotFoundError = function(e) {doTryCatch(return(expr), name, parentenv, handler)    if (on_cran()) {        skip(paste0("{", e$package, "} is not installed."))
  > test_loo_and_waic.R: 39: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  > test_loo_and_waic.R: 40:     }tryCatchList(expr, classes, parentenv, handlers)}, snapshot_on_cran = function(cnd) {
  > test_loo_and_waic.R:     snapshot_skipped <<- TRUE41:     invokeRestart("muffle_cran_snapshot")tryCatch(withCallingHandlers({}, skip = handle_skip, warning = handle_warning, message = handle_message,     eval(code, test_env)    error = handle_error, interrupt = handle_interrupt), error = handle_fatal)    new_expectations <- the$test_expectations > starting_expectations
  > test_loo_and_waic.R:     if (snapshot_skipped) {42:         skip("On CRAN")doWithOneRestart(return(expr), restart)    }
  > test_loo_and_waic.R:     else if (!new_expectations && skip_on_empty) {43:         skip_empty()withOneRestart(expr, restarts[[1L]])    }
  > test_loo_and_waic.R: }, expectation = handle_expectation, packageNotFoundError = function(e) {44:     if (on_cran()) {withRestarts(tryCatch(withCallingHandlers({        skip(paste0("{", e$package, "} is not installed."))    eval(code, test_env)    }    new_expectations <- the$test_expectations > starting_expectations}, snapshot_on_cran = function(cnd) {    if (snapshot_skipped) {    snapshot_skipped <<- TRUE        skip("On CRAN")    invokeRestart("muffle_cran_snapshot")    }}, skip = handle_skip, warning = handle_warning, message = handle_message,     else if (!new_expectations && skip_on_empty) {    error = handle_error, interrupt = handle_interrupt), error = handle_fatal)        skip_empty()
  > test_loo_and_waic.R:     }42: }, expectation = handle_expectation, packageNotFoundError = function(e) {doWithOneRestart(return(expr), restart)    if (on_cran()) {
  > test_loo_and_waic.R:         skip(paste0("{", e$package, "} is not installed."))43:     }withOneRestart(expr, restarts[[1L]])}, snapshot_on_cran = function(cnd) {
  > test_loo_and_waic.R:     snapshot_skipped <<- TRUE44:     invokeRestart("muffle_cran_snapshot")withRestarts(tryCatch(withCallingHandlers({}, skip = handle_skip, warning = handle_warning, message = handle_message,     eval(code, test_env)    error = handle_error, interrupt = handle_interrupt), error = handle_fatal),     new_expectations <- the$test_expectations > starting_expectations    end_test = function() {    if (snapshot_skipped) {    })        skip("On CRAN")
  > test_loo_and_waic.R:     }45:     else if (!new_expectations && skip_on_empty) {test_code(code = exprs, env = env, reporter = get_reporter() %||%         skip_empty()    StopReporter$new())    }
  > test_loo_and_waic.R: }, expectation = handle_expectation, packageNotFoundError = function(e) {46:     if (on_cran()) {source_file(path, env = env(env), desc = desc, shuffle = shuffle,         skip(paste0("{", e$package, "} is not installed."))    error_call = error_call)    }
  > test_loo_and_waic.R: }, snapshot_on_cran = function(cnd) {47:     snapshot_skipped <<- TRUEtest_one_file(path, env = the$testing_env, shuffle = shuffle)    invokeRestart("muffle_cran_snapshot")
  > test_loo_and_waic.R: }, skip = handle_skip, warning = handle_warning, message = handle_message, 48:     error = handle_error, interrupt = handle_interrupt), error = handle_fatal), doTryCatch(return(expr), name, parentenv, handler)    end_test = function() {
  > test_loo_and_waic.R:     })49: 
  > test_loo_and_waic.R: tryCatchOne(expr, names, parentenv, handlers[[1L]])45: 
  > test_loo_and_waic.R: test_code(code = exprs, env = env, reporter = get_reporter() %||% 50:     StopReporter$new())tryCatchList(expr, classes, parentenv, handlers)
  > test_loo_and_waic.R: 
  > test_loo_and_waic.R: 46: 51: source_file(path, env = env(env), desc = desc, shuffle = shuffle, tryCatch(code, testthat_abort_reporter = function(cnd) {    error_call = error_call)    cat(conditionMessage(cnd), "\n")
  > test_loo_and_waic.R:     NULL47: })test_one_file(path, env = the$testing_env, shuffle = shuffle)
  > test_loo_and_waic.R: 
  > test_loo_and_waic.R: 52: 48: with_reporter(multi, test_one_file(path, env = the$testing_env, doTryCatch(return(expr), name, parentenv, handler)    shuffle = shuffle))
  > test_loo_and_waic.R: 
  > test_loo_and_waic.R: 49: 53: tryCatchOne(expr, names, parentenv, handlers[[1L]])asNamespace("testthat")$queue_task(path, shuffle)
  > test_loo_and_waic.R: 
  > test_loo_and_waic.R: 50: 54: tryCatchList(expr, classes, parentenv, handlers)(function (path, shuffle) 
  > test_loo_and_waic.R: {51:     asNamespace("testthat")$queue_task(path, shuffle)tryCatch(code, testthat_abort_reporter = function(cnd) {})(base::quote("test_loo_and_waic.R"), base::quote(FALSE))    cat(conditionMessage(cnd), "\n")
  > test_loo_and_waic.R:     NULL55: })(function (what, args, quote = FALSE, envir = parent.frame()) 
  > test_loo_and_waic.R: {52:     if (!is.list(args)) with_reporter(multi, test_one_file(path, env = the$testing_env,         stop("second argument must be a list")    shuffle = shuffle))    if (quote) 
  > test_loo_and_waic.R:         args <- lapply(args, enquote)53:     .Internal(do.call(what, args, envir))})(base::quote(function (path, shuffle) {    asNamespace("testthat")$queue_task(path, shuffle)}), base::quote(list("test_loo_and_waic.R", FALSE)), envir = base::quote(<environment>),     quote = base::quote(TRUE))
  > test_loo_and_waic.R: 56: base::do.call(base::do.call, base::c(base::readRDS("/Volumes/Temp/tmp/Rtmp1RTvI3/callr-fun-1514878b12203"),     base::list(envir = .GlobalEnv, quote = TRUE)), envir = .GlobalEnv,     quote = TRUE)
  > test_loo_and_waic.R: asNamespace("testthat")$queue_task(path, shuffle)57: 
  > test_loo_and_waic.R: base::saveRDS(base::do.call(base::do.call, base::c(base::readRDS("/Volumes/Temp/tmp/Rtmp1RTvI3/callr-fun-1514878b12203"), 54:     base::list(envir = .GlobalEnv, quote = TRUE)), envir = .GlobalEnv, (function (path, shuffle)     quote = TRUE), file = "/Volumes/Temp/tmp/Rtmp1RTvI3/callr-rs-result-15148353030dc", {    compress = FALSE)    asNamespace("testthat")$queue_task(path, shuffle)
  > test_loo_and_waic.R: })(base::quote("test_loo_and_waic.R"), base::quote(FALSE))58: 
  > test_loo_and_waic.R: base::withCallingHandlers({55:     {(function (what, args, quote = FALSE, envir = parent.frame())         NULL{        NULL    if (!is.list(args))     }        stop("second argument must be a list")    base::saveRDS(base::do.call(base::do.call, base::c(base::readRDS("/Volumes/Temp/tmp/Rtmp1RTvI3/callr-fun-1514878b12203"),     if (quote)         base::list(envir = .GlobalEnv, quote = TRUE)), envir = .GlobalEnv,         args <- lapply(args, enquote)        quote = TRUE), file = "/Volumes/Temp/tmp/Rtmp1RTvI3/callr-rs-result-15148353030dc",     .Internal(do.call(what, args, envir))        compress = FALSE)})(base::quote(function (path, shuffle)     base::flush(base::stdout()){    base::flush(base::stderr())    asNamespace("testthat")$queue_task(path, shuffle)    {}), base::quote(list("test_loo_and_waic.R", FALSE)), envir = base::quote(<environment>),     quote = base::quote(TRUE))
  > test_loo_and_waic.R: 56: base::do.call(base::do.call, base::c(base::readRDS("/Volumes/Temp/tmp/Rtmp1RTvI3/callr-fun-1514878b12203"),         NULL    base::list(envir = .GlobalEnv, quote = TRUE)), envir = .GlobalEnv,         NULL    quote = TRUE)    }
  > test_loo_and_waic.R:     base::invisible()57: }, error = function(e) {base::saveRDS(base::do.call(base::do.call, base::c(base::readRDS("/Volumes/Temp/tmp/Rtmp1RTvI3/callr-fun-1514878b12203"),     {    base::list(envir = .GlobalEnv, quote = TRUE)), envir = .GlobalEnv,         callr_data <- base::as.environment("tools:callr")$`__callr_data__`    quote = TRUE), file = "/Volumes/Temp/tmp/Rtmp1RTvI3/callr-rs-result-15148353030dc",     compress = FALSE)
  > test_loo_and_waic.R: 58: base::withCallingHandlers({    {        NULL        NULL    }        err <- callr_data$err    base::saveRDS(base::do.call(base::do.call, base::c(base::readRDS("/Volumes/Temp/tmp/Rtmp1RTvI3/callr-fun-1514878b12203"),         if (FALSE) {        base::list(envir = .GlobalEnv, quote = TRUE)), envir = .GlobalEnv,             base::assign(".Traceback", base::.traceback(4), envir = callr_data)        quote = TRUE), file = "/Volumes/Temp/tmp/Rtmp1RTvI3/callr-rs-result-15148353030dc",             utils::dump.frames("__callr_dump__")        compress = FALSE)            base::assign(".Last.dump", .GlobalEnv$`__callr_dump__`,     base::flush(base::stdout())                envir = callr_data)    base::flush(base::stderr())            base::rm("__callr_dump__", envir = .GlobalEnv)    {        }        NULL        e <- err$process_call(e)        NULL        e2 <- err$new_error("error in callr subprocess")    }        class <- base::class    base::invisible()        class(e2) <- base::c("callr_remote_error", class(e2))}, error = function(e) {        e2 <- err$add_trace_back(e2)    {        cut <- base::which(e2$trace$scope == "global")[1]        if (!base::is.na(cut)) {
  > test_loo_and_waic.R:         callr_data <- base::as.environment("tools:callr")$`__callr_data__`            e2$trace <- e2$trace[-(1:cut), ]        err <- callr_data$err        if (FALSE) {            base::assign(".Traceback", base::.traceback(4), envir = callr_data)            utils::dump.frames("__callr_dump__")            base::assign(".Last.dump", .GlobalEnv$`__callr_dump__`,                 envir = callr_data)        }            base::rm("__callr_dump__", envir = .GlobalEnv)        if (callr_data$has_otel) {        }            callr_data$otel_span$record_exception(e2)        e <- err$process_call(e)        }        e2 <- err$new_error("error in callr subprocess")        base::saveRDS(base::list("error", e2, e), file = base::paste0("/Volumes/Temp/tmp/Rtmp1RTvI3/callr-rs-result-15148353030dc",         class <- base::class            ".error"))        class(e2) <- base::c("callr_remote_error", class(e2))    }        e2 <- err$add_trace_back(e2)}, interrupt = function(e) {        cut <- base::which(e2$trace$scope == "global")[1]    {        if (!base::is.na(cut)) {        callr_data <- base::as.environment("tools:callr")$`__callr_data__`            e2$trace <- e2$trace[-(1:cut), ]        err <- callr_data$err        }        if (FALSE) {        if (callr_data$has_otel) {            base::assign(".Traceback", base::.traceback(4), envir = callr_data)            callr_data$otel_span$record_exception(e2)            utils::dump.frames("__callr_dump__")        }            base::assign(".Last.dump", .GlobalEnv$`__callr_dump__`,         base::saveRDS(base::list("error", e2, e), file = base::paste0("/Volumes/Temp/tmp/Rtmp1RTvI3/callr-rs-result-15148353030dc",                 envir = callr_data)            ".error"))            base::rm("__callr_dump__", envir = .GlobalEnv)    }        }}, interrupt = function(e) {        e <- err$process_call(e)    {        e2 <- err$new_error("error in callr subprocess")        callr_data <- base::as.environment("tools:callr")$`__callr_data__`        class <- base::class        err <- callr_data$err        class(e2) <- base::c("callr_remote_error", class(e2))        if (FALSE) {        e2 <- err$add_trace_back(e2)            base::assign(".Traceback", base::.traceback(4), envir = callr_data)        cut <- base::which(e2$trace$scope == "global")[1]            utils::dump.frames("__callr_dump__")        if (!base::is.na(cut)) {            base::assign(".Last.dump", .GlobalEnv$`__callr_dump__`,             e2$trace <- e2$trace[-(1:cut), ]                envir = callr_data)        }            base::rm("__callr_dump__", envir = .GlobalEnv)        if (callr_data$has_otel) {        }            callr_data$otel_span$record_exception(e2)        e <- err$process_call(e)        }        e2 <- err$new_error("error in callr subprocess")        base::saveRDS(base::list("error", e2, e), file = base::paste0("/Volumes/Temp/tmp/Rtmp1RTvI3/callr-rs-result-15148353030dc",             ".error"))    }}, callr_message = function(e) {    base::try({        class <- base::class        class(e2) <- base::c("callr_remote_error", class(e2))        e2 <- err$add_trace_back(e2)        cut <- base::which(e2$trace$scope == "global")[1]        if (!base::is.na(cut)) {        callr_data <- base::as.environment("tools:callr")$`__callr_data__`            e2$trace <- e2$trace[-(1:cut), ]        pxlib <- callr_data$pxlib        }        if (base::is.null(e$code)) {        if (callr_data$has_otel) {            e$code <- "301"            callr_data$otel_span$record_exception(e2)        }        }        msg <- base::paste0("base64::", pxlib$base64_encode(base::serialize(e,         base::saveRDS(base::list("error", e2, e), file = base::paste0("/Volumes/Temp/tmp/Rtmp1RTvI3/callr-rs-result-15148353030dc",             NULL)))            ".error"))    }}, callr_message = function(e) {    base::try({        callr_data <- base::as.environment("tools:callr")$`__callr_data__`        pxlib <- callr_data$pxlib        if (base::is.null(e$code)) {            e$code <- "301"        }        data <- base::paste0(e$code, " ", base::nchar(msg), "\n",         msg <- base::paste0("base64::", pxlib$base64_encode(base::serialize(e,             msg)            NULL)))        if (callr_data$has_otel) {        data <- base::paste0(e$code, " ", base::nchar(msg), "\n",             callr_data$otel_span$add_event("callr message", attributes = list(status_code = e$code))        }        pxlib$write_fd(3L, data)        if (base::inherits(e, "cli_message") && !base::is.null(base::findRestart("cli_message_handled"))) {            base::invokeRestart("cli_message_handled")        }        else if (base::inherits(e, "message") && !base::is.null(base::findRestart("muffleMessage"))) {            base::invokeRestart("muffleMessage")        }            msg)    })        if (callr_data$has_otel) {})            callr_data$otel_span$add_event("callr message", attributes = list(status_code = e$code))
  > test_loo_and_waic.R:         }59:         pxlib$write_fd(3L, data)doTryCatch(return(expr), name, parentenv, handler)        if (base::inherits(e, "cli_message") && !base::is.null(base::findRestart("cli_message_handled"))) {            base::invokeRestart("cli_message_handled")        }        else if (base::inherits(e, "message") && !base::is.null(base::findRestart("muffleMessage"))) {
  > test_loo_and_waic.R:             base::invokeRestart("muffleMessage")60: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  > test_loo_and_waic.R: 61: tryCatchList(expr, names[-nh], parentenv, handlers[-nh])        }    })})
  > test_loo_and_waic.R: 59: 
  > test_loo_and_waic.R: doTryCatch(return(expr), name, parentenv, handler)62: 
  > test_loo_and_waic.R: doTryCatch(return(expr), name, parentenv, handler)60: 
  > test_loo_and_waic.R: tryCatchOne(expr, names, parentenv, handlers[[1L]])63: 
  > test_loo_and_waic.R: tryCatchOne(tryCatchList(expr, names[-nh], parentenv, handlers[-nh]), 61:     names[nh], parentenv, handlers[[nh]])tryCatchList(expr, names[-nh], parentenv, handlers[-nh])
  > test_loo_and_waic.R: 
  > test_loo_and_waic.R: 64: 62: tryCatchList(expr, classes, parentenv, handlers)doTryCatch(return(expr), name, parentenv, handler)
  > test_loo_and_waic.R: 
  > test_loo_and_waic.R: 65: 63: base::tryCatch(base::withCallingHandlers({tryCatchOne(tryCatchList(expr, names[-nh], parentenv, handlers[-nh]),     {    names[nh], parentenv, handlers[[nh]])        NULL
  > test_loo_and_waic.R:         NULL64:     }tryCatchList(expr, classes, parentenv, handlers)    base::saveRDS(base::do.call(base::do.call, base::c(base::readRDS("/Volumes/Temp/tmp/Rtmp1RTvI3/callr-fun-1514878b12203"), 
  > test_loo_and_waic.R:         base::list(envir = .GlobalEnv, quote = TRUE)), envir = .GlobalEnv, 65:         quote = TRUE), file = "/Volumes/Temp/tmp/Rtmp1RTvI3/callr-rs-result-15148353030dc", base::tryCatch(base::withCallingHandlers({        compress = FALSE)    {    base::flush(base::stdout())        NULL    base::flush(base::stderr())        NULL    {    }        NULL    base::saveRDS(base::do.call(base::do.call, base::c(base::readRDS("/Volumes/Temp/tmp/Rtmp1RTvI3/callr-fun-1514878b12203"),         NULL        base::list(envir = .GlobalEnv, quote = TRUE)), envir = .GlobalEnv,     }        quote = TRUE), file = "/Volumes/Temp/tmp/Rtmp1RTvI3/callr-rs-result-15148353030dc",     base::invisible()        compress = FALSE)}, error = function(e) {    base::flush(base::stdout())    {    base::flush(base::stderr())        callr_data <- base::as.environment("tools:callr")$`__callr_data__`    {        err <- callr_data$err        NULL        if (FALSE) {        NULL            base::assign(".Traceback", base::.traceback(4), envir = callr_data)    }            utils::dump.frames("__callr_dump__")    base::invisible()            base::assign(".Last.dump", .GlobalEnv$`__callr_dump__`, }, error = function(e) {                envir = callr_data)    {            base::rm("__callr_dump__", envir = .GlobalEnv)        callr_data <- base::as.environment("tools:callr")$`__callr_data__`        }        err <- callr_data$err        e <- err$process_call(e)        if (FALSE) {        e2 <- err$new_error("error in callr subprocess")            base::assign(".Traceback", base::.traceback(4), envir = callr_data)        class <- base::class            utils::dump.frames("__callr_dump__")        class(e2) <- base::c("callr_remote_error", class(e2))            base::assign(".Last.dump", .GlobalEnv$`__callr_dump__`,         e2 <- err$add_trace_back(e2)                envir = callr_data)
  > test_loo_and_waic.R:         cut <- base::which(e2$trace$scope == "global")[1]            base::rm("__callr_dump__", envir = .GlobalEnv)        if (!base::is.na(cut)) {            e2$trace <- e2$trace[-(1:cut), ]        }        }        if (callr_data$has_otel) {        e <- err$process_call(e)            callr_data$otel_span$record_exception(e2)        e2 <- err$new_error("error in callr subprocess")        }        class <- base::class        base::saveRDS(base::list("error", e2, e), file = base::paste0("/Volumes/Temp/tmp/Rtmp1RTvI3/callr-rs-result-15148353030dc",         class(e2) <- base::c("callr_remote_error", class(e2))            ".error"))        e2 <- err$add_trace_back(e2)    }        cut <- base::which(e2$trace$scope == "global")[1]}, interrupt = function(e) {        if (!base::is.na(cut)) {    {            e2$trace <- e2$trace[-(1:cut), ]        callr_data <- base::as.environment("tools:callr")$`__callr_data__`        }        err <- callr_data$err        if (callr_data$has_otel) {        if (FALSE) {            callr_data$otel_span$record_exception(e2)            base::assign(".Traceback", base::.traceback(4), envir = callr_data)        }            utils::dump.frames("__callr_dump__")        base::saveRDS(base::list("error", e2, e), file = base::paste0("/Volumes/Temp/tmp/Rtmp1RTvI3/callr-rs-result-15148353030dc",             ".error"))    }}, interrupt = function(e) {    {            base::assign(".Last.dump", .GlobalEnv$`__callr_dump__`,         callr_data <- base::as.environment("tools:callr")$`__callr_data__`                envir = callr_data)        err <- callr_data$err            base::rm("__callr_dump__", envir = .GlobalEnv)        if (FALSE) {        }            base::assign(".Traceback", base::.traceback(4), envir = callr_data)        e <- err$process_call(e)            utils::dump.frames("__callr_dump__")        e2 <- err$new_error("error in callr subprocess")            base::assign(".Last.dump", .GlobalEnv$`__callr_dump__`,         class <- base::class                envir = callr_data)        class(e2) <- base::c("callr_remote_error", class(e2))            base::rm("__callr_dump__", envir = .GlobalEnv)        e2 <- err$add_trace_back(e2)        }        cut <- base::which(e2$trace$scope == "global")[1]        e <- err$process_call(e)        if (!base::is.na(cut)) {        e2 <- err$new_error("error in callr subprocess")            e2$trace <- e2$trace[-(1:cut), ]        class <- base::class        }        class(e2) <- base::c("callr_remote_error", class(e2))        if (callr_data$has_otel) {        e2 <- err$add_trace_back(e2)            callr_data$otel_span$record_exception(e2)        cut <- base::which(e2$trace$scope == "global")[1]        }        if (!base::is.na(cut)) {        base::saveRDS(base::list("error", e2, e), file = base::paste0("/Volumes/Temp/tmp/Rtmp1RTvI3/callr-rs-result-15148353030dc",             ".error"))    }}, callr_message = function(e) {    base::try({            e2$trace <- e2$trace[-(1:cut), ]        }        if (callr_data$has_otel) {            callr_data$otel_span$record_exception(e2)        }        callr_data <- base::as.environment("tools:callr")$`__callr_data__`        base::saveRDS(base::list("error", e2, e), file = base::paste0("/Volumes/Temp/tmp/Rtmp1RTvI3/callr-rs-result-15148353030dc",         pxlib <- callr_data$pxlib        if (base::is.null(e$code)) {            e$code <- "301"        }        msg <- base::paste0("base64::", pxlib$base64_encode(base::serialize(e,             ".error"))    }}, callr_message = function(e) {    base::try({        callr_data <- base::as.environment("tools:callr")$`__callr_data__`            NULL)))        pxlib <- callr_data$pxlib        data <- base::paste0(e$code, " ", base::nchar(msg), "\n",         if (base::is.null(e$code)) {            msg)            e$code <- "301"        if (callr_data$has_otel) {        }            callr_data$otel_span$add_event("callr message", attributes = list(status_code = e$code))        }        pxlib$write_fd(3L, data)        if (base::inherits(e, "cli_message") && !base::is.null(base::findRestart("cli_message_handled"))) {            base::invokeRestart("cli_message_handled")        msg <- base::paste0("base64::", pxlib$base64_encode(base::serialize(e,         }            NULL)))        data <- base::paste0(e$code, " ", base::nchar(msg), "\n",             msg)        if (callr_data$has_otel) {            callr_data$otel_span$add_event("callr message", attributes = list(status_code = e$code))        else if (base::inherits(e, "message") && !base::is.null(base::findRestart("muffleMessage"))) {        }            base::invokeRestart("muffleMessage")        }    })}), error = function(e) {    {        pxlib$write_fd(3L, data)        NULL        if (base::inherits(e, "cli_message") && !base::is.null(base::findRestart("cli_message_handled"))) {            base::invokeRestart("cli_message_handled")        }        else if (base::inherits(e, "message") && !base::is.null(base::findRestart("muffleMessage"))) {            base::invokeRestart("muffleMessage")        }    })}), error = function(e) {    {        NULL        NULL    }        NULL    if (FALSE) {    }        base::try(base::stop(e))    if (FALSE) {    }        base::try(base::stop(e))    if (FALSE) {    }        base::q(save = "no", status = 1)    if (FALSE) {    }        base::q(save = "no", status = 1)    base::invisible()    }}, interrupt = function(e) {    base::invisible()    {}, interrupt = function(e) {        NULL    {        NULL        NULL    }        NULL    if (FALSE) {    }        base::q(save = "no", status = 1)    if (FALSE) {    }        base::q(save = "no", status = 1)    base::invisible()    }})    base::invisible()
  > test_loo_and_waic.R: })
  > test_loo_and_waic.R: An irrecoverable exception occurred. R is aborting now ...
  > test_loo_and_waic.R: An irrecoverable exception occurred. R is aborting now ...
  Saving _problems/test_loo_and_waic-30.R
  > test_loo_predictive_metric.R: 
  > test_loo_predictive_metric.R:  *** caught segfault ***
  > test_loo_predictive_metric.R: address 0x110, cause 'invalid permissions'
  > test_loo_predictive_metric.R: 
  > test_loo_predictive_metric.R:  *** caught segfault ***
  > test_loo_predictive_metric.R: address 0x110, cause 'invalid permissions'
  > test_loo_predictive_metric.R: 
  > test_loo_predictive_metric.R: Traceback:
  > test_loo_predictive_metric.R:  1: outer(X, Y)
  > test_loo_predictive_metric.R:  2: -theta %o% x
  > test_loo_predictive_metric.R:  3: posterior::gpdfit(exp(x) - exp_cutoff, sort_x = FALSE)
  > test_loo_predictive_metric.R:  4: psis_smooth_tail(lw_tail, cutoff)
  > test_loo_predictive_metric.R:  5: is_fun(log_ratios_i = log_ratios[, i], tail_len_i = tail_len[i])
  > test_loo_predictive_metric.R: Traceback:
  > test_loo_predictive_metric.R: 
  > test_loo_predictive_metric.R:  1:  6: FUN(X[[i]], ...)
  > test_loo_predictive_metric.R:  7: outer(X, Y)
  > test_loo_predictive_metric.R:  2: -theta %o% x
  > test_loo_predictive_metric.R: lapply(X = S, FUN = FUN, ...) 3: 
  > test_loo_predictive_metric.R: posterior::gpdfit(exp(x) - exp_cutoff, sort_x = FALSE) 8: 
  > test_loo_predictive_metric.R: doTryCatch(return(expr), name, parentenv, handler) 4: 
  > test_loo_predictive_metric.R: psis_smooth_tail(lw_tail, cutoff) 9: 
  > test_loo_predictive_metric.R: tryCatchOne(expr, names, parentenv, handlers[[1L]]) 5: 
  > test_loo_predictive_metric.R: is_fun(log_ratios_i = log_ratios[, i], tail_len_i = tail_len[i])10: 
  > test_loo_predictive_metric.R: tryCatchList(expr, classes, parentenv, handlers) 6: 
  > test_loo_predictive_metric.R: 11: FUN(X[[i]], ...)
  > test_loo_predictive_metric.R:  7: lapply(X = S, FUN = FUN, ...)
  > test_loo_predictive_metric.R: tryCatch(expr, error = function(e) { 8:     call <- conditionCall(e)doTryCatch(return(expr), name, parentenv, handler)    if (!is.null(call)) {
  > test_loo_predictive_metric.R:         if (identical(call[[1L]], quote(doTryCatch)))  9:             call <- sys.call(-4L)tryCatchOne(expr, names, parentenv, handlers[[1L]])        dcall <- deparse(call, nlines = 1L)
  > test_loo_predictive_metric.R:         prefix <- paste("Error in", dcall, ": ")10:         LONG <- 75L        sm <- strsplit(conditionMessage(e), "\n")[[1L]]        w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w")        if (is.na(w))             w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L], tryCatchList(expr, classes, parentenv, handlers)                type = "b")
  > test_loo_predictive_metric.R: 11: tryCatch(expr, error = function(e) {    call <- conditionCall(e)        if (w > LONG)     if (!is.null(call)) {            prefix <- paste0(prefix, "\n  ")    }    else prefix <- "Error : "    msg <- paste0(prefix, conditionMessage(e), "\n")    .Internal(seterrmessage(msg[1L]))    if (!silent && isTRUE(getOption("show.error.messages"))) {        cat(msg, file = outFile)        if (identical(call[[1L]], quote(doTryCatch)))             call <- sys.call(-4L)        dcall <- deparse(call, nlines = 1L)        prefix <- paste("Error in", dcall, ": ")        .Internal(printDeferredWarnings())    }    invisible(structure(msg, class = "try-error", condition = e))})
  > test_loo_predictive_metric.R:         LONG <- 75L12:         sm <- strsplit(conditionMessage(e), "\n")[[1L]]        w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w")        if (is.na(w))             w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L], try(lapply(X = S, FUN = FUN, ...), silent = TRUE)
  > test_loo_predictive_metric.R: 13: sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE))
  > test_loo_predictive_metric.R:                 type = "b")14:         if (w > LONG) FUN(X[[i]], ...)            prefix <- paste0(prefix, "\n  ")    }    else prefix <- "Error : "    msg <- paste0(prefix, conditionMessage(e), "\n")    .Internal(seterrmessage(msg[1L]))    if (!silent && isTRUE(getOption("show.error.messages"))) {        cat(msg, file = outFile)
  > test_loo_predictive_metric.R: 15: lapply(seq_len(cores), inner.do)
  > test_loo_predictive_metric.R: 16:         .Internal(printDeferredWarnings())parallel::mclapply(X = seq_len(N), mc.cores = cores, FUN = function(i) is_fun(log_ratios_i = log_ratios[,     i], tail_len_i = tail_len[i]))
  > test_loo_predictive_metric.R:     }    invisible(structure(msg, class = "try-error", condition = e))})
  > test_loo_predictive_metric.R: 12: 17: try(lapply(X = S, FUN = FUN, ...), silent = TRUE)do_importance_sampling(log_ratios, r_eff = r_eff, cores = cores, 
  > test_loo_predictive_metric.R:     method = method)13: 
  > test_loo_predictive_metric.R: sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE))18: 
  > test_loo_predictive_metric.R: importance_sampling.matrix(log_ratios, ..., r_eff = r_eff, cores = cores, 14:     method = "psis")FUN(X[[i]], ...)
  > test_loo_predictive_metric.R: 
  > test_loo_predictive_metric.R: 19: 15: psis.matrix(-LL, r_eff = r_eff, cores = 2)lapply(seq_len(cores), inner.do)
  > test_loo_predictive_metric.R: 
  > test_loo_predictive_metric.R: 20: 16: psis(-LL, r_eff = r_eff, cores = 2)parallel::mclapply(X = seq_len(N), mc.cores = cores, FUN = function(i) is_fun(log_ratios_i = log_ratios[,     i], tail_len_i = tail_len[i]))
  > test_loo_predictive_metric.R: 17: 
  > test_loo_predictive_metric.R: do_importance_sampling(log_ratios, r_eff = r_eff, cores = cores, 21:     method = method)eval(code, test_env)
  > test_loo_predictive_metric.R: 
  > test_loo_predictive_metric.R: 18: 22: importance_sampling.matrix(log_ratios, ..., r_eff = r_eff, cores = cores, eval(code, test_env)    method = "psis")
  > test_loo_predictive_metric.R: 19: psis.matrix(-LL, r_eff = r_eff, cores = 2)
  > test_loo_predictive_metric.R: 
  > test_loo_predictive_metric.R: 20: 23: psis(-LL, r_eff = r_eff, cores = 2)withCallingHandlers({
  > test_loo_predictive_metric.R:     eval(code, test_env)21:     new_expectations <- the$test_expectations > starting_expectationseval(code, test_env)    if (snapshot_skipped) {
  > test_loo_predictive_metric.R:         skip("On CRAN")22:     }eval(code, test_env)    else if (!new_expectations && skip_on_empty) {
  > test_loo_predictive_metric.R:         skip_empty()23:     }withCallingHandlers({}, expectation = handle_expectation, packageNotFoundError = function(e) {    eval(code, test_env)    if (on_cran()) {    new_expectations <- the$test_expectations > starting_expectations        skip(paste0("{", e$package, "} is not installed."))    if (snapshot_skipped) {    }        skip("On CRAN")}, snapshot_on_cran = function(cnd) {    }    snapshot_skipped <<- TRUE    else if (!new_expectations && skip_on_empty) {    invokeRestart("muffle_cran_snapshot")        skip_empty()}, skip = handle_skip, warning = handle_warning, message = handle_message,     }    error = handle_error, interrupt = handle_interrupt)}, expectation = handle_expectation, packageNotFoundError = function(e) {
  > test_loo_predictive_metric.R:     if (on_cran()) {
  > test_loo_predictive_metric.R: 24: doTryCatch(return(expr), name, parentenv, handler)
  > test_loo_predictive_metric.R: 25: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  > test_loo_predictive_metric.R: 26: tryCatchList(expr, classes, parentenv, handlers)
  > test_loo_predictive_metric.R: 27: tryCatch(withCallingHandlers({    eval(code, test_env)    new_expectations <- the$test_expectations > starting_expectations        skip(paste0("{", e$package, "} is not installed."))    }}, snapshot_on_cran = function(cnd) {    if (snapshot_skipped) {        skip("On CRAN")    }    else if (!new_expectations && skip_on_empty) {        skip_empty()    snapshot_skipped <<- TRUE    invokeRestart("muffle_cran_snapshot")}, skip = handle_skip, warning = handle_warning, message = handle_message,     error = handle_error, interrupt = handle_interrupt)
  > test_loo_predictive_metric.R: 24: doTryCatch(return(expr), name, parentenv, handler)
  > test_loo_predictive_metric.R: 25:     }tryCatchOne(expr, names, parentenv, handlers[[1L]])}, expectation = handle_expectation, packageNotFoundError = function(e) {    if (on_cran()) {        skip(paste0("{", e$package, "} is not installed."))    }}, snapshot_on_cran = function(cnd) {
  > test_loo_predictive_metric.R:     snapshot_skipped <<- TRUE26: tryCatchList(expr, classes, parentenv, handlers)
  > test_loo_predictive_metric.R: 27: tryCatch(withCallingHandlers({    invokeRestart("muffle_cran_snapshot")    eval(code, test_env)}, skip = handle_skip, warning = handle_warning, message = handle_message,     error = handle_error, interrupt = handle_interrupt), error = handle_fatal)
  > test_loo_predictive_metric.R: 28: doWithOneRestart(return(expr), restart)
  > test_loo_predictive_metric.R: 29: withOneRestart(expr, restarts[[1L]])
  > test_loo_predictive_metric.R:     new_expectations <- the$test_expectations > starting_expectations30:     if (snapshot_skipped) {        skip("On CRAN")    }    else if (!new_expectations && skip_on_empty) {        skip_empty()withRestarts(tryCatch(withCallingHandlers({    }    eval(code, test_env)    new_expectations <- the$test_expectations > starting_expectations    if (snapshot_skipped) {        skip("On CRAN")    }}, expectation = handle_expectation, packageNotFoundError = function(e) {    else if (!new_expectations && skip_on_empty) {    if (on_cran()) {        skip(paste0("{", e$package, "} is not installed."))    }}, snapshot_on_cran = function(cnd) {    snapshot_skipped <<- TRUE    invokeRestart("muffle_cran_snapshot")}, skip = handle_skip, warning = handle_warning, message = handle_message,     error = handle_error, interrupt = handle_interrupt), error = handle_fatal)
  > test_loo_predictive_metric.R: 28: doWithOneRestart(return(expr), restart)
  > test_loo_predictive_metric.R: 29: withOneRestart(expr, restarts[[1L]])
  > test_loo_predictive_metric.R: 30:         skip_empty()    }}, expectation = handle_expectation, packageNotFoundError = function(e) {    if (on_cran()) {withRestarts(tryCatch(withCallingHandlers({    eval(code, test_env)    new_expectations <- the$test_expectations > starting_expectations    if (snapshot_skipped) {        skip(paste0("{", e$package, "} is not installed."))    }}, snapshot_on_cran = function(cnd) {    snapshot_skipped <<- TRUE    invokeRestart("muffle_cran_snapshot")        skip("On CRAN")    }    else if (!new_expectations && skip_on_empty) {        skip_empty()    }}, skip = handle_skip, warning = handle_warning, message = handle_message,     error = handle_error, interrupt = handle_interrupt), error = handle_fatal),     end_test = function() {    })
  > test_loo_predictive_metric.R: }, expectation = handle_expectation, packageNotFoundError = function(e) {31:     if (on_cran()) {test_code(code = exprs, env = env, reporter = get_reporter() %||%         skip(paste0("{", e$package, "} is not installed."))    StopReporter$new())    }}, snapshot_on_cran = function(cnd) {    snapshot_skipped <<- TRUE    invokeRestart("muffle_cran_snapshot")}, skip = handle_skip, warning = handle_warning, message = handle_message, 
  > test_loo_predictive_metric.R: 32: source_file(path, env = env(env), desc = desc, shuffle = shuffle,     error_call = error_call)
  > test_loo_predictive_metric.R:     error = handle_error, interrupt = handle_interrupt), error = handle_fatal),     end_test = function() {    })
  > test_loo_predictive_metric.R: 31: test_code(code = exprs, env = env, reporter = get_reporter() %||% 33: test_one_file(path, env = the$testing_env, shuffle = shuffle)
  > test_loo_predictive_metric.R: 34: doTryCatch(return(expr), name, parentenv, handler)    StopReporter$new())
  > test_loo_predictive_metric.R: 32: source_file(path, env = env(env), desc = desc, shuffle = shuffle,     error_call = error_call)
  > test_loo_predictive_metric.R: 
  > test_loo_predictive_metric.R: 35: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  > test_loo_predictive_metric.R: 36: tryCatchList(expr, classes, parentenv, handlers)33: test_one_file(path, env = the$testing_env, shuffle = shuffle)
  > test_loo_predictive_metric.R: 34: doTryCatch(return(expr), name, parentenv, handler)
  > test_loo_predictive_metric.R: 37: tryCatch(code, testthat_abort_reporter = function(cnd) {    cat(conditionMessage(cnd), "\n")    NULL
  > test_loo_predictive_metric.R: })35: 
  > test_loo_predictive_metric.R: tryCatchOne(expr, names, parentenv, handlers[[1L]])38: 
  > test_loo_predictive_metric.R: with_reporter(multi, test_one_file(path, env = the$testing_env, 36:     shuffle = shuffle))tryCatchList(expr, classes, parentenv, handlers)
  > test_loo_predictive_metric.R: 39: asNamespace("testthat")$queue_task(path, shuffle)
  > test_loo_predictive_metric.R: 40: 
  > test_loo_predictive_metric.R: (function (path, shuffle) 37: {tryCatch(code, testthat_abort_reporter = function(cnd) {    asNamespace("testthat")$queue_task(path, shuffle)    cat(conditionMessage(cnd), "\n")})(base::quote("test_loo_predictive_metric.R"), base::quote(FALSE))    NULL
  > test_loo_predictive_metric.R: })41: 
  > test_loo_predictive_metric.R: (function (what, args, quote = FALSE, envir = parent.frame()) {    if (!is.list(args))         stop("second argument must be a list")38: with_reporter(multi, test_one_file(path, env = the$testing_env,     shuffle = shuffle))
  > test_loo_predictive_metric.R: 39:     if (quote) asNamespace("testthat")$queue_task(path, shuffle)        args <- lapply(args, enquote)    .Internal(do.call(what, args, envir))})(base::quote(function (path, shuffle) {    asNamespace("testthat")$queue_task(path, shuffle)
  > test_loo_predictive_metric.R: }), base::quote(list("test_loo_predictive_metric.R", FALSE)), 40:     envir = base::quote(<environment>), quote = base::quote(TRUE))(function (path, shuffle) 
  > test_loo_predictive_metric.R: {42:     asNamespace("testthat")$queue_task(path, shuffle)base::do.call(base::do.call, base::c(base::readRDS("/Volumes/Temp/tmp/Rtmp1RTvI3/callr-fun-151485bd85660"),     base::list(envir = .GlobalEnv, quote = TRUE)), envir = .GlobalEnv,     quote = TRUE)})(base::quote("test_loo_predictive_metric.R"), base::quote(FALSE))
  > test_loo_predictive_metric.R: 41: (function (what, args, quote = FALSE, envir = parent.frame()) {
  > test_loo_predictive_metric.R:     if (!is.list(args)) 43:         stop("second argument must be a list")base::saveRDS(base::do.call(base::do.call, base::c(base::readRDS("/Volumes/Temp/tmp/Rtmp1RTvI3/callr-fun-151485bd85660"),     base::list(envir = .GlobalEnv, quote = TRUE)), envir = .GlobalEnv,     quote = TRUE), file = "/Volumes/Temp/tmp/Rtmp1RTvI3/callr-rs-result-15148580ee7bb",     compress = FALSE)    if (quote)         args <- lapply(args, enquote)    .Internal(do.call(what, args, envir))})(base::quote(function (path, shuffle) {
  > test_loo_predictive_metric.R:     asNamespace("testthat")$queue_task(path, shuffle)44: }), base::quote(list("test_loo_predictive_metric.R", FALSE)), base::withCallingHandlers({    envir = base::quote(<environment>), quote = base::quote(TRUE))    {
  > test_loo_predictive_metric.R:         NULL42:         NULLbase::do.call(base::do.call, base::c(base::readRDS("/Volumes/Temp/tmp/Rtmp1RTvI3/callr-fun-151485bd85660"),     }    base::list(envir = .GlobalEnv, quote = TRUE)), envir = .GlobalEnv,     base::saveRDS(base::do.call(base::do.call, base::c(base::readRDS("/Volumes/Temp/tmp/Rtmp1RTvI3/callr-fun-151485bd85660"),     quote = TRUE)        base::list(envir = .GlobalEnv, quote = TRUE)), envir = .GlobalEnv, 
  > test_loo_predictive_metric.R:         quote = TRUE), file = "/Volumes/Temp/tmp/Rtmp1RTvI3/callr-rs-result-15148580ee7bb", 43:         compress = FALSE)base::saveRDS(base::do.call(base::do.call, base::c(base::readRDS("/Volumes/Temp/tmp/Rtmp1RTvI3/callr-fun-151485bd85660"),     base::flush(base::stdout())    base::list(envir = .GlobalEnv, quote = TRUE)), envir = .GlobalEnv,     base::flush(base::stderr())    quote = TRUE), file = "/Volumes/Temp/tmp/Rtmp1RTvI3/callr-rs-result-15148580ee7bb",     {    compress = FALSE)        NULL
  > test_loo_predictive_metric.R:         NULL44:     }base::withCallingHandlers({    base::invisible()    {}, error = function(e) {    {        callr_data <- base::as.environment("tools:callr")$`__callr_data__`        err <- callr_data$err        if (FALSE) {        NULL            base::assign(".Traceback", base::.traceback(4), envir = callr_data)        NULL            utils::dump.frames("__callr_dump__")    }            base::assign(".Last.dump", .GlobalEnv$`__callr_dump__`,                 envir = callr_data)            base::rm("__callr_dump__", envir = .GlobalEnv)        }
  > test_loo_predictive_metric.R:     base::saveRDS(base::do.call(base::do.call, base::c(base::readRDS("/Volumes/Temp/tmp/Rtmp1RTvI3/callr-fun-151485bd85660"),         base::list(envir = .GlobalEnv, quote = TRUE)), envir = .GlobalEnv,         e <- err$process_call(e)        e2 <- err$new_error("error in callr subprocess")        quote = TRUE), file = "/Volumes/Temp/tmp/Rtmp1RTvI3/callr-rs-result-15148580ee7bb",         compress = FALSE)    base::flush(base::stdout())    base::flush(base::stderr())        class <- base::class        class(e2) <- base::c("callr_remote_error", class(e2))        e2 <- err$add_trace_back(e2)        cut <- base::which(e2$trace$scope == "global")[1]    {        NULL        NULL    }    base::invisible()        if (!base::is.na(cut)) {}, error = function(e) {            e2$trace <- e2$trace[-(1:cut), ]        }        if (callr_data$has_otel) {            callr_data$otel_span$record_exception(e2)        }    {        base::saveRDS(base::list("error", e2, e), file = base::paste0("/Volumes/Temp/tmp/Rtmp1RTvI3/callr-rs-result-15148580ee7bb",         callr_data <- base::as.environment("tools:callr")$`__callr_data__`            ".error"))        err <- callr_data$err    }        if (FALSE) {}, interrupt = function(e) {            base::assign(".Traceback", base::.traceback(4), envir = callr_data)    {            utils::dump.frames("__callr_dump__")        callr_data <- base::as.environment("tools:callr")$`__callr_data__`            base::assign(".Last.dump", .GlobalEnv$`__callr_dump__`,         err <- callr_data$err                envir = callr_data)        if (FALSE) {            base::rm("__callr_dump__", envir = .GlobalEnv)            base::assign(".Traceback", base::.traceback(4), envir = callr_data)        }            utils::dump.frames("__callr_dump__")        e <- err$process_call(e)            base::assign(".Last.dump", .GlobalEnv$`__callr_dump__`,         e2 <- err$new_error("error in callr subprocess")                envir = callr_data)        class <- base::class            base::rm("__callr_dump__", envir = .GlobalEnv)        class(e2) <- base::c("callr_remote_error", class(e2))        }        e <- err$process_call(e)        e2 <- err$new_error("error in callr subprocess")        class <- base::class        e2 <- err$add_trace_back(e2)        cut <- base::which(e2$trace$scope == "global")[1]        if (!base::is.na(cut)) {            e2$trace <- e2$trace[-(1:cut), ]        class(e2) <- base::c("callr_remote_error", class(e2))        e2 <- err$add_trace_back(e2)        cut <- base::which(e2$trace$scope == "global")[1]        if (!base::is.na(cut)) {            e2$trace <- e2$trace[-(1:cut), ]        }        }        if (callr_data$has_otel) {            callr_data$otel_span$record_exception(e2)        }        base::saveRDS(base::list("error", e2, e), file = base::paste0("/Volumes/Temp/tmp/Rtmp1RTvI3/callr-rs-result-15148580ee7bb",             ".error"))        if (callr_data$has_otel) {    }            callr_data$otel_span$record_exception(e2)}, interrupt = function(e) {        }    {        base::saveRDS(base::list("error", e2, e), file = base::paste0("/Volumes/Temp/tmp/Rtmp1RTvI3/callr-rs-result-15148580ee7bb",         callr_data <- base::as.environment("tools:callr")$`__callr_data__`            ".error"))        err <- callr_data$err        if (FALSE) {            base::assign(".Traceback", base::.traceback(4), envir = callr_data)            utils::dump.frames("__callr_dump__")            base::assign(".Last.dump", .GlobalEnv$`__callr_dump__`,     }                envir = callr_data)}, callr_message = function(e) {    base::try({        callr_data <- base::as.environment("tools:callr")$`__callr_data__`        pxlib <- callr_data$pxlib        if (base::is.null(e$code)) {            base::rm("__callr_dump__", envir = .GlobalEnv)            e$code <- "301"        }        e <- err$process_call(e)        e2 <- err$new_error("error in callr subprocess")        class <- base::class        class(e2) <- base::c("callr_remote_error", class(e2))        }        msg <- base::paste0("base64::", pxlib$base64_encode(base::serialize(e,             NULL)))        data <- base::paste0(e$code, " ", base::nchar(msg), "\n",             msg)        e2 <- err$add_trace_back(e2)        if (callr_data$has_otel) {        cut <- base::which(e2$trace$scope == "global")[1]            callr_data$otel_span$add_event("callr message", attributes = list(status_code = e$code))        if (!base::is.na(cut)) {        }            e2$trace <- e2$trace[-(1:cut), ]        pxlib$write_fd(3L, data)        }        if (base::inherits(e, "cli_message") && !base::is.null(base::findRestart("cli_message_handled"))) {        if (callr_data$has_otel) {            base::invokeRestart("cli_message_handled")            callr_data$otel_span$record_exception(e2)        }        }        else if (base::inherits(e, "message") && !base::is.null(base::findRestart("muffleMessage"))) {        base::saveRDS(base::list("error", e2, e), file = base::paste0("/Volumes/Temp/tmp/Rtmp1RTvI3/callr-rs-result-15148580ee7bb",             ".error"))    }}, callr_message = function(e) {    base::try({            base::invokeRestart("muffleMessage")        callr_data <- base::as.environment("tools:callr")$`__callr_data__`        }        pxlib <- callr_data$pxlib    })        if (base::is.null(e$code)) {})            e$code <- "301"
  > test_loo_predictive_metric.R:         }45:         msg <- base::paste0("base64::", pxlib$base64_encode(base::serialize(e, doTryCatch(return(expr), name, parentenv, handler)            NULL)))
  > test_loo_predictive_metric.R:         data <- base::paste0(e$code, " ", base::nchar(msg), "\n", 46:             msg)tryCatchOne(expr, names, parentenv, handlers[[1L]])        if (callr_data$has_otel) {
  > test_loo_predictive_metric.R:             callr_data$otel_span$add_event("callr message", attributes = list(status_code = e$code))47:         }tryCatchList(expr, names[-nh], parentenv, handlers[-nh])        pxlib$write_fd(3L, data)
  > test_loo_predictive_metric.R:         if (base::inherits(e, "cli_message") && !base::is.null(base::findRestart("cli_message_handled"))) {48:             base::invokeRestart("cli_message_handled")doTryCatch(return(expr), name, parentenv, handler)        }
  > test_loo_predictive_metric.R:         else if (base::inherits(e, "message") && !base::is.null(base::findRestart("muffleMessage"))) {49:             base::invokeRestart("muffleMessage")tryCatchOne(tryCatchList(expr, names[-nh], parentenv, handlers[-nh]),         }    names[nh], parentenv, handlers[[nh]])    })
  > test_loo_predictive_metric.R: })50: 
  > test_loo_predictive_metric.R: tryCatchList(expr, classes, parentenv, handlers)45: doTryCatch(return(expr), name, parentenv, handler)
  > test_loo_predictive_metric.R: 46: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  > test_loo_predictive_metric.R: 
  > test_loo_predictive_metric.R: 51: 47: base::tryCatch(base::withCallingHandlers({tryCatchList(expr, names[-nh], parentenv, handlers[-nh])    {
  > test_loo_predictive_metric.R:         NULL48:         NULLdoTryCatch(return(expr), name, parentenv, handler)    }
  > test_loo_predictive_metric.R:     base::saveRDS(base::do.call(base::do.call, base::c(base::readRDS("/Volumes/Temp/tmp/Rtmp1RTvI3/callr-fun-151485bd85660"),         base::list(envir = .GlobalEnv, quote = TRUE)), envir = .GlobalEnv,         quote = TRUE), file = "/Volumes/Temp/tmp/Rtmp1RTvI3/callr-rs-result-15148580ee7bb", 49: tryCatchOne(tryCatchList(expr, names[-nh], parentenv, handlers[-nh]),     names[nh], parentenv, handlers[[nh]])
  > test_loo_predictive_metric.R: 50:         compress = FALSE)tryCatchList(expr, classes, parentenv, handlers)    base::flush(base::stdout())
  > test_loo_predictive_metric.R:     base::flush(base::stderr())51:     {base::tryCatch(base::withCallingHandlers({        NULL    {        NULL        NULL    }        NULL    base::invisible()    }}, error = function(e) {    base::saveRDS(base::do.call(base::do.call, base::c(base::readRDS("/Volumes/Temp/tmp/Rtmp1RTvI3/callr-fun-151485bd85660"),     {        base::list(envir = .GlobalEnv, quote = TRUE)), envir = .GlobalEnv,         callr_data <- base::as.environment("tools:callr")$`__callr_data__`        quote = TRUE), file = "/Volumes/Temp/tmp/Rtmp1RTvI3/callr-rs-result-15148580ee7bb",         err <- callr_data$err        compress = FALSE)        if (FALSE) {    base::flush(base::stdout())            base::assign(".Traceback", base::.traceback(4), envir = callr_data)    base::flush(base::stderr())            utils::dump.frames("__callr_dump__")    {            base::assign(".Last.dump", .GlobalEnv$`__callr_dump__`, 
  > test_loo_predictive_metric.R:         NULL                envir = callr_data)            base::rm("__callr_dump__", envir = .GlobalEnv)        NULL        }    }    base::invisible()}, error = function(e) {    {        callr_data <- base::as.environment("tools:callr")$`__callr_data__`        e <- err$process_call(e)        err <- callr_data$err        e2 <- err$new_error("error in callr subprocess")        class <- base::class        class(e2) <- base::c("callr_remote_error", class(e2))        e2 <- err$add_trace_back(e2)        cut <- base::which(e2$trace$scope == "global")[1]        if (FALSE) {        if (!base::is.na(cut)) {            base::assign(".Traceback", base::.traceback(4), envir = callr_data)            e2$trace <- e2$trace[-(1:cut), ]            utils::dump.frames("__callr_dump__")        }            base::assign(".Last.dump", .GlobalEnv$`__callr_dump__`,         if (callr_data$has_otel) {                envir = callr_data)            callr_data$otel_span$record_exception(e2)            base::rm("__callr_dump__", envir = .GlobalEnv)        }        }        base::saveRDS(base::list("error", e2, e), file = base::paste0("/Volumes/Temp/tmp/Rtmp1RTvI3/callr-rs-result-15148580ee7bb",         e <- err$process_call(e)            ".error"))        e2 <- err$new_error("error in callr subprocess")    }        class <- base::class}, interrupt = function(e) {        class(e2) <- base::c("callr_remote_error", class(e2))    {        e2 <- err$add_trace_back(e2)        callr_data <- base::as.environment("tools:callr")$`__callr_data__`        cut <- base::which(e2$trace$scope == "global")[1]        err <- callr_data$err        if (!base::is.na(cut)) {        if (FALSE) {            e2$trace <- e2$trace[-(1:cut), ]            base::assign(".Traceback", base::.traceback(4), envir = callr_data)        }            utils::dump.frames("__callr_dump__")        if (callr_data$has_otel) {            base::assign(".Last.dump", .GlobalEnv$`__callr_dump__`,             callr_data$otel_span$record_exception(e2)                envir = callr_data)        }            base::rm("__callr_dump__", envir = .GlobalEnv)        base::saveRDS(base::list("error", e2, e), file = base::paste0("/Volumes/Temp/tmp/Rtmp1RTvI3/callr-rs-result-15148580ee7bb",             ".error"))    }}, interrupt = function(e) {    {        }        e <- err$process_call(e)        e2 <- err$new_error("error in callr subprocess")        class <- base::class        class(e2) <- base::c("callr_remote_error", class(e2))        callr_data <- base::as.environment("tools:callr")$`__callr_data__`        e2 <- err$add_trace_back(e2)        err <- callr_data$err        if (FALSE) {            base::assign(".Traceback", base::.traceback(4), envir = callr_data)            utils::dump.frames("__callr_dump__")            base::assign(".Last.dump", .GlobalEnv$`__callr_dump__`,         cut <- base::which(e2$trace$scope == "global")[1]        if (!base::is.na(cut)) {            e2$trace <- e2$trace[-(1:cut), ]        }        if (callr_data$has_otel) {                envir = callr_data)            callr_data$otel_span$record_exception(e2)            base::rm("__callr_dump__", envir = .GlobalEnv)        }        e <- err$process_call(e)        e2 <- err$new_error("error in callr subprocess")        class <- base::class        class(e2) <- base::c("callr_remote_error", class(e2))        e2 <- err$add_trace_back(e2)        cut <- base::which(e2$trace$scope == "global")[1]        if (!base::is.na(cut)) {            e2$trace <- e2$trace[-(1:cut), ]        }        }        base::saveRDS(base::list("error", e2, e), file = base::paste0("/Volumes/Temp/tmp/Rtmp1RTvI3/callr-rs-result-15148580ee7bb",             ".error"))    }}, callr_message = function(e) {        if (callr_data$has_otel) {    base::try({            callr_data$otel_span$record_exception(e2)        callr_data <- base::as.environment("tools:callr")$`__callr_data__`        }        pxlib <- callr_data$pxlib        base::saveRDS(base::list("error", e2, e), file = base::paste0("/Volumes/Temp/tmp/Rtmp1RTvI3/callr-rs-result-15148580ee7bb",         if (base::is.null(e$code)) {            ".error"))            e$code <- "301"    }        }}, callr_message = function(e) {        msg <- base::paste0("base64::", pxlib$base64_encode(base::serialize(e,     base::try({            NULL)))        callr_data <- base::as.environment("tools:callr")$`__callr_data__`        data <- base::paste0(e$code, " ", base::nchar(msg), "\n",         pxlib <- callr_data$pxlib            msg)        if (base::is.null(e$code)) {        if (callr_data$has_otel) {            e$code <- "301"            callr_data$otel_span$add_event("callr message", attributes = list(status_code = e$code))        }        pxlib$write_fd(3L, data)        if (base::inherits(e, "cli_message") && !base::is.null(base::findRestart("cli_message_handled"))) {        }            base::invokeRestart("cli_message_handled")        msg <- base::paste0("base64::", pxlib$base64_encode(base::serialize(e,         }            NULL)))        else if (base::inherits(e, "message") && !base::is.null(base::findRestart("muffleMessage"))) {        data <- base::paste0(e$code, " ", base::nchar(msg), "\n",             base::invokeRestart("muffleMessage")            msg)        }        if (callr_data$has_otel) {    })            callr_data$otel_span$add_event("callr message", attributes = list(status_code = e$code))}), error = function(e) {        }    {        pxlib$write_fd(3L, data)        NULL        if (base::inherits(e, "cli_message") && !base::is.null(base::findRestart("cli_message_handled"))) {        NULL            base::invokeRestart("cli_message_handled")    }        }    if (FALSE) {        else if (base::inherits(e, "message") && !base::is.null(base::findRestart("muffleMessage"))) {            base::invokeRestart("muffleMessage")        }    })}), error = function(e) {        base::try(base::stop(e))    {    }    if (FALSE) {        base::q(save = "no", status = 1)    }    base::invisible()        NULL}, interrupt = function(e) {        NULL    {    }        NULL    if (FALSE) {        NULL        base::try(base::stop(e))    }    }    if (FALSE) {    if (FALSE) {        base::q(save = "no", status = 1)        base::q(save = "no", status = 1)    }    }    base::invisible()    base::invisible()})}, interrupt = function(e) {
  > test_loo_predictive_metric.R:     {An irrecoverable exception occurred. R is aborting now ...
  > test_loo_predictive_metric.R:         NULL        NULL    }    if (FALSE) {        base::q(save = "no", status = 1)    }    base::invisible()})
  > test_loo_predictive_metric.R: An irrecoverable exception occurred. R is aborting now ...
  Saving _problems/test_loo_predictive_metric-4.R
  [ FAIL 2 | WARN 1 | SKIP 34 | PASS 847 ]
  
  ══ Skipped tests (34) ══════════════════════════════════════════════════════════
  • On CRAN (32): 'test_loo_subsampling_cases.R:4:3',
    'test_loo_subsampling_cases.R:256:3', 'test_E_loo.R:134:1',
    'test_E_loo.R:142:1', 'test_compare.R:91:1', 'test_compare.R:122:1',
    'test_compare.R:160:1', 'test_crps.R:27:1',
    'test_deprecated_extractors.R:8:1', 'test_deprecated_extractors.R:106:1',
    'test_gpdfit.R:1:1', 'test_kfold_helpers.R:139:1',
    'test_loo_and_waic.R:23:1', 'test_loo_moment_matching.R:157:1',
    'test_loo_moment_matching.R:247:1', 'test_loo_moment_matching.R:365:1',
    'test_model_weighting.R:69:1', 'test_print_plot.R:41:1',
    'test_print_plot.R:45:1', 'test_print_plot.R:151:1',
    'test_print_plot.R:169:1', 'test_print_plot.R:175:1',
    'test_print_plot.R:181:1', 'test_psis.R:13:1', 'test_psis.R:39:1',
    'test_psislw.R:15:1', 'test_relative_eff.R:7:1', 'test_relative_eff.R:43:3',
    'test_loo_subsampling.R:896:3', 'test_loo_subsampling.R:1077:3',
    'test_tisis.R:76:1', 'test_tisis.R:213:1'
  • Sys.info()[["sysname"]] == "Darwin" && R.version$arch == "aarch64" is TRUE
    (2): 'test_loo_moment_matching.R:468:3', 'test_psis.R:157:3'
  
  ══ Failed tests ════════════════════════════════════════════════════════════════
  ── Error ('test_loo_and_waic.R:30:3'): loo with cores=1 and cores=2 gives same results ──
  Error in `vapply(x, FUN = match.arg(fun), FUN.VALUE = fun_val, item)`: values must be length 1000,
   but FUN(X[[1]]) result is length 0
  Backtrace:
      ▆
   1. ├─base::suppressWarnings(loo(LLarr, r_eff = r_eff_arr, cores = 2)) at test_loo_and_waic.R:30:3
   2. │ └─base::withCallingHandlers(...)
   3. ├─loo::loo(LLarr, r_eff = r_eff_arr, cores = 2)
   4. └─loo::loo.array(LLarr, r_eff = r_eff_arr, cores = 2)
   5.   └─loo:::importance_sampling.array(...)
   6.     └─loo:::do_importance_sampling(...)
   7.       └─loo:::psis_apply(lw_list, "log_weights", fun_val = numeric(S))
   8.         └─base::vapply(x, FUN = match.arg(fun), FUN.VALUE = fun_val, item)
  ── Error ('test_loo_predictive_metric.R:4:1'): (code run outside of `test_that()`) ──
  Error in `vapply(x, FUN = match.arg(fun), FUN.VALUE = fun_val, item)`: values must be length 1000,
   but FUN(X[[1]]) result is length 0
  Backtrace:
      ▆
   1. ├─loo::psis(-LL, r_eff = r_eff, cores = 2) at test_loo_predictive_metric.R:4:1
   2. └─loo:::psis.matrix(-LL, r_eff = r_eff, cores = 2)
   3.   └─loo:::importance_sampling.matrix(...)
   4.     └─loo:::do_importance_sampling(...)
   5.       └─loo:::psis_apply(lw_list, "log_weights", fun_val = numeric(S))
   6.         └─base::vapply(x, FUN = match.arg(fun), FUN.VALUE = fun_val, item)
  
  [ FAIL 2 | WARN 1 | SKIP 34 | PASS 847 ]
  Error:
  ! Test failures.
  Execution halted