Running ‘testthat.R’ [14s/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: FUN(X[[i]], ...)
  > 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:  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)) {        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))             w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L],                 type = "b")        if (w > LONG)             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)        .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: FUN(X[[i]], ...)
  > test_loo_and_waic.R: 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: do_importance_sampling(log_ratios, r_eff = r_eff, cores = cores,     method = method)
  > test_loo_and_waic.R: 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)
  > 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: suppressWarnings(loo(LLarr, r_eff = r_eff_arr, cores = 2))
  > test_loo_and_waic.R: 23: eval(code, test_env)
  > test_loo_and_waic.R: 24: eval(code, test_env)
  > test_loo_and_waic.R: 25: withCallingHandlers({    eval(code, test_env)    new_expectations <- the$test_expectations > starting_expectations    if (snapshot_skipped) {        skip("On CRAN")    }    else if (!new_expectations && skip_on_empty) {        skip_empty()    }
  > 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: FUN(X[[i]], ...)
  > test_loo_and_waic.R: }, 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,     error = handle_error, interrupt = handle_interrupt) 7: 
  > test_loo_and_waic.R: lapply(X = S, FUN = FUN, ...)
  > test_loo_and_waic.R:  8: doTryCatch(return(expr), name, parentenv, handler)
  > test_loo_and_waic.R:  9: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  > test_loo_and_waic.R: 26: 10: doTryCatch(return(expr), name, parentenv, handler)tryCatchList(expr, classes, parentenv, handlers)
  > test_loo_and_waic.R: 
  > test_loo_and_waic.R: 27: 11: tryCatchOne(expr, names, parentenv, handlers[[1L]])tryCatch(expr, error = function(e) {
  > test_loo_and_waic.R:     call <- conditionCall(e)28:     if (!is.null(call)) {        if (identical(call[[1L]], quote(doTryCatch)))             call <- sys.call(-4L)        dcall <- deparse(call, nlines = 1L)        prefix <- paste("Error in", dcall, ": ")tryCatchList(expr, classes, parentenv, handlers)
  > test_loo_and_waic.R: 29: tryCatch(withCallingHandlers({    eval(code, test_env)        LONG <- 75L    new_expectations <- the$test_expectations > starting_expectations        sm <- strsplit(conditionMessage(e), "\n")[[1L]]    if (snapshot_skipped) {        w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w")        skip("On CRAN")        if (is.na(w))     }            w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L],     else if (!new_expectations && skip_on_empty) {                type = "b")        skip_empty()        if (w > LONG)     }            prefix <- paste0(prefix, "\n  ")}, expectation = handle_expectation, packageNotFoundError = function(e) {    }    if (on_cran()) {        skip(paste0("{", e$package, "} is not installed."))    }}, snapshot_on_cran = function(cnd) {    snapshot_skipped <<- TRUE    else prefix <- "Error : "    invokeRestart("muffle_cran_snapshot")    msg <- paste0(prefix, conditionMessage(e), "\n")    .Internal(seterrmessage(msg[1L]))    if (!silent && isTRUE(getOption("show.error.messages"))) {        cat(msg, file = outFile)        .Internal(printDeferredWarnings())    }    invisible(structure(msg, class = "try-error", condition = e))})}, skip = handle_skip, warning = handle_warning, message = handle_message, 
  > test_loo_and_waic.R:     error = handle_error, interrupt = handle_interrupt), error = handle_fatal)
  > test_loo_and_waic.R: 30: doWithOneRestart(return(expr), restart)
  > 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))31: 
  > test_loo_and_waic.R: withOneRestart(expr, restarts[[1L]])14: 
  > test_loo_and_waic.R: FUN(X[[i]], ...)32: 
  > test_loo_and_waic.R: withRestarts(tryCatch(withCallingHandlers({15:     eval(code, test_env)    new_expectations <- the$test_expectations > starting_expectations    if (snapshot_skipped) {        skip("On CRAN")    }    else if (!new_expectations && skip_on_empty) {        skip_empty()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: do_importance_sampling(log_ratios, r_eff = r_eff, cores = cores,     method = method)
  > test_loo_and_waic.R: 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)
  > 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: suppressWarnings(loo(LLarr, r_eff = r_eff_arr, cores = 2))
  > test_loo_and_waic.R:     }23: eval(code, test_env)
  > test_loo_and_waic.R: 24: eval(code, test_env)}, expectation = handle_expectation, packageNotFoundError = function(e) {    if (on_cran()) {        skip(paste0("{", e$package, "} is not installed."))    }
  > test_loo_and_waic.R: }, snapshot_on_cran = function(cnd) {25:     snapshot_skipped <<- TRUEwithCallingHandlers({    invokeRestart("muffle_cran_snapshot")    eval(code, test_env)}, skip = handle_skip, warning = handle_warning, message = handle_message,     new_expectations <- the$test_expectations > starting_expectations    error = handle_error, interrupt = handle_interrupt), error = handle_fatal),     if (snapshot_skipped) {    end_test = function() {    })
  > test_loo_and_waic.R: 33: test_code(code, parent.frame())
  > 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)        skip("On CRAN")    }    else if (!new_expectations && skip_on_empty) {        skip_empty()    }}, expectation = handle_expectation, packageNotFoundError = function(e) {    if (on_cran()) {        skip(paste0("{", e$package, "} is not installed."))    }    })}, snapshot_on_cran = function(cnd) {
  > test_loo_and_waic.R:     snapshot_skipped <<- TRUE35:     invokeRestart("muffle_cran_snapshot")eval(code, test_env)
  > test_loo_and_waic.R: 36: eval(code, test_env)
  > test_loo_and_waic.R: 37: withCallingHandlers({    eval(code, test_env)    new_expectations <- the$test_expectations > starting_expectations    if (snapshot_skipped) {}, skip = handle_skip, warning = handle_warning, message = handle_message,         skip("On CRAN")    error = handle_error, interrupt = handle_interrupt)    }
  > test_loo_and_waic.R:     else if (!new_expectations && skip_on_empty) {        skip_empty()    }}, expectation = handle_expectation, packageNotFoundError = function(e) {    if (on_cran()) {26:         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)
  > test_loo_and_waic.R: 38: doTryCatch(return(expr), name, parentenv, handler)
  > test_loo_and_waic.R: 39: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  > test_loo_and_waic.R: 40: tryCatchList(expr, classes, parentenv, handlers)
  > test_loo_and_waic.R: 41: tryCatch(withCallingHandlers({    eval(code, test_env)    new_expectations <- the$test_expectations > starting_expectationsdoTryCatch(return(expr), name, parentenv, handler)    if (snapshot_skipped) {
  > test_loo_and_waic.R:         skip("On CRAN")27:     }tryCatchOne(expr, names, parentenv, handlers[[1L]])    else if (!new_expectations && skip_on_empty) {
  > test_loo_and_waic.R:         skip_empty()28:     }tryCatchList(expr, classes, parentenv, handlers)}, expectation = handle_expectation, packageNotFoundError = function(e) {
  > test_loo_and_waic.R:     if (on_cran()) {        skip(paste0("{", e$package, "} is not installed."))    }}, snapshot_on_cran = function(cnd) {29: tryCatch(withCallingHandlers({    eval(code, test_env)    new_expectations <- the$test_expectations > starting_expectations    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: 
  > test_loo_and_waic.R: 44: withRestarts(tryCatch(withCallingHandlers({    eval(code, test_env)    new_expectations <- the$test_expectations > starting_expectations    if (snapshot_skipped) {        skip("On CRAN")    }    else if (!new_expectations && skip_on_empty) {        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,     error = handle_error, interrupt = handle_interrupt), error = handle_fatal),     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:     end_test = function() {30:     })doWithOneRestart(return(expr), restart)
  > test_loo_and_waic.R: 
  > test_loo_and_waic.R: 45: 31: test_code(code = exprs, env = env, reporter = get_reporter() %||% withOneRestart(expr, restarts[[1L]])    StopReporter$new())
  > test_loo_and_waic.R: 
  > test_loo_and_waic.R: 32: 46: withRestarts(tryCatch(withCallingHandlers({source_file(path, env = env(env), desc = desc, shuffle = shuffle,     eval(code, test_env)    new_expectations <- the$test_expectations > starting_expectations    if (snapshot_skipped) {        skip("On CRAN")    error_call = error_call)
  > test_loo_and_waic.R: 47: test_one_file(path, env = the$testing_env, shuffle = shuffle)
  > test_loo_and_waic.R:     }48:     else if (!new_expectations && skip_on_empty) {doTryCatch(return(expr), name, parentenv, handler)        skip_empty()
  > test_loo_and_waic.R:     }49: }, expectation = handle_expectation, packageNotFoundError = function(e) {tryCatchOne(expr, names, parentenv, handlers[[1L]])    if (on_cran()) {
  > test_loo_and_waic.R: 50: tryCatchList(expr, classes, parentenv, handlers)
  > test_loo_and_waic.R: 51:         skip(paste0("{", e$package, "} is not installed."))tryCatch(code, testthat_abort_reporter = function(cnd) {    }    cat(conditionMessage(cnd), "\n")}, snapshot_on_cran = function(cnd) {    NULL})
  > test_loo_and_waic.R: 52: with_reporter(multi, test_one_file(path, env = the$testing_env,     shuffle = shuffle))
  > test_loo_and_waic.R: 53: asNamespace("testthat")$queue_task(path, shuffle)    snapshot_skipped <<- TRUE
  > test_loo_and_waic.R:     invokeRestart("muffle_cran_snapshot")}, skip = handle_skip, warning = handle_warning, message = handle_message,     error = handle_error, interrupt = handle_interrupt), error = handle_fatal),     end_test = function() {    })54: 
  > test_loo_and_waic.R: (function (path, shuffle) 33: {test_code(code, parent.frame())    asNamespace("testthat")$queue_task(path, shuffle)
  > test_loo_and_waic.R: })(base::quote("test_loo_and_waic.R"), base::quote(FALSE))34: 
  > test_loo_and_waic.R: test_that("loo with cores=1 and cores=2 gives same results", 55:     {(function (what, args, quote = FALSE, envir = parent.frame())         loo2 <- suppressWarnings(loo(LLarr, r_eff = r_eff_arr, {    if (!is.list(args))         stop("second argument must be a list")    if (quote)         args <- lapply(args, enquote)            cores = 2))        expect_equal(loo1$estimates, loo2$estimates)    })
  > test_loo_and_waic.R: 35:     .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: eval(code, test_env)
  > test_loo_and_waic.R: 36: eval(code, test_env)
  > test_loo_and_waic.R: 56: 37: base::do.call(base::do.call, base::c(base::readRDS("/Volumes/Temp/tmp/RtmpMZgqmz/callr-fun-375c23ef5a"),     base::list(envir = .GlobalEnv, quote = TRUE)), envir = .GlobalEnv,     quote = TRUE)
  > test_loo_and_waic.R: withCallingHandlers({57:     eval(code, test_env)base::saveRDS(base::do.call(base::do.call, base::c(base::readRDS("/Volumes/Temp/tmp/RtmpMZgqmz/callr-fun-375c23ef5a"),     new_expectations <- the$test_expectations > starting_expectations    base::list(envir = .GlobalEnv, quote = TRUE)), envir = .GlobalEnv,     if (snapshot_skipped) {    quote = TRUE), file = "/Volumes/Temp/tmp/RtmpMZgqmz/callr-rs-result-375b3703f0",         skip("On CRAN")    compress = FALSE)    }
  > test_loo_and_waic.R: 58: base::withCallingHandlers({    {        NULL        NULL    }    base::saveRDS(base::do.call(base::do.call, base::c(base::readRDS("/Volumes/Temp/tmp/RtmpMZgqmz/callr-fun-375c23ef5a"),         base::list(envir = .GlobalEnv, quote = TRUE)), envir = .GlobalEnv,     else if (!new_expectations && skip_on_empty) {        quote = TRUE), file = "/Volumes/Temp/tmp/RtmpMZgqmz/callr-rs-result-375b3703f0",         skip_empty()        compress = FALSE)    }    base::flush(base::stdout())}, expectation = handle_expectation, packageNotFoundError = function(e) {    base::flush(base::stderr())    if (on_cran()) {    {        skip(paste0("{", e$package, "} is not installed."))        NULL    }        NULL}, snapshot_on_cran = function(cnd) {    }    snapshot_skipped <<- TRUE    base::invisible()    invokeRestart("muffle_cran_snapshot")}, error = function(e) {}, skip = handle_skip, warning = handle_warning, message = handle_message,     {    error = handle_error, interrupt = handle_interrupt)        callr_data <- base::as.environment("tools:callr")$`__callr_data__`
  > test_loo_and_waic.R:         err <- callr_data$err38:         if (FALSE) {doTryCatch(return(expr), name, parentenv, handler)            base::assign(".Traceback", base::.traceback(4), envir = callr_data)
  > test_loo_and_waic.R:             utils::dump.frames("__callr_dump__")39:             base::assign(".Last.dump", .GlobalEnv$`__callr_dump__`,                 envir = callr_data)            base::rm("__callr_dump__", envir = .GlobalEnv)        }tryCatchOne(expr, names, parentenv, handlers[[1L]])        e <- err$process_call(e)
  > test_loo_and_waic.R:         e2 <- err$new_error("error in callr subprocess")40:         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]tryCatchList(expr, classes, parentenv, handlers)        if (!base::is.na(cut)) {
  > test_loo_and_waic.R:             e2$trace <- e2$trace[-(1:cut), ]41:         }tryCatch(withCallingHandlers({        if (callr_data$has_otel) {    eval(code, test_env)    new_expectations <- the$test_expectations > starting_expectations    if (snapshot_skipped) {        skip("On CRAN")    }            callr_data$otel_span$record_exception(e2)    else if (!new_expectations && skip_on_empty) {        }        base::saveRDS(base::list("error", e2, e), file = base::paste0("/Volumes/Temp/tmp/RtmpMZgqmz/callr-rs-result-375b3703f0",             ".error"))    }}, interrupt = function(e) {        skip_empty()    {    }        callr_data <- base::as.environment("tools:callr")$`__callr_data__`}, expectation = handle_expectation, packageNotFoundError = function(e) {        err <- callr_data$err    if (on_cran()) {        if (FALSE) {        skip(paste0("{", e$package, "} is not installed."))            base::assign(".Traceback", base::.traceback(4), envir = callr_data)    }            utils::dump.frames("__callr_dump__")}, snapshot_on_cran = function(cnd) {            base::assign(".Last.dump", .GlobalEnv$`__callr_dump__`,     snapshot_skipped <<- TRUE                envir = callr_data)    invokeRestart("muffle_cran_snapshot")            base::rm("__callr_dump__", envir = .GlobalEnv)}, skip = handle_skip, warning = handle_warning, message = handle_message,         }    error = handle_error, interrupt = handle_interrupt), error = handle_fatal)        e <- err$process_call(e)
  > test_loo_and_waic.R:         e2 <- err$new_error("error in callr subprocess")42:         class <- base::classdoWithOneRestart(return(expr), restart)        class(e2) <- base::c("callr_remote_error", class(e2))
  > test_loo_and_waic.R:         e2 <- err$add_trace_back(e2)43:         cut <- base::which(e2$trace$scope == "global")[1]withOneRestart(expr, restarts[[1L]])        if (!base::is.na(cut)) {
  > test_loo_and_waic.R:             e2$trace <- e2$trace[-(1:cut), ]44:         }withRestarts(tryCatch(withCallingHandlers({        if (callr_data$has_otel) {    eval(code, test_env)            callr_data$otel_span$record_exception(e2)    new_expectations <- the$test_expectations > starting_expectations        }    if (snapshot_skipped) {        base::saveRDS(base::list("error", e2, e), file = base::paste0("/Volumes/Temp/tmp/RtmpMZgqmz/callr-rs-result-375b3703f0",             ".error"))    }        skip("On CRAN")    }
  > test_loo_and_waic.R: }, callr_message = function(e) {    base::try({        callr_data <- base::as.environment("tools:callr")$`__callr_data__`        pxlib <- callr_data$pxlib    else if (!new_expectations && skip_on_empty) {        skip_empty()        if (base::is.null(e$code)) {    }            e$code <- "301"        }        msg <- base::paste0("base64::", pxlib$base64_encode(base::serialize(e,             NULL)))        data <- base::paste0(e$code, " ", base::nchar(msg), "\n", }, expectation = handle_expectation, packageNotFoundError = function(e) {    if (on_cran()) {        skip(paste0("{", e$package, "} is not installed."))    }}, snapshot_on_cran = function(cnd) {            msg)    snapshot_skipped <<- TRUE        if (callr_data$has_otel) {    invokeRestart("muffle_cran_snapshot")            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"))) {}, skip = handle_skip, warning = handle_warning, message = handle_message,             base::invokeRestart("cli_message_handled")    error = handle_error, interrupt = handle_interrupt), error = handle_fatal),         }    end_test = function() {        else if (base::inherits(e, "message") && !base::is.null(base::findRestart("muffleMessage"))) {    })            base::invokeRestart("muffleMessage")
  > test_loo_and_waic.R:         }45:     })test_code(code = exprs, env = env, reporter = get_reporter() %||% })
  > test_loo_and_waic.R: 59: doTryCatch(return(expr), name, parentenv, handler)    StopReporter$new())
  > test_loo_and_waic.R: 
  > test_loo_and_waic.R: 60: 46: tryCatchOne(expr, names, parentenv, handlers[[1L]])source_file(path, env = env(env), desc = desc, shuffle = shuffle, 
  > test_loo_and_waic.R:     error_call = error_call)61: 
  > test_loo_and_waic.R: tryCatchList(expr, names[-nh], parentenv, handlers[-nh])47: 
  > test_loo_and_waic.R: test_one_file(path, env = the$testing_env, shuffle = shuffle)62: 
  > test_loo_and_waic.R: doTryCatch(return(expr), name, parentenv, handler)48: 
  > test_loo_and_waic.R: doTryCatch(return(expr), name, parentenv, handler)63: tryCatchOne(tryCatchList(expr, names[-nh], parentenv, handlers[-nh]),     names[nh], parentenv, handlers[[nh]])
  > test_loo_and_waic.R: 
  > test_loo_and_waic.R: 64: 49: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  > test_loo_and_waic.R: 50: tryCatchList(expr, classes, parentenv, handlers)tryCatchList(expr, classes, parentenv, handlers)
  > test_loo_and_waic.R: 65: base::tryCatch(base::withCallingHandlers({    {
  > test_loo_and_waic.R:         NULL51:         NULLtryCatch(code, testthat_abort_reporter = function(cnd) {    }    cat(conditionMessage(cnd), "\n")    base::saveRDS(base::do.call(base::do.call, base::c(base::readRDS("/Volumes/Temp/tmp/RtmpMZgqmz/callr-fun-375c23ef5a"),     NULL        base::list(envir = .GlobalEnv, quote = TRUE)), envir = .GlobalEnv, })        quote = TRUE), file = "/Volumes/Temp/tmp/RtmpMZgqmz/callr-rs-result-375b3703f0", 
  > test_loo_and_waic.R:         compress = FALSE)52:     base::flush(base::stdout())    base::flush(base::stderr())    {        NULL        NULLwith_reporter(multi, test_one_file(path, env = the$testing_env,     }    shuffle = shuffle))
  > test_loo_and_waic.R: 53: asNamespace("testthat")$queue_task(path, shuffle)
  > test_loo_and_waic.R:     base::invisible()}, error = function(e) {    {        callr_data <- base::as.environment("tools:callr")$`__callr_data__`        err <- callr_data$err        if (FALSE) {            base::assign(".Traceback", base::.traceback(4), envir = callr_data)            utils::dump.frames("__callr_dump__")54: (function (path, shuffle) {    asNamespace("testthat")$queue_task(path, shuffle)})(base::quote("test_loo_and_waic.R"), base::quote(FALSE))            base::assign(".Last.dump", .GlobalEnv$`__callr_dump__`,                 envir = callr_data)            base::rm("__callr_dump__", envir = .GlobalEnv)        }        e <- err$process_call(e)
  > test_loo_and_waic.R:         e2 <- err$new_error("error in callr subprocess")55:         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), ]        }        if (callr_data$has_otel) {(function (what, args, quote = FALSE, envir = parent.frame())             callr_data$otel_span$record_exception(e2){    if (!is.list(args))         stop("second argument must be a list")    if (quote)         args <- lapply(args, enquote)        }    .Internal(do.call(what, args, envir))        base::saveRDS(base::list("error", e2, e), file = base::paste0("/Volumes/Temp/tmp/RtmpMZgqmz/callr-rs-result-375b3703f0", })(base::quote(function (path, shuffle)             ".error")){    }    asNamespace("testthat")$queue_task(path, shuffle)}, interrupt = function(e) {}), 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/RtmpMZgqmz/callr-fun-375c23ef5a"),     {    base::list(envir = .GlobalEnv, quote = TRUE)), envir = .GlobalEnv,         callr_data <- base::as.environment("tools:callr")$`__callr_data__`    quote = TRUE)        err <- callr_data$err
  > test_loo_and_waic.R:         if (FALSE) {57:             base::assign(".Traceback", base::.traceback(4), envir = callr_data)base::saveRDS(base::do.call(base::do.call, base::c(base::readRDS("/Volumes/Temp/tmp/RtmpMZgqmz/callr-fun-375c23ef5a"),             utils::dump.frames("__callr_dump__")    base::list(envir = .GlobalEnv, quote = TRUE)), envir = .GlobalEnv,             base::assign(".Last.dump", .GlobalEnv$`__callr_dump__`,     quote = TRUE), file = "/Volumes/Temp/tmp/RtmpMZgqmz/callr-rs-result-375b3703f0",                 envir = callr_data)    compress = FALSE)            base::rm("__callr_dump__", envir = .GlobalEnv)
  > test_loo_and_waic.R:         }58:         e <- err$process_call(e)base::withCallingHandlers({        e2 <- err$new_error("error in callr subprocess")    {        class <- base::class        NULL        class(e2) <- base::c("callr_remote_error", class(e2))        NULL        e2 <- err$add_trace_back(e2)    }        cut <- base::which(e2$trace$scope == "global")[1]    base::saveRDS(base::do.call(base::do.call, base::c(base::readRDS("/Volumes/Temp/tmp/RtmpMZgqmz/callr-fun-375c23ef5a"),         if (!base::is.na(cut)) {        base::list(envir = .GlobalEnv, quote = TRUE)), envir = .GlobalEnv,             e2$trace <- e2$trace[-(1:cut), ]        quote = TRUE), file = "/Volumes/Temp/tmp/RtmpMZgqmz/callr-rs-result-375b3703f0",         }        compress = FALSE)        if (callr_data$has_otel) {    base::flush(base::stdout())    base::flush(base::stderr())    {        NULL        NULL            callr_data$otel_span$record_exception(e2)    }    base::invisible()}, error = function(e) {    {        callr_data <- base::as.environment("tools:callr")$`__callr_data__`        }        err <- callr_data$err        base::saveRDS(base::list("error", e2, e), file = base::paste0("/Volumes/Temp/tmp/RtmpMZgqmz/callr-rs-result-375b3703f0",             ".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"        if (FALSE) {        }            base::assign(".Traceback", base::.traceback(4), envir = callr_data)        msg <- base::paste0("base64::", pxlib$base64_encode(base::serialize(e,             utils::dump.frames("__callr_dump__")            NULL)))            base::assign(".Last.dump", .GlobalEnv$`__callr_dump__`,         data <- base::paste0(e$code, " ", base::nchar(msg), "\n",                 envir = callr_data)            msg)            base::rm("__callr_dump__", envir = .GlobalEnv)        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"))) {        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)            base::invokeRestart("cli_message_handled")        cut <- base::which(e2$trace$scope == "global")[1]
  > test_loo_and_waic.R:         }        if (!base::is.na(cut)) {            e2$trace <- e2$trace[-(1:cut), ]        else if (base::inherits(e, "message") && !base::is.null(base::findRestart("muffleMessage"))) {            base::invokeRestart("muffleMessage")        }    })        }        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/RtmpMZgqmz/callr-rs-result-375b3703f0",             ".error"))    }}, interrupt = function(e) {}), error = function(e) {    {        NULL        NULL    }    {    if (FALSE) {        callr_data <- base::as.environment("tools:callr")$`__callr_data__`        base::try(base::stop(e))        err <- callr_data$err    }        if (FALSE) {    if (FALSE) {            base::assign(".Traceback", base::.traceback(4), envir = callr_data)        base::q(save = "no", status = 1)            utils::dump.frames("__callr_dump__")    }            base::assign(".Last.dump", .GlobalEnv$`__callr_dump__`,     base::invisible()                envir = callr_data)}, interrupt = function(e) {            base::rm("__callr_dump__", envir = .GlobalEnv)    {        }        NULL        e <- err$process_call(e)        NULL        e2 <- err$new_error("error in callr subprocess")    }        class <- base::class    if (FALSE) {        class(e2) <- base::c("callr_remote_error", class(e2))        base::q(save = "no", status = 1)        e2 <- err$add_trace_back(e2)    }        cut <- base::which(e2$trace$scope == "global")[1]    base::invisible()        if (!base::is.na(cut)) {})            e2$trace <- e2$trace[-(1:cut), ]
  > test_loo_and_waic.R:         }An irrecoverable exception occurred. R is aborting now ...
  > test_loo_and_waic.R:         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/RtmpMZgqmz/callr-rs-result-375b3703f0",             ".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"        }        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))        }        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")        }    })})
  > test_loo_and_waic.R: 59: doTryCatch(return(expr), name, parentenv, handler)
  > test_loo_and_waic.R: 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: 62: doTryCatch(return(expr), name, parentenv, handler)
  > test_loo_and_waic.R: 63: tryCatchOne(tryCatchList(expr, names[-nh], parentenv, handlers[-nh]),     names[nh], parentenv, handlers[[nh]])
  > test_loo_and_waic.R: 64: tryCatchList(expr, classes, parentenv, handlers)
  > test_loo_and_waic.R: 65: base::tryCatch(base::withCallingHandlers({    {        NULL        NULL    }    base::saveRDS(base::do.call(base::do.call, base::c(base::readRDS("/Volumes/Temp/tmp/RtmpMZgqmz/callr-fun-375c23ef5a"),         base::list(envir = .GlobalEnv, quote = TRUE)), envir = .GlobalEnv,         quote = TRUE), file = "/Volumes/Temp/tmp/RtmpMZgqmz/callr-rs-result-375b3703f0",         compress = FALSE)    base::flush(base::stdout())    base::flush(base::stderr())    {        NULL        NULL    }    base::invisible()}, error = function(e) {    {        callr_data <- base::as.environment("tools:callr")$`__callr_data__`        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)        }        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), ]        }        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/RtmpMZgqmz/callr-rs-result-375b3703f0",             ".error"))    }}, interrupt = function(e) {    {        callr_data <- base::as.environment("tools:callr")$`__callr_data__`        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)        }        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), ]        }        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/RtmpMZgqmz/callr-rs-result-375b3703f0",             ".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"        }        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))        }        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")        }    })}), error = function(e) {    {        NULL        NULL    }    if (FALSE) {        base::try(base::stop(e))    }    if (FALSE) {        base::q(save = "no", status = 1)    }    base::invisible()}, interrupt = function(e) {    {        NULL        NULL    }    if (FALSE) {        base::q(save = "no", status = 1)    }    base::invisible()})
  > 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: 
  > test_loo_predictive_metric.R: Traceback:
  > test_loo_predictive_metric.R:  1:  1: outer(X, Y)outer(X, Y)
  > test_loo_predictive_metric.R: 
  > test_loo_predictive_metric.R:  2:  2: -theta %o% x-theta %o% x
  > test_loo_predictive_metric.R: 
  > 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:  6: FUN(X[[i]], ...)
  > test_loo_predictive_metric.R:  7:  3: posterior::gpdfit(exp(x) - exp_cutoff, sort_x = FALSE)
  > test_loo_predictive_metric.R:  4: psis_smooth_tail(lw_tail, cutoff)lapply(X = S, FUN = FUN, ...)
  > test_loo_predictive_metric.R: 
  > test_loo_predictive_metric.R:  5:  8: is_fun(log_ratios_i = log_ratios[, i], tail_len_i = tail_len[i])doTryCatch(return(expr), name, parentenv, handler)
  > test_loo_predictive_metric.R: 
  > test_loo_predictive_metric.R:  6:  9: FUN(X[[i]], ...)tryCatchOne(expr, names, parentenv, handlers[[1L]])
  > test_loo_predictive_metric.R: 
  > test_loo_predictive_metric.R: 10: tryCatchList(expr, classes, parentenv, handlers)
  > test_loo_predictive_metric.R: 11: tryCatch(expr, error = function(e) { 7:     call <- conditionCall(e)lapply(X = S, FUN = FUN, ...)    if (!is.null(call)) {
  > test_loo_predictive_metric.R:         if (identical(call[[1L]], quote(doTryCatch)))  8:             call <- sys.call(-4L)doTryCatch(return(expr), name, parentenv, handler)        dcall <- deparse(call, nlines = 1L)
  > test_loo_predictive_metric.R:         prefix <- paste("Error in", dcall, ": ") 9:         LONG <- 75LtryCatchOne(expr, names, parentenv, handlers[[1L]])        sm <- strsplit(conditionMessage(e), "\n")[[1L]]
  > test_loo_predictive_metric.R:         w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w")10:         if (is.na(w)) tryCatchList(expr, classes, parentenv, handlers)            w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L], 
  > test_loo_predictive_metric.R:                 type = "b")11:         if (w > LONG) tryCatch(expr, error = function(e) {            prefix <- paste0(prefix, "\n  ")    call <- conditionCall(e)    }    if (!is.null(call)) {        if (identical(call[[1L]], quote(doTryCatch)))             call <- sys.call(-4L)        dcall <- deparse(call, nlines = 1L)    else prefix <- "Error : "    msg <- paste0(prefix, conditionMessage(e), "\n")    .Internal(seterrmessage(msg[1L]))    if (!silent && isTRUE(getOption("show.error.messages"))) {        prefix <- paste("Error in", dcall, ": ")        LONG <- 75L        sm <- strsplit(conditionMessage(e), "\n")[[1L]]        w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w")        cat(msg, file = outFile)        .Internal(printDeferredWarnings())    }    invisible(structure(msg, class = "try-error", condition = e))        if (is.na(w))             w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L],                 type = "b")        if (w > LONG) })
  > test_loo_predictive_metric.R: 12: 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: 14:             prefix <- paste0(prefix, "\n  ")FUN(X[[i]], ...)    }    else prefix <- "Error : "    msg <- paste0(prefix, conditionMessage(e), "\n")    .Internal(seterrmessage(msg[1L]))    if (!silent && isTRUE(getOption("show.error.messages"))) {
  > test_loo_predictive_metric.R:         cat(msg, file = outFile)15:         .Internal(printDeferredWarnings())lapply(seq_len(cores), inner.do)    }
  > test_loo_predictive_metric.R:     invisible(structure(msg, class = "try-error", condition = e))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_predictive_metric.R: 17: do_importance_sampling(log_ratios, r_eff = r_eff, cores = cores,     method = method)
  > test_loo_predictive_metric.R: 18: importance_sampling.matrix(log_ratios, ..., r_eff = r_eff, cores = cores,     method = "psis")
  > test_loo_predictive_metric.R: 19: psis.matrix(-LL, r_eff = r_eff, cores = 2)
  > test_loo_predictive_metric.R: 12: try(lapply(X = S, FUN = FUN, ...), silent = TRUE)
  > test_loo_predictive_metric.R: 
  > test_loo_predictive_metric.R: 13: 20: sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE))psis(-LL, r_eff = r_eff, cores = 2)
  > test_loo_predictive_metric.R: 
  > test_loo_predictive_metric.R: 14: 21: FUN(X[[i]], ...)eval(code, test_env)
  > test_loo_predictive_metric.R: 
  > test_loo_predictive_metric.R: 15: 22: lapply(seq_len(cores), inner.do)eval(code, test_env)
  > test_loo_predictive_metric.R: 
  > test_loo_predictive_metric.R: 16: 23: 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: withCallingHandlers({do_importance_sampling(log_ratios, r_eff = r_eff, cores = cores,     eval(code, test_env)    method = method)    new_expectations <- the$test_expectations > starting_expectations
  > test_loo_predictive_metric.R:     if (snapshot_skipped) {18:         skip("On CRAN")importance_sampling.matrix(log_ratios, ..., r_eff = r_eff, cores = cores,     }    method = "psis")    else if (!new_expectations && skip_on_empty) {
  > test_loo_predictive_metric.R:         skip_empty()19:     }psis.matrix(-LL, r_eff = r_eff, cores = 2)}, expectation = handle_expectation, packageNotFoundError = function(e) {
  > test_loo_predictive_metric.R:     if (on_cran()) {20:         skip(paste0("{", e$package, "} is not installed."))psis(-LL, r_eff = r_eff, cores = 2)    }
  > test_loo_predictive_metric.R: }, snapshot_on_cran = function(cnd) {21:     snapshot_skipped <<- TRUEeval(code, test_env)    invokeRestart("muffle_cran_snapshot")
  > test_loo_predictive_metric.R: }, skip = handle_skip, warning = handle_warning, message = handle_message, 22:     error = handle_error, interrupt = handle_interrupt)eval(code, test_env)
  > test_loo_predictive_metric.R: 
  > test_loo_predictive_metric.R: 24: 23: doTryCatch(return(expr), name, parentenv, handler)withCallingHandlers({
  > test_loo_predictive_metric.R:     eval(code, test_env)25:     new_expectations <- the$test_expectations > starting_expectationstryCatchOne(expr, names, parentenv, handlers[[1L]])    if (snapshot_skipped) {
  > test_loo_predictive_metric.R:         skip("On CRAN")26:     }tryCatchList(expr, classes, parentenv, handlers)    else if (!new_expectations && skip_on_empty) {
  > test_loo_predictive_metric.R:         skip_empty()
  > test_loo_predictive_metric.R: 27: tryCatch(withCallingHandlers({    eval(code, test_env)    new_expectations <- the$test_expectations > starting_expectations    if (snapshot_skipped) {        skip("On CRAN")    }    else if (!new_expectations && skip_on_empty) {        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")}, expectation = handle_expectation, packageNotFoundError = function(e) {}, skip = handle_skip, warning = handle_warning, message = handle_message,     if (on_cran()) {    error = handle_error, interrupt = handle_interrupt), error = handle_fatal)        skip(paste0("{", e$package, "} is not installed."))
  > test_loo_predictive_metric.R:     }28: }, snapshot_on_cran = function(cnd) {doWithOneRestart(return(expr), restart)    snapshot_skipped <<- TRUE
  > test_loo_predictive_metric.R:     invokeRestart("muffle_cran_snapshot")29: }, skip = handle_skip, warning = handle_warning, message = handle_message, withOneRestart(expr, restarts[[1L]])    error = handle_error, interrupt = handle_interrupt)
  > test_loo_predictive_metric.R: 
  > test_loo_predictive_metric.R: 30: 24: withRestarts(tryCatch(withCallingHandlers({doTryCatch(return(expr), name, parentenv, handler)    eval(code, test_env)    new_expectations <- the$test_expectations > starting_expectations    if (snapshot_skipped) {        skip("On CRAN")    }
  > test_loo_predictive_metric.R:     else if (!new_expectations && skip_on_empty) {25:         skip_empty()tryCatchOne(expr, names, parentenv, handlers[[1L]])    }
  > test_loo_predictive_metric.R: }, expectation = handle_expectation, packageNotFoundError = function(e) {26:     if (on_cran()) {tryCatchList(expr, classes, parentenv, handlers)        skip(paste0("{", e$package, "} is not installed."))
  > test_loo_predictive_metric.R:     }27: }, snapshot_on_cran = function(cnd) {tryCatch(withCallingHandlers({    snapshot_skipped <<- TRUE    eval(code, test_env)    invokeRestart("muffle_cran_snapshot")    new_expectations <- the$test_expectations > starting_expectations}, 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: 31: test_code(code = exprs, env = env, reporter = get_reporter() %||%     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: 33: test_one_file(path, env = the$testing_env, shuffle = shuffle)
  > test_loo_predictive_metric.R: 34:     if (snapshot_skipped) {doTryCatch(return(expr), name, parentenv, handler)        skip("On CRAN")    }    else if (!new_expectations && skip_on_empty) {        skip_empty()    }
  > test_loo_predictive_metric.R: 35: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  > test_loo_predictive_metric.R: 36: }, 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,     error = handle_error, interrupt = handle_interrupt), error = handle_fatal)tryCatchList(expr, classes, parentenv, handlers)
  > test_loo_predictive_metric.R: 
  > test_loo_predictive_metric.R: 28: 37: doWithOneRestart(return(expr), restart)tryCatch(code, testthat_abort_reporter = function(cnd) {
  > test_loo_predictive_metric.R:     cat(conditionMessage(cnd), "\n")29:     NULLwithOneRestart(expr, restarts[[1L]])})
  > test_loo_predictive_metric.R: 30: withRestarts(tryCatch(withCallingHandlers({
  > test_loo_predictive_metric.R: 38: with_reporter(multi, test_one_file(path, env = the$testing_env,     shuffle = shuffle))
  > test_loo_predictive_metric.R:     eval(code, test_env)    new_expectations <- the$test_expectations > starting_expectations    if (snapshot_skipped) {        skip("On CRAN")    }39: asNamespace("testthat")$queue_task(path, shuffle)
  > test_loo_predictive_metric.R: 40: (function (path, shuffle)     else if (!new_expectations && skip_on_empty) {{        skip_empty()    asNamespace("testthat")$queue_task(path, shuffle)    }})(base::quote("test_loo_predictive_metric.R"), base::quote(FALSE))}, expectation = handle_expectation, packageNotFoundError = function(e) {
  > test_loo_predictive_metric.R:     if (on_cran()) {41:         skip(paste0("{", e$package, "} is not installed."))(function (what, args, quote = FALSE, envir = parent.frame())     }{}, snapshot_on_cran = function(cnd) {    if (!is.list(args))     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),     end_test = function() {        stop("second argument must be a list")    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)31: }), base::quote(list("test_loo_predictive_metric.R", FALSE)), test_code(code = exprs, env = env, reporter = get_reporter() %||%     envir = base::quote(<environment>), quote = base::quote(TRUE))    StopReporter$new())
  > test_loo_predictive_metric.R: 
  > test_loo_predictive_metric.R: 42: 32: base::do.call(base::do.call, base::c(base::readRDS("/Volumes/Temp/tmp/RtmpMZgqmz/callr-fun-375caa251b"),     base::list(envir = .GlobalEnv, quote = TRUE)), envir = .GlobalEnv,     quote = TRUE)
  > test_loo_predictive_metric.R: 43: source_file(path, env = env(env), desc = desc, shuffle = shuffle, base::saveRDS(base::do.call(base::do.call, base::c(base::readRDS("/Volumes/Temp/tmp/RtmpMZgqmz/callr-fun-375caa251b"),     base::list(envir = .GlobalEnv, quote = TRUE)), envir = .GlobalEnv,     quote = TRUE), file = "/Volumes/Temp/tmp/RtmpMZgqmz/callr-rs-result-375766a161b",     compress = FALSE)    error_call = error_call)
  > test_loo_predictive_metric.R: 
  > test_loo_predictive_metric.R: 44: 33: base::withCallingHandlers({test_one_file(path, env = the$testing_env, shuffle = shuffle)    {
  > test_loo_predictive_metric.R:         NULL34:         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/RtmpMZgqmz/callr-fun-375caa251b"),         base::list(envir = .GlobalEnv, quote = TRUE)), envir = .GlobalEnv,         quote = TRUE), file = "/Volumes/Temp/tmp/RtmpMZgqmz/callr-rs-result-375766a161b",         compress = FALSE)    base::flush(base::stdout())35:     base::flush(base::stderr())tryCatchOne(expr, names, parentenv, handlers[[1L]])    {
  > test_loo_predictive_metric.R:         NULL36:         NULLtryCatchList(expr, classes, parentenv, handlers)    }
  > test_loo_predictive_metric.R:     base::invisible()37: }, error = function(e) {tryCatch(code, testthat_abort_reporter = function(cnd) {    {    cat(conditionMessage(cnd), "\n")        callr_data <- base::as.environment("tools:callr")$`__callr_data__`    NULL        err <- callr_data$err})        if (FALSE) {
  > test_loo_predictive_metric.R:             base::assign(".Traceback", base::.traceback(4), envir = callr_data)38:             utils::dump.frames("__callr_dump__")with_reporter(multi, test_one_file(path, env = the$testing_env,             base::assign(".Last.dump", .GlobalEnv$`__callr_dump__`,     shuffle = shuffle))                envir = callr_data)
  > test_loo_predictive_metric.R:             base::rm("__callr_dump__", envir = .GlobalEnv)39:         }asNamespace("testthat")$queue_task(path, shuffle)        e <- err$process_call(e)
  > test_loo_predictive_metric.R:         e2 <- err$new_error("error in callr subprocess")40:         class <- base::class(function (path, shuffle)         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)        }    asNamespace("testthat")$queue_task(path, shuffle)        base::saveRDS(base::list("error", e2, e), file = base::paste0("/Volumes/Temp/tmp/RtmpMZgqmz/callr-rs-result-375766a161b", })(base::quote("test_loo_predictive_metric.R"), base::quote(FALSE))            ".error"))
  > test_loo_predictive_metric.R:     }41: }, interrupt = function(e) {(function (what, args, quote = FALSE, envir = parent.frame())     {{        callr_data <- base::as.environment("tools:callr")$`__callr_data__`    if (!is.list(args))         err <- callr_data$err        stop("second argument must be a list")        if (FALSE) {    if (quote)             base::assign(".Traceback", base::.traceback(4), envir = callr_data)        args <- lapply(args, enquote)            utils::dump.frames("__callr_dump__")
  > test_loo_predictive_metric.R:     .Internal(do.call(what, args, envir))})(base::quote(function (path, shuffle) {    asNamespace("testthat")$queue_task(path, shuffle)}), base::quote(list("test_loo_predictive_metric.R", FALSE)),             base::assign(".Last.dump", .GlobalEnv$`__callr_dump__`,                 envir = callr_data)            base::rm("__callr_dump__", envir = .GlobalEnv)        }        e <- err$process_call(e)    envir = base::quote(<environment>), quote = base::quote(TRUE))        e2 <- err$new_error("error in callr subprocess")
  > test_loo_predictive_metric.R:         class <- base::class42:         class(e2) <- base::c("callr_remote_error", class(e2))base::do.call(base::do.call, base::c(base::readRDS("/Volumes/Temp/tmp/RtmpMZgqmz/callr-fun-375caa251b"),         e2 <- err$add_trace_back(e2)    base::list(envir = .GlobalEnv, quote = TRUE)), envir = .GlobalEnv,         cut <- base::which(e2$trace$scope == "global")[1]    quote = TRUE)        if (!base::is.na(cut)) {
  > test_loo_predictive_metric.R:             e2$trace <- e2$trace[-(1:cut), ]43:         }base::saveRDS(base::do.call(base::do.call, base::c(base::readRDS("/Volumes/Temp/tmp/RtmpMZgqmz/callr-fun-375caa251b"),     base::list(envir = .GlobalEnv, quote = TRUE)), envir = .GlobalEnv,     quote = TRUE), file = "/Volumes/Temp/tmp/RtmpMZgqmz/callr-rs-result-375766a161b",     compress = FALSE)
  > test_loo_predictive_metric.R:         if (callr_data$has_otel) {44:             callr_data$otel_span$record_exception(e2)base::withCallingHandlers({        }    {        base::saveRDS(base::list("error", e2, e), file = base::paste0("/Volumes/Temp/tmp/RtmpMZgqmz/callr-rs-result-375766a161b",             ".error"))    }}, callr_message = function(e) {    base::try({        NULL        callr_data <- base::as.environment("tools:callr")$`__callr_data__`        NULL        pxlib <- callr_data$pxlib    }        if (base::is.null(e$code)) {    base::saveRDS(base::do.call(base::do.call, base::c(base::readRDS("/Volumes/Temp/tmp/RtmpMZgqmz/callr-fun-375caa251b"),             e$code <- "301"        base::list(envir = .GlobalEnv, quote = TRUE)), envir = .GlobalEnv,         }        quote = TRUE), file = "/Volumes/Temp/tmp/RtmpMZgqmz/callr-rs-result-375766a161b",         msg <- base::paste0("base64::", pxlib$base64_encode(base::serialize(e,         compress = FALSE)            NULL)))    base::flush(base::stdout())        data <- base::paste0(e$code, " ", base::nchar(msg), "\n",     base::flush(base::stderr())            msg)    {        if (callr_data$has_otel) {        NULL            callr_data$otel_span$add_event("callr message", attributes = list(status_code = e$code))        NULL        }    }        pxlib$write_fd(3L, data)    base::invisible()        if (base::inherits(e, "cli_message") && !base::is.null(base::findRestart("cli_message_handled"))) {}, error = function(e) {            base::invokeRestart("cli_message_handled")    {        }        callr_data <- base::as.environment("tools:callr")$`__callr_data__`        else if (base::inherits(e, "message") && !base::is.null(base::findRestart("muffleMessage"))) {            base::invokeRestart("muffleMessage")        }    })        err <- callr_data$err})        if (FALSE) {
  > test_loo_predictive_metric.R:             base::assign(".Traceback", base::.traceback(4), envir = callr_data)45:             utils::dump.frames("__callr_dump__")doTryCatch(return(expr), name, parentenv, handler)            base::assign(".Last.dump", .GlobalEnv$`__callr_dump__`, 
  > test_loo_predictive_metric.R:                 envir = callr_data)46:             base::rm("__callr_dump__", envir = .GlobalEnv)tryCatchOne(expr, names, parentenv, handlers[[1L]])        }
  > test_loo_predictive_metric.R:         e <- err$process_call(e)47:         e2 <- err$new_error("error in callr subprocess")tryCatchList(expr, names[-nh], parentenv, handlers[-nh])        class <- base::class
  > test_loo_predictive_metric.R:         class(e2) <- base::c("callr_remote_error", class(e2))48:         e2 <- err$add_trace_back(e2)doTryCatch(return(expr), name, parentenv, handler)        cut <- base::which(e2$trace$scope == "global")[1]
  > test_loo_predictive_metric.R:         if (!base::is.na(cut)) {49:             e2$trace <- e2$trace[-(1:cut), ]tryCatchOne(tryCatchList(expr, names[-nh], parentenv, handlers[-nh]),         }    names[nh], parentenv, handlers[[nh]])        if (callr_data$has_otel) {
  > test_loo_predictive_metric.R:             callr_data$otel_span$record_exception(e2)50:         }tryCatchList(expr, classes, parentenv, handlers)        base::saveRDS(base::list("error", e2, e), file = base::paste0("/Volumes/Temp/tmp/RtmpMZgqmz/callr-rs-result-375766a161b", 
  > test_loo_predictive_metric.R:             ".error"))51:     }base::tryCatch(base::withCallingHandlers({}, interrupt = function(e) {    {    {        NULL        callr_data <- base::as.environment("tools:callr")$`__callr_data__`        NULL        err <- callr_data$err    }        if (FALSE) {    base::saveRDS(base::do.call(base::do.call, base::c(base::readRDS("/Volumes/Temp/tmp/RtmpMZgqmz/callr-fun-375caa251b"),             base::assign(".Traceback", base::.traceback(4), envir = callr_data)        base::list(envir = .GlobalEnv, quote = TRUE)), envir = .GlobalEnv,             utils::dump.frames("__callr_dump__")        quote = TRUE), file = "/Volumes/Temp/tmp/RtmpMZgqmz/callr-rs-result-375766a161b",         compress = FALSE)    base::flush(base::stdout())    base::flush(base::stderr())    {            base::assign(".Last.dump", .GlobalEnv$`__callr_dump__`,         NULL                envir = callr_data)        NULL            base::rm("__callr_dump__", envir = .GlobalEnv)    }        }    base::invisible()        e <- err$process_call(e)}, error = function(e) {        e2 <- err$new_error("error in callr subprocess")    {        class <- base::class        callr_data <- base::as.environment("tools:callr")$`__callr_data__`        class(e2) <- base::c("callr_remote_error", class(e2))        err <- callr_data$err        e2 <- err$add_trace_back(e2)        if (FALSE) {        cut <- base::which(e2$trace$scope == "global")[1]            base::assign(".Traceback", base::.traceback(4), envir = callr_data)        if (!base::is.na(cut)) {            utils::dump.frames("__callr_dump__")            e2$trace <- e2$trace[-(1:cut), ]            base::assign(".Last.dump", .GlobalEnv$`__callr_dump__`,         }                envir = callr_data)        if (callr_data$has_otel) {            base::rm("__callr_dump__", envir = .GlobalEnv)            callr_data$otel_span$record_exception(e2)        }        }        e <- err$process_call(e)        base::saveRDS(base::list("error", e2, e), file = base::paste0("/Volumes/Temp/tmp/RtmpMZgqmz/callr-rs-result-375766a161b",         e2 <- err$new_error("error in callr subprocess")            ".error"))        class <- base::class    }        class(e2) <- base::c("callr_remote_error", class(e2))}, callr_message = function(e) {        e2 <- err$add_trace_back(e2)    base::try({        cut <- base::which(e2$trace$scope == "global")[1]        callr_data <- base::as.environment("tools:callr")$`__callr_data__`        if (!base::is.na(cut)) {        pxlib <- callr_data$pxlib            e2$trace <- e2$trace[-(1:cut), ]        if (base::is.null(e$code)) {        }            e$code <- "301"        if (callr_data$has_otel) {        }            callr_data$otel_span$record_exception(e2)        msg <- base::paste0("base64::", pxlib$base64_encode(base::serialize(e,         }            NULL)))        base::saveRDS(base::list("error", e2, e), file = base::paste0("/Volumes/Temp/tmp/RtmpMZgqmz/callr-rs-result-375766a161b",         data <- base::paste0(e$code, " ", base::nchar(msg), "\n",             ".error"))            msg)    }        if (callr_data$has_otel) {}, interrupt = function(e) {            callr_data$otel_span$add_event("callr message", attributes = list(status_code = e$code))    {        }        callr_data <- base::as.environment("tools:callr")$`__callr_data__`        pxlib$write_fd(3L, data)        err <- callr_data$err        if (base::inherits(e, "cli_message") && !base::is.null(base::findRestart("cli_message_handled"))) {        if (FALSE) {            base::invokeRestart("cli_message_handled")            base::assign(".Traceback", base::.traceback(4), envir = callr_data)        }            utils::dump.frames("__callr_dump__")        else if (base::inherits(e, "message") && !base::is.null(base::findRestart("muffleMessage"))) {
  > test_loo_predictive_metric.R:             base::assign(".Last.dump", .GlobalEnv$`__callr_dump__`,                 envir = callr_data)            base::rm("__callr_dump__", envir = .GlobalEnv)        }        e <- err$process_call(e)        e2 <- err$new_error("error in callr subprocess")            base::invokeRestart("muffleMessage")        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), ]        }        }    })})
  > test_loo_predictive_metric.R: 45: doTryCatch(return(expr), name, parentenv, handler)        if (callr_data$has_otel) {
  > test_loo_predictive_metric.R:             callr_data$otel_span$record_exception(e2)46:         }tryCatchOne(expr, names, parentenv, handlers[[1L]])        base::saveRDS(base::list("error", e2, e), file = base::paste0("/Volumes/Temp/tmp/RtmpMZgqmz/callr-rs-result-375766a161b",             ".error"))    }}, callr_message = function(e) {    base::try({
  > test_loo_predictive_metric.R: 47: tryCatchList(expr, names[-nh], parentenv, handlers[-nh])
  > test_loo_predictive_metric.R: 48:         callr_data <- base::as.environment("tools:callr")$`__callr_data__`doTryCatch(return(expr), name, parentenv, handler)        pxlib <- callr_data$pxlib
  > test_loo_predictive_metric.R:         if (base::is.null(e$code)) {49:             e$code <- "301"tryCatchOne(tryCatchList(expr, names[-nh], parentenv, handlers[-nh]),         }    names[nh], parentenv, handlers[[nh]])        msg <- base::paste0("base64::", pxlib$base64_encode(base::serialize(e, 
  > test_loo_predictive_metric.R:             NULL)))50:         data <- base::paste0(e$code, " ", base::nchar(msg), "\n", tryCatchList(expr, classes, parentenv, handlers)            msg)
  > test_loo_predictive_metric.R:         if (callr_data$has_otel) {51:             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")        }base::tryCatch(base::withCallingHandlers({    })    {}), error = function(e) {        NULL    {        NULL        NULL    }        NULL    base::saveRDS(base::do.call(base::do.call, base::c(base::readRDS("/Volumes/Temp/tmp/RtmpMZgqmz/callr-fun-375caa251b"),     }        base::list(envir = .GlobalEnv, quote = TRUE)), envir = .GlobalEnv,     if (FALSE) {        quote = TRUE), file = "/Volumes/Temp/tmp/RtmpMZgqmz/callr-rs-result-375766a161b",         base::try(base::stop(e))        compress = FALSE)    }    base::flush(base::stdout())    if (FALSE) {    base::flush(base::stderr())        base::q(save = "no", status = 1)    {    }        NULL    base::invisible()        NULL}, interrupt = function(e) {    }    {    base::invisible()        NULL}, error = function(e) {        NULL    {    }        callr_data <- base::as.environment("tools:callr")$`__callr_data__`    if (FALSE) {        err <- callr_data$err        base::q(save = "no", status = 1)        if (FALSE) {    }            base::assign(".Traceback", base::.traceback(4), envir = callr_data)    base::invisible()            utils::dump.frames("__callr_dump__")})            base::assign(".Last.dump", .GlobalEnv$`__callr_dump__`, 
  > test_loo_predictive_metric.R:                 envir = callr_data)An irrecoverable exception occurred. R is aborting now ...
  > test_loo_predictive_metric.R:             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), ]        }        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/RtmpMZgqmz/callr-rs-result-375766a161b",             ".error"))    }}, interrupt = function(e) {    {        callr_data <- base::as.environment("tools:callr")$`__callr_data__`        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)        }        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), ]        }        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/RtmpMZgqmz/callr-rs-result-375766a161b",             ".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"        }        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))        }        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")        }    })}), error = function(e) {    {        NULL        NULL    }    if (FALSE) {        base::try(base::stop(e))    }    if (FALSE) {        base::q(save = "no", status = 1)    }    base::invisible()}, interrupt = function(e) {    {        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