Last updated on 2026-09-23 09:52:09 CEST.
| Flavor | Version | Tinstall | Tcheck | Ttotal | Status | Flags |
|---|---|---|---|---|---|---|
| r-devel-linux-x86_64-debian-clang | 1.1.0 | 89.37 | 358.05 | 447.42 | OK | |
| r-devel-linux-x86_64-debian-gcc | 1.1.0 | 56.32 | 237.94 | 294.26 | OK | |
| r-devel-linux-x86_64-fedora-clang | 1.1.0 | 58.00 | 245.06 | 303.06 | OK | |
| r-devel-linux-x86_64-fedora-gcc | 1.1.0 | 64.00 | 248.05 | 312.05 | OK | |
| r-devel-windows-x86_64 | 1.1.0 | 91.00 | 452.00 | 543.00 | OK | |
| r-patched-linux-x86_64 | 1.1.0 | 82.55 | 343.20 | 425.75 | OK | |
| r-release-linux-x86_64 | 1.1.0 | 90.56 | 343.79 | 434.35 | OK | |
| r-release-macos-arm64 | 1.1.0 | 17.00 | 92.00 | 109.00 | OK | |
| r-release-macos-x86_64 | 1.1.0 | 59.00 | 456.00 | 515.00 | OK | |
| r-release-windows-x86_64 | 1.1.0 | 95.00 | 358.00 | 453.00 | OK | |
| r-oldrel-macos-arm64 | 1.1.0 | 22.00 | 129.00 | 151.00 | ERROR | |
| r-oldrel-macos-x86_64 | 1.1.0 | 59.00 | 679.00 | 738.00 | OK | |
| r-oldrel-windows-x86_64 | 1.1.0 | 115.00 | 505.00 | 620.00 | OK |
Version: 1.1.0
Check: tests
Result: ERROR
Running ‘spelling.R’ [0s/0s]
Running ‘testthat.R’ [41s/33s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
> library(testthat)
> library(missSBM)
>
> test_check("missSBM")
Adjusting Variational EM for Stochastic Block Model
Dyads are distributed according to a 'undirected' SBM.
Imputation assumes a 'covar-dyad' network-sampling process
iteration #: 2
iteration #: 3
Adjusting Variational EM for Stochastic Block Model
Dyads are distributed according to a 'undirected' SBM.
Imputation assumes a 'dyad' network-sampling process
iteration #: 2
iteration #: 3
Adjusting Variational EM for Stochastic Block Model
Dyads are distributed according to a 'undirected' SBM.
Imputation assumes a 'covar-node' network-sampling process
iteration #: 2
iteration #: 3
iteration #: 4
iteration #: 5
Adjusting Variational EM for Stochastic Block Model
Dyads are distributed according to a 'undirected' SBM.
Imputation assumes a 'node' network-sampling process
iteration #: 2
iteration #: 3
iteration #: 4
Tested sampling:
- dyad
- node
- double-standard
- block-node
- block-dyad
Adjusting Variational EM for Stochastic Block Model
Imputation assumes a 'dyad' network-sampling process
Initialization of 3 model(s).
Tested sampling:
- dyad
- node
- double-standard
- block-node
- block-dyad
- degreeTested sampling:
- dyad
- node
- double-standard
- block-node
- block-dyad
- degree
sampling: dyad new better on connectivity
node
double-standard
block-node new better on mixture
Adjusting Variational EM for Stochastic Block Model
iteration #: 2
iteration #: 3
iteration #: 4
iteration #: 5
iteration #: 6
iteration #: 7
iteration #: 8
iteration #: 9
iteration #: 10
iteration #: 11
iteration #: 12
iteration #: 13
iteration #: 14
iteration #: 15
iteration #: 16
iteration #: 17
iteration #: 18
iteration #: 19
iteration #: 20
iteration #: 21
iteration #: 22
iteration #: 23
iteration #: 24
iteration #: 25
iteration #: 26
iteration #: 27
iteration #: 28
iteration #: 29
iteration #: 30
iteration #: 31
iteration #: 32
iteration #: 33
iteration #: 34
Adjusting Variational EM for Stochastic Block Model
Dyads are distributed according to a 'undirected' SBM.
Imputation assumes a 'node' network-sampling process
iteration #: 2
iteration #: 3
iteration #: 4
iteration #: 5
iteration #: 6
iteration #: 7
iteration #: 8
iteration #: 9
iteration #: 10
iteration #: 11
iteration #: 12
iteration #: 13
iteration #: 14
iteration #: 15
iteration #: 16
iteration #: 17
iteration #: 18
iteration #: 19
iteration #: 20
iteration #: 21
iteration #: 22
iteration #: 23
iteration #: 24
iteration #: 25
iteration #: 26
iteration #: 27
iteration #: 28
iteration #: 29
iteration #: 30
iteration #: 31
iteration #: 32
iteration #: 33
iteration #: 34
Adjusting Variational EM for Stochastic Block Model
Imputation assumes a 'node' network-sampling process
Initialization of 1 model(s).
Performing VEM inference
Model with 3 blocks.
Adjusting Variational EM for Stochastic Block Model
Imputation assumes a 'dyad' network-sampling process
Initialization of 2 model(s).
Performing VEM inference
Model with 2 blocks.
Model with 1 blocks.
Polishing (node-swap)
Looking for better solutions
Pass 1 Going forward +
Pass 1 Going backward +
*** caught segfault ***
address 0x110, cause 'invalid permissions'
*** caught segfault ***
address 0x110, cause 'invalid permissions'
Traceback:
1: dispatcher(membership_name, membership_init$to_cc(), model_name, .self$network_to_cc(), TRUE)
2:
Traceback:
FUN(X[[i]], ...)
1: 3: dispatcher(membership_name, membership_init$to_cc(), model_name, lapply(X = S, FUN = FUN, ...) .self$network_to_cc(), TRUE)
4: 2: doTryCatch(return(expr), name, parentenv, handler)FUN(X[[i]], ...)
5:
tryCatchOne(expr, names, parentenv, handlers[[1L]]) 3:
6: lapply(X = S, FUN = FUN, ...)tryCatchList(expr, classes, parentenv, handlers)
4: 7: doTryCatch(return(expr), name, parentenv, handler)tryCatch(expr, error = function(e) {
5: call <- conditionCall(e)tryCatchOne(expr, names, parentenv, handlers[[1L]]) if (!is.null(call)) { if (identical(call[[1L]], quote(doTryCatch)))
call <- sys.call(-4L) 6: tryCatchList(expr, classes, parentenv, handlers) dcall <- deparse(call, nlines = 1L)
7: prefix <- paste("Error in", dcall, ": ")tryCatch(expr, error = function(e) { LONG <- 75L call <- conditionCall(e) sm <- strsplit(conditionMessage(e), "\n")[[1L]] if (!is.null(call)) { w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w") if (identical(call[[1L]], quote(doTryCatch))) if (is.na(w)) w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L], call <- sys.call(-4L) type = "b") dcall <- deparse(call, nlines = 1L) if (w > LONG) prefix <- paste("Error in", dcall, ": ") LONG <- 75L prefix <- paste0(prefix, "\n ") sm <- strsplit(conditionMessage(e), "\n")[[1L]] } w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w") else prefix <- "Error : " if (is.na(w)) msg <- paste0(prefix, conditionMessage(e), "\n") w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L], .Internal(seterrmessage(msg[1L])) type = "b") if (!silent && isTRUE(getOption("show.error.messages"))) { if (w > LONG) cat(msg, file = outFile) prefix <- paste0(prefix, "\n ") .Internal(printDeferredWarnings()) } } else prefix <- "Error : " invisible(structure(msg, class = "try-error", condition = e)) msg <- paste0(prefix, conditionMessage(e), "\n")}) .Internal(seterrmessage(msg[1L]))
if (!silent && isTRUE(getOption("show.error.messages"))) { 8: cat(msg, file = outFile)try(lapply(X = S, FUN = FUN, ...), silent = TRUE) .Internal(printDeferredWarnings())
} 9: invisible(structure(msg, class = "try-error", condition = e))sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE))
})10:
FUN(X[[i]], ...) 8:
try(lapply(X = S, FUN = FUN, ...), silent = TRUE)11:
lapply(seq_len(cores), inner.do) 9:
sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE))12:
parallel::mclapply(X, FUN, ..., mc.cores = mc.cores, mc.set.seed = FALSE, 10: mc.silent = TRUE)FUN(X[[i]], ...)
13: 11: lapply(seq_len(cores), inner.do)parallel_lapply(inits, .self$do_one_estim, mc.cores = ncores,
verbose = (verbosity > 4))12:
parallel::mclapply(X, FUN, ..., mc.cores = mc.cores, mc.set.seed = FALSE, 14: mc.silent = TRUE).self$do_with_inits(inits, Q, reinitialization_effort)
13: 15: parallel_lapply(inits, .self$do_one_estim, mc.cores = ncores, .self$estim_ascend(reinitialization_effort, changing_effort) verbose = (verbosity > 4))
16: 14: private$BMobject$estimate().self$do_with_inits(inits, Q, reinitialization_effort)
15: 17: .self$estim_ascend(reinitialization_effort, changing_effort)mySBM_sbm$optimize(estimOptions = list(verbosity = 0, plot = FALSE))
18: 16: eval(code, test_env)private$BMobject$estimate()
17: 19: mySBM_sbm$optimize(estimOptions = list(verbosity = 0, plot = FALSE))
eval(code, test_env)18:
eval(code, test_env)20:
withCallingHandlers({19: eval(code, test_env)eval(code, test_env) new_expectations <- the$test_expectations > starting_expectations
if (snapshot_skipped) {20: skip("On CRAN")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() } }}, snapshot_on_cran = function(cnd) {}, expectation = handle_expectation, packageNotFoundError = function(e) { snapshot_skipped <<- TRUE if (on_cran()) { skip(paste0("{", e$package, "} is not installed.")) 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")21: }, skip = handle_skip, warning = handle_warning, message = handle_message, doTryCatch(return(expr), name, parentenv, handler) error = handle_error, interrupt = handle_interrupt)
22: 21: tryCatchOne(expr, names, parentenv, handlers[[1L]])doTryCatch(return(expr), name, parentenv, handler)
22: tryCatchOne(expr, names, parentenv, handlers[[1L]])23:
tryCatchList(expr, classes, parentenv, handlers)23:
tryCatchList(expr, classes, parentenv, handlers)24:
tryCatch(withCallingHandlers({24: eval(code, test_env)tryCatch(withCallingHandlers({ new_expectations <- the$test_expectations > starting_expectations eval(code, test_env) if (snapshot_skipped) { new_expectations <- the$test_expectations > starting_expectations skip("On CRAN") if (snapshot_skipped) { } skip("On CRAN") else if (!new_expectations && skip_on_empty) { } skip_empty() else if (!new_expectations && skip_on_empty) { } skip_empty()}, expectation = handle_expectation, packageNotFoundError = function(e) { } if (on_cran()) {}, expectation = handle_expectation, packageNotFoundError = function(e) { skip(paste0("{", e$package, "} is not installed.")) if (on_cran()) { } skip(paste0("{", e$package, "} is not installed."))}, snapshot_on_cran = function(cnd) { } snapshot_skipped <<- TRUE}, snapshot_on_cran = function(cnd) { invokeRestart("muffle_cran_snapshot") snapshot_skipped <<- TRUE}, skip = handle_skip, warning = handle_warning, message = handle_message, invokeRestart("muffle_cran_snapshot") error = handle_error, interrupt = handle_interrupt), error = handle_fatal)}, skip = handle_skip, warning = handle_warning, message = handle_message,
error = handle_error, interrupt = handle_interrupt), error = handle_fatal)25:
doWithOneRestart(return(expr), restart)25:
doWithOneRestart(return(expr), restart)26:
withOneRestart(expr, restarts[[1L]])26:
withOneRestart(expr, restarts[[1L]])
27: 27: withRestarts(tryCatch(withCallingHandlers({withRestarts(tryCatch(withCallingHandlers({ eval(code, test_env) eval(code, test_env) new_expectations <- the$test_expectations > starting_expectations new_expectations <- the$test_expectations > starting_expectations if (snapshot_skipped) { if (snapshot_skipped) { skip("On CRAN") skip("On CRAN") } } else if (!new_expectations && skip_on_empty) { else if (!new_expectations && skip_on_empty) { skip_empty() skip_empty() } }}, expectation = handle_expectation, packageNotFoundError = function(e) {}, expectation = handle_expectation, packageNotFoundError = function(e) { if (on_cran()) { if (on_cran()) { skip(paste0("{", e$package, "} is not installed.")) skip(paste0("{", e$package, "} is not installed.")) } }}, snapshot_on_cran = function(cnd) {}, snapshot_on_cran = function(cnd) { snapshot_skipped <<- TRUE snapshot_skipped <<- TRUE invokeRestart("muffle_cran_snapshot") invokeRestart("muffle_cran_snapshot")}, skip = handle_skip, warning = handle_warning, message = handle_message, }, skip = handle_skip, warning = handle_warning, message = handle_message, error = handle_error, interrupt = handle_interrupt), error = handle_fatal), error = handle_error, interrupt = handle_interrupt), error = handle_fatal), end_test = function() { end_test = function() { }) })
28: 28: test_code(code, parent.frame())test_code(code, parent.frame())
29: 29: test_that("SimpleSBM_fit 'Bernoulli' model, undirected, one covariate", test_that("SimpleSBM_fit 'Bernoulli' model, undirected, one covariate", { { sampler_undirected_cov$rNetwork(store = TRUE) sampler_undirected_cov$rNetwork(store = TRUE) mySBM_sbm <- sbm::SimpleSBM_fit$new(sampler_undirected_cov$networkData, mySBM_sbm <- sbm::SimpleSBM_fit$new(sampler_undirected_cov$networkData, "bernoulli", FALSE, covarList = covarList_undirected) "bernoulli", FALSE, covarList = covarList_undirected) mySBM_sbm$optimize(estimOptions = list(verbosity = 0, mySBM_sbm$optimize(estimOptions = list(verbosity = 0, plot = FALSE)) plot = FALSE)) mySBM_sbm$setModel(Q) mySBM_sbm$setModel(Q) net <- missSBM:::partlyObservedNetwork$new(sampler_undirected_cov$networkData, net <- missSBM:::partlyObservedNetwork$new(sampler_undirected_cov$networkData, covariates = covarList_undirected) covariates = covarList_undirected) cls <- net$clustering(1:(2 * Q)) cl <- cls[[Q]] cls <- net$clustering(1:(2 * Q)) mySBM_missSBM <- missSBM:::SimpleSBM_fit_withCov$new(net, cl <- cls[[Q]] clusterInit = cl, covarList = covarList_undirected) mySBM_missSBM <- missSBM:::SimpleSBM_fit_withCov$new(net, mySBM_missSBM$doVEM() clusterInit = cl, covarList = covarList_undirected) expect_lt(rmse(mySBM_missSBM$connectParam$mean, mySBM_sbm$connectParam$mean), mySBM_missSBM$doVEM() 0.05) expect_lt(rmse(mySBM_missSBM$connectParam$mean, mySBM_sbm$connectParam$mean), expect_gt(ARI(mySBM_missSBM$memberships, mySBM_sbm$memberships), 0.05) 0.8) expect_lt(rmse(mySBM_missSBM$loglik, mySBM_sbm$loglik), 0.01) expect_gt(ARI(mySBM_missSBM$memberships, mySBM_sbm$memberships), expect_lt(rmse(mySBM_missSBM$connectParam$mean, sampler_undirected_cov$connectParam$mean), 0.8) 0.1) expect_lt(rmse(mySBM_missSBM$loglik, mySBM_sbm$loglik), expect_lt(rmse(mySBM_missSBM$covarParam, sampler_undirected_cov$covarParam), 0.01) 0.1) expect_lt(rmse(mySBM_missSBM$connectParam$mean, sampler_undirected_cov$connectParam$mean), expect_gt(ARI(mySBM_missSBM$memberships, sampler_undirected_cov$memberships), 0.1) 0.85) expect_lt(rmse(mySBM_missSBM$covarParam, sampler_undirected_cov$covarParam), }) 0.1)
expect_gt(ARI(mySBM_missSBM$memberships, sampler_undirected_cov$memberships), 30: 0.85)eval(code, test_env) })
31: 30: eval(code, test_env)eval(code, test_env)
32: withCallingHandlers({31: eval(code, test_env)eval(code, test_env) new_expectations <- the$test_expectations > starting_expectations
if (snapshot_skipped) {32: skip("On CRAN")withCallingHandlers({ } else if (!new_expectations && skip_on_empty) { eval(code, test_env) skip_empty() new_expectations <- the$test_expectations > starting_expectations } if (snapshot_skipped) {}, expectation = handle_expectation, packageNotFoundError = function(e) { skip("On CRAN") if (on_cran()) { } skip(paste0("{", e$package, "} is not installed.")) else if (!new_expectations && skip_on_empty) { } skip_empty()}, snapshot_on_cran = function(cnd) { } snapshot_skipped <<- TRUE}, expectation = handle_expectation, packageNotFoundError = function(e) { invokeRestart("muffle_cran_snapshot") if (on_cran()) {}, skip = handle_skip, warning = handle_warning, message = handle_message, skip(paste0("{", e$package, "} is not installed.")) error = handle_error, interrupt = handle_interrupt) }
}, snapshot_on_cran = function(cnd) {33: snapshot_skipped <<- TRUEdoTryCatch(return(expr), name, parentenv, handler) invokeRestart("muffle_cran_snapshot")
}, skip = handle_skip, warning = handle_warning, message = handle_message, 34: error = handle_error, interrupt = handle_interrupt)tryCatchOne(expr, names, parentenv, handlers[[1L]])
33: 35: doTryCatch(return(expr), name, parentenv, handler)
tryCatchList(expr, classes, parentenv, handlers)34:
tryCatchOne(expr, names, parentenv, handlers[[1L]])36:
tryCatch(withCallingHandlers({35: tryCatchList(expr, classes, parentenv, handlers) eval(code, test_env)
new_expectations <- the$test_expectations > starting_expectations36: if (snapshot_skipped) {tryCatch(withCallingHandlers({ skip("On CRAN") eval(code, test_env) } new_expectations <- the$test_expectations > starting_expectations else if (!new_expectations && skip_on_empty) { if (snapshot_skipped) { skip_empty() skip("On CRAN") } }}, expectation = handle_expectation, packageNotFoundError = function(e) { else if (!new_expectations && skip_on_empty) { if (on_cran()) { skip_empty() skip(paste0("{", e$package, "} is not installed.")) } }}, expectation = handle_expectation, packageNotFoundError = function(e) {}, snapshot_on_cran = function(cnd) { if (on_cran()) { snapshot_skipped <<- TRUE skip(paste0("{", e$package, "} is not installed.")) invokeRestart("muffle_cran_snapshot") }}, skip = handle_skip, warning = handle_warning, message = handle_message, }, snapshot_on_cran = function(cnd) { snapshot_skipped <<- TRUE error = handle_error, interrupt = handle_interrupt), error = handle_fatal) invokeRestart("muffle_cran_snapshot")
}, skip = handle_skip, warning = handle_warning, message = handle_message, 37: error = handle_error, interrupt = handle_interrupt), error = handle_fatal)doWithOneRestart(return(expr), restart)
37: doWithOneRestart(return(expr), restart)38:
withOneRestart(expr, restarts[[1L]])38:
withOneRestart(expr, restarts[[1L]])39:
withRestarts(tryCatch(withCallingHandlers({ eval(code, test_env)39: new_expectations <- the$test_expectations > starting_expectationswithRestarts(tryCatch(withCallingHandlers({ if (snapshot_skipped) { eval(code, test_env) skip("On CRAN") new_expectations <- the$test_expectations > starting_expectations } if (snapshot_skipped) { else if (!new_expectations && skip_on_empty) { skip("On CRAN") skip_empty() } }}, expectation = handle_expectation, packageNotFoundError = function(e) { else if (!new_expectations && skip_on_empty) { if (on_cran()) { skip_empty() skip(paste0("{", e$package, "} is not installed.")) } }}, expectation = handle_expectation, packageNotFoundError = function(e) { if (on_cran()) {}, snapshot_on_cran = function(cnd) { skip(paste0("{", e$package, "} is not installed.")) 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_on_cran = function(cnd) { snapshot_skipped <<- TRUE end_test = function() { }) invokeRestart("muffle_cran_snapshot")
}, skip = handle_skip, warning = handle_warning, message = handle_message, 40: error = handle_error, interrupt = handle_interrupt), error = handle_fatal), test_code(code = exprs, env = env, reporter = get_reporter() %||% end_test = function() { StopReporter$new()) })
41: 40: source_file(path, env = env(env), desc = desc, shuffle = shuffle, test_code(code = exprs, env = env, reporter = get_reporter() %||% error_call = error_call) StopReporter$new())
42: 41: FUN(X[[i]], ...)source_file(path, env = env(env), desc = desc, shuffle = shuffle,
error_call = error_call)43:
lapply(test_paths, test_one_file, env = env, desc = desc, shuffle = shuffle, 42: FUN(X[[i]], ...) error_call = error_call)
43: 44: lapply(test_paths, test_one_file, env = env, desc = desc, shuffle = shuffle, doTryCatch(return(expr), name, parentenv, handler) error_call = error_call)
44: 45: doTryCatch(return(expr), name, parentenv, handler)tryCatchOne(expr, names, parentenv, handlers[[1L]])
45: 46: tryCatchOne(expr, names, parentenv, handlers[[1L]])tryCatchList(expr, classes, parentenv, handlers)
46: tryCatchList(expr, classes, parentenv, handlers)47:
tryCatch(code, testthat_abort_reporter = function(cnd) {47: cat(conditionMessage(cnd), "\n")tryCatch(code, testthat_abort_reporter = function(cnd) { NULL cat(conditionMessage(cnd), "\n")}) NULL
})48:
with_reporter(reporters$multi, lapply(test_paths, test_one_file, env = env, desc = desc, shuffle = shuffle, error_call = error_call))48:
with_reporter(reporters$multi, lapply(test_paths, test_one_file, 49: test_files_serial(test_dir = test_dir, test_package = test_package, env = env, desc = desc, shuffle = shuffle, error_call = error_call)) test_paths = test_paths, load_helpers = load_helpers, reporter = reporter,
env = env, stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning, 49: desc = desc, load_package = load_package, shuffle = shuffle, test_files_serial(test_dir = test_dir, test_package = test_package, error_call = error_call) test_paths = test_paths, load_helpers = load_helpers, reporter = reporter,
50: env = env, stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning, test_files(test_dir = path, test_paths = test_paths, test_package = package, desc = desc, load_package = load_package, shuffle = shuffle, reporter = reporter, load_helpers = load_helpers, env = env, error_call = error_call) stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning,
load_package = load_package, parallel = parallel, shuffle = shuffle)50:
test_files(test_dir = path, test_paths = test_paths, test_package = package, 51: reporter = reporter, load_helpers = load_helpers, env = env, test_dir("testthat", package = package, reporter = reporter, ..., load_package = "installed") stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning,
load_package = load_package, parallel = parallel, shuffle = shuffle)
52: 51: test_check("missSBM")test_dir("testthat", package = package, reporter = reporter,
..., load_package = "installed")An irrecoverable exception occurred. R is aborting now ...
52: test_check("missSBM")
An irrecoverable exception occurred. R is aborting now ...
Saving _problems/test-sbm-bernoulli-with-covariates-16.R
*** caught segfault ***
address 0x110, cause 'invalid permissions'
*** caught segfault ***
address 0x110, cause 'invalid permissions'
Traceback:
1: dispatcher(membership_name, membership_init$to_cc(), model_name, .self$network_to_cc(), TRUE)
2: FUN(X[[i]], ...)
3: lapply(X = S, FUN = FUN, ...)
4: doTryCatch(return(expr), name, parentenv, handler)
5: tryCatchOne(expr, names, parentenv, handlers[[1L]])
6: tryCatchList(expr, classes, parentenv, handlers)
7: 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()) }
Traceback:
1: dispatcher(membership_name, membership_init$to_cc(), model_name, invisible(structure(msg, class = "try-error", condition = e)) .self$network_to_cc(), TRUE)})
2: 8: FUN(X[[i]], ...)try(lapply(X = S, FUN = FUN, ...), silent = TRUE)
3: 9: lapply(X = S, FUN = FUN, ...)sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE))
4: 10: doTryCatch(return(expr), name, parentenv, handler)FUN(X[[i]], ...)
11: 5: lapply(seq_len(cores), inner.do)tryCatchOne(expr, names, parentenv, handlers[[1L]])
12: 6: parallel::mclapply(X, FUN, ..., mc.cores = mc.cores, mc.set.seed = FALSE, mc.silent = TRUE)tryCatchList(expr, classes, parentenv, handlers)
13: 7: parallel_lapply(inits, .self$do_one_estim, mc.cores = ncores, tryCatch(expr, error = function(e) { verbose = (verbosity > 4)) call <- conditionCall(e)
if (!is.null(call)) {14: if (identical(call[[1L]], quote(doTryCatch))) call <- sys.call(-4L).self$do_with_inits(inits, Q, reinitialization_effort) dcall <- deparse(call, nlines = 1L)
prefix <- paste("Error in", dcall, ": ")15: LONG <- 75L.self$estim_ascend(reinitialization_effort, changing_effort) sm <- strsplit(conditionMessage(e), "\n")[[1L]]
w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w")16: if (is.na(w)) private$BMobject$estimate() w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L],
type = "b")17: if (w > LONG) mySBM_sbm$optimize(estimOptions = list(verbosity = 0, plot = FALSE)) prefix <- paste0(prefix, "\n ")
}18: else prefix <- "Error : "eval(code, test_env) msg <- paste0(prefix, conditionMessage(e), "\n")
19: .Internal(seterrmessage(msg[1L]))eval(code, test_env) if (!silent && isTRUE(getOption("show.error.messages"))) {
cat(msg, file = outFile)20: .Internal(printDeferredWarnings())withCallingHandlers({ } eval(code, test_env) invisible(structure(msg, class = "try-error", condition = e)) new_expectations <- the$test_expectations > starting_expectations}) if (snapshot_skipped) {
skip("On CRAN") 8: }try(lapply(X = S, FUN = FUN, ...), silent = TRUE) else if (!new_expectations && skip_on_empty) {
skip_empty() 9: sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE)) }
}, expectation = handle_expectation, packageNotFoundError = function(e) { if (on_cran()) {10: skip(paste0("{", e$package, "} is not installed."))FUN(X[[i]], ...) }
}, snapshot_on_cran = function(cnd) {11: snapshot_skipped <<- TRUElapply(seq_len(cores), inner.do) invokeRestart("muffle_cran_snapshot")
}, skip = handle_skip, warning = handle_warning, message = handle_message, 12: error = handle_error, interrupt = handle_interrupt)parallel::mclapply(X, FUN, ..., mc.cores = mc.cores, mc.set.seed = FALSE, mc.silent = TRUE)
21: 13: doTryCatch(return(expr), name, parentenv, handler)parallel_lapply(inits, .self$do_one_estim, mc.cores = ncores, verbose = (verbosity > 4))
22: 14: tryCatchOne(expr, names, parentenv, handlers[[1L]]).self$do_with_inits(inits, Q, reinitialization_effort)
23: 15: tryCatchList(expr, classes, parentenv, handlers).self$estim_ascend(reinitialization_effort, changing_effort)
24: 16: tryCatch(withCallingHandlers({private$BMobject$estimate() eval(code, test_env)
new_expectations <- the$test_expectations > starting_expectations17: mySBM_sbm$optimize(estimOptions = list(verbosity = 0, plot = FALSE)) if (snapshot_skipped) { skip("On CRAN")
}18: else if (!new_expectations && skip_on_empty) { skip_empty()eval(code, test_env) }
}, expectation = handle_expectation, packageNotFoundError = function(e) {19: if (on_cran()) {eval(code, test_env) skip(paste0("{", e$package, "} is not installed."))
}20: }, snapshot_on_cran = function(cnd) { 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) {
skip("On CRAN") }25: else if (!new_expectations && skip_on_empty) {doWithOneRestart(return(expr), restart) skip_empty()
}26: }, expectation = handle_expectation, packageNotFoundError = function(e) {withOneRestart(expr, restarts[[1L]]) if (on_cran()) {
27: skip(paste0("{", e$package, "} is not installed."))withRestarts(tryCatch(withCallingHandlers({ } eval(code, test_env)}, snapshot_on_cran = function(cnd) { new_expectations <- the$test_expectations > starting_expectations snapshot_skipped <<- TRUE if (snapshot_skipped) { invokeRestart("muffle_cran_snapshot") skip("On CRAN")}, skip = handle_skip, warning = handle_warning, message = handle_message, } else if (!new_expectations && skip_on_empty) { error = handle_error, interrupt = handle_interrupt) skip_empty()
}21: }, expectation = handle_expectation, packageNotFoundError = function(e) {doTryCatch(return(expr), name, parentenv, handler) if (on_cran()) {
skip(paste0("{", e$package, "} is not installed."))22: }tryCatchOne(expr, names, parentenv, handlers[[1L]])}, snapshot_on_cran = function(cnd) { snapshot_skipped <<- TRUE
invokeRestart("muffle_cran_snapshot")23: tryCatchList(expr, classes, parentenv, handlers)}, skip = handle_skip, warning = handle_warning, message = handle_message,
error = handle_error, interrupt = handle_interrupt), error = handle_fatal), 24: end_test = function() {tryCatch(withCallingHandlers({ }) eval(code, test_env)
new_expectations <- the$test_expectations > starting_expectations28: if (snapshot_skipped) {test_code(code, parent.frame()) skip("On CRAN")
}29: else if (!new_expectations && skip_on_empty) {test_that("SimpleSBM_fit 'Bernoulli' model, directed, one covariate", skip_empty() { } sampler_directed_cov$rNetwork(store = TRUE) mySBM_sbm <- sbm::SimpleSBM_fit$new(sampler_directed_cov$networkData, }, expectation = handle_expectation, packageNotFoundError = function(e) { "bernoulli", TRUE, covarList = covarList_directed) if (on_cran()) { mySBM_sbm$optimize(estimOptions = list(verbosity = 0, skip(paste0("{", e$package, "} is not installed.")) plot = FALSE)) } mySBM_sbm$setModel(Q)}, snapshot_on_cran = function(cnd) { net <- missSBM:::partlyObservedNetwork$new(sampler_directed_cov$networkData, snapshot_skipped <<- TRUE covariates = covarList_directed) invokeRestart("muffle_cran_snapshot") cls <- net$clustering(1:(2 * Q))}, skip = handle_skip, warning = handle_warning, message = handle_message, cl <- cls[[Q]] error = handle_error, interrupt = handle_interrupt), error = handle_fatal) mySBM_missSBM <- missSBM:::SimpleSBM_fit_withCov$new(net,
clusterInit = cl, covarList = covarList_directed)25: mySBM_missSBM$doVEM(trace = TRUE)doWithOneRestart(return(expr), restart)
expect_lt(rmse(mySBM_missSBM$connectParam$mean, mySBM_sbm$connectParam$mean), 26: 0.1)withOneRestart(expr, restarts[[1L]]) expect_gt(ARI(mySBM_missSBM$memberships, mySBM_sbm$memberships),
0.8)27: withRestarts(tryCatch(withCallingHandlers({ expect_lt(rmse(mySBM_missSBM$loglik, mySBM_sbm$loglik), eval(code, test_env) 0.05) new_expectations <- the$test_expectations > starting_expectations expect_lt(rmse(mySBM_missSBM$connectParam$mean, sampler_directed_cov$connectParam$mean), if (snapshot_skipped) { skip("On CRAN") 0.1) } expect_gt(ARI(mySBM_missSBM$memberships, sampler_directed_cov$memberships), else if (!new_expectations && skip_on_empty) { skip_empty() 0.85) } })}, expectation = handle_expectation, packageNotFoundError = function(e) {
if (on_cran()) {30: skip(paste0("{", e$package, "} is not installed."))eval(code, test_env) }
}, snapshot_on_cran = function(cnd) {31: snapshot_skipped <<- TRUEeval(code, test_env) invokeRestart("muffle_cran_snapshot")
}, skip = handle_skip, warning = handle_warning, message = handle_message, 32: error = handle_error, interrupt = handle_interrupt), error = handle_fatal), withCallingHandlers({ end_test = function() { eval(code, test_env) }) new_expectations <- the$test_expectations > starting_expectations
if (snapshot_skipped) { skip("On CRAN")28: test_code(code, parent.frame()) }
else if (!new_expectations && skip_on_empty) {29: skip_empty()test_that("SimpleSBM_fit 'Bernoulli' model, directed, one covariate", } { sampler_directed_cov$rNetwork(store = TRUE)}, expectation = handle_expectation, packageNotFoundError = function(e) { mySBM_sbm <- sbm::SimpleSBM_fit$new(sampler_directed_cov$networkData, if (on_cran()) { "bernoulli", TRUE, covarList = covarList_directed) mySBM_sbm$optimize(estimOptions = list(verbosity = 0, skip(paste0("{", e$package, "} is not installed.")) plot = FALSE)) } mySBM_sbm$setModel(Q)}, snapshot_on_cran = function(cnd) { net <- missSBM:::partlyObservedNetwork$new(sampler_directed_cov$networkData, snapshot_skipped <<- TRUE covariates = covarList_directed) invokeRestart("muffle_cran_snapshot") cls <- net$clustering(1:(2 * Q))}, skip = handle_skip, warning = handle_warning, message = handle_message, cl <- cls[[Q]] error = handle_error, interrupt = handle_interrupt) mySBM_missSBM <- missSBM:::SimpleSBM_fit_withCov$new(net,
clusterInit = cl, covarList = covarList_directed)33: mySBM_missSBM$doVEM(trace = TRUE)doTryCatch(return(expr), name, parentenv, handler) expect_lt(rmse(mySBM_missSBM$connectParam$mean, mySBM_sbm$connectParam$mean),
0.1)34: expect_gt(ARI(mySBM_missSBM$memberships, mySBM_sbm$memberships), tryCatchOne(expr, names, parentenv, handlers[[1L]]) 0.8) expect_lt(rmse(mySBM_missSBM$loglik, mySBM_sbm$loglik),
0.05)35: expect_lt(rmse(mySBM_missSBM$connectParam$mean, sampler_directed_cov$connectParam$mean), 0.1)tryCatchList(expr, classes, parentenv, handlers) expect_gt(ARI(mySBM_missSBM$memberships, sampler_directed_cov$memberships),
0.85)36: })tryCatch(withCallingHandlers({
eval(code, test_env)30: new_expectations <- the$test_expectations > starting_expectationseval(code, test_env) if (snapshot_skipped) {
skip("On CRAN")31: }eval(code, test_env) else if (!new_expectations && skip_on_empty) {
skip_empty()32: }withCallingHandlers({}, expectation = handle_expectation, packageNotFoundError = function(e) { eval(code, test_env) new_expectations <- the$test_expectations > starting_expectations if (on_cran()) { if (snapshot_skipped) { skip(paste0("{", e$package, "} is not installed.")) 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), error = handle_fatal)}, expectation = handle_expectation, packageNotFoundError = function(e) {
if (on_cran()) {37: doWithOneRestart(return(expr), restart) skip(paste0("{", e$package, "} is not installed."))
}38: }, snapshot_on_cran = function(cnd) {withOneRestart(expr, restarts[[1L]]) snapshot_skipped <<- TRUE
invokeRestart("muffle_cran_snapshot")39: }, skip = handle_skip, warning = handle_warning, message = handle_message, withRestarts(tryCatch(withCallingHandlers({ eval(code, test_env) error = handle_error, interrupt = handle_interrupt)
new_expectations <- the$test_expectations > starting_expectations33: if (snapshot_skipped) { skip("On CRAN")doTryCatch(return(expr), name, parentenv, handler) }
else if (!new_expectations && skip_on_empty) {34: skip_empty() }}, expectation = handle_expectation, packageNotFoundError = function(e) {tryCatchOne(expr, names, parentenv, handlers[[1L]]) if (on_cran()) {
skip(paste0("{", e$package, "} is not installed.")) }35: }, snapshot_on_cran = function(cnd) {tryCatchList(expr, classes, parentenv, handlers) snapshot_skipped <<- TRUE
invokeRestart("muffle_cran_snapshot")36: }, skip = handle_skip, warning = handle_warning, message = handle_message, tryCatch(withCallingHandlers({ error = handle_error, interrupt = handle_interrupt), error = handle_fatal), eval(code, test_env) new_expectations <- the$test_expectations > starting_expectations if (snapshot_skipped) { end_test = function() { skip("On CRAN") })
}40: else if (!new_expectations && skip_on_empty) {test_code(code = exprs, env = env, reporter = get_reporter() %||% skip_empty() StopReporter$new())
}41: }, expectation = handle_expectation, packageNotFoundError = function(e) {source_file(path, env = env(env), desc = desc, shuffle = shuffle, error_call = error_call) if (on_cran()) {
skip(paste0("{", e$package, "} is not installed."))42: }FUN(X[[i]], ...)}, snapshot_on_cran = function(cnd) {
snapshot_skipped <<- TRUE43: invokeRestart("muffle_cran_snapshot")lapply(test_paths, test_one_file, env = env, desc = desc, shuffle = shuffle, }, skip = handle_skip, warning = handle_warning, message = handle_message, error_call = error_call) error = handle_error, interrupt = handle_interrupt), error = handle_fatal)
44: 37: doTryCatch(return(expr), name, parentenv, handler)doWithOneRestart(return(expr), restart)
45: tryCatchOne(expr, names, parentenv, handlers[[1L]])38:
withOneRestart(expr, restarts[[1L]])46:
tryCatchList(expr, classes, parentenv, handlers)39:
withRestarts(tryCatch(withCallingHandlers({47: eval(code, test_env)tryCatch(code, testthat_abort_reporter = function(cnd) { new_expectations <- the$test_expectations > starting_expectations cat(conditionMessage(cnd), "\n") if (snapshot_skipped) { NULL skip("On CRAN")}) }
else if (!new_expectations && skip_on_empty) {48: with_reporter(reporters$multi, lapply(test_paths, test_one_file, skip_empty() env = env, desc = desc, shuffle = shuffle, error_call = error_call)) }
49: }, expectation = handle_expectation, packageNotFoundError = function(e) {test_files_serial(test_dir = test_dir, test_package = test_package, if (on_cran()) { test_paths = test_paths, load_helpers = load_helpers, reporter = reporter, skip(paste0("{", e$package, "} is not installed.")) env = env, stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning, } desc = desc, load_package = load_package, shuffle = shuffle, }, snapshot_on_cran = function(cnd) { error_call = error_call)
snapshot_skipped <<- TRUE50: invokeRestart("muffle_cran_snapshot")test_files(test_dir = path, test_paths = test_paths, test_package = package, }, skip = handle_skip, warning = handle_warning, message = handle_message, reporter = reporter, load_helpers = load_helpers, env = env, error = handle_error, interrupt = handle_interrupt), error = handle_fatal), stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning, end_test = function() { load_package = load_package, parallel = parallel, shuffle = shuffle) })
51: 40: test_dir("testthat", package = package, reporter = reporter, test_code(code = exprs, env = env, reporter = get_reporter() %||% ..., load_package = "installed") StopReporter$new())
52:
test_check("missSBM")41: source_file(path, env = env(env), desc = desc, shuffle = shuffle,
error_call = error_call)An irrecoverable exception occurred. R is aborting now ...
42: FUN(X[[i]], ...)
43: lapply(test_paths, test_one_file, env = env, desc = desc, shuffle = shuffle, error_call = error_call)
44: doTryCatch(return(expr), name, parentenv, handler)
45: tryCatchOne(expr, names, parentenv, handlers[[1L]])
46: tryCatchList(expr, classes, parentenv, handlers)
47: tryCatch(code, testthat_abort_reporter = function(cnd) { cat(conditionMessage(cnd), "\n") NULL})
48: with_reporter(reporters$multi, lapply(test_paths, test_one_file, env = env, desc = desc, shuffle = shuffle, error_call = error_call))
49: test_files_serial(test_dir = test_dir, test_package = test_package, test_paths = test_paths, load_helpers = load_helpers, reporter = reporter, env = env, stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning, desc = desc, load_package = load_package, shuffle = shuffle, error_call = error_call)
50: test_files(test_dir = path, test_paths = test_paths, test_package = package, reporter = reporter, load_helpers = load_helpers, env = env, stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning, load_package = load_package, parallel = parallel, shuffle = shuffle)
51: test_dir("testthat", package = package, reporter = reporter, ..., load_package = "installed")
52: test_check("missSBM")
An irrecoverable exception occurred. R is aborting now ...
Saving _problems/test-sbm-bernoulli-with-covariates-46.R
*** caught segfault ***
address 0x110, cause 'invalid permissions'
*** caught segfault ***
address 0x110, cause 'invalid permissions'
Traceback:
1: dispatcher(membership_name, membership_init$to_cc(), model_name, .self$network_to_cc(), TRUE)
2: FUN(X[[i]], ...)
3: lapply(X = S, FUN = FUN, ...)
4: doTryCatch(return(expr), name, parentenv, handler)
5: tryCatchOne(expr, names, parentenv, handlers[[1L]])
6: tryCatchList(expr, classes, parentenv, handlers)
7: 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))})
8: try(lapply(X = S, FUN = FUN, ...), silent = TRUE)
9: sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE))
10: FUN(X[[i]], ...)
11: lapply(seq_len(cores), inner.do)
12: parallel::mclapply(X, FUN, ..., mc.cores = mc.cores, mc.set.seed = FALSE, mc.silent = TRUE)
13: parallel_lapply(inits, .self$do_one_estim, mc.cores = ncores, verbose = (verbosity > 4))
14: .self$do_with_inits(inits, Q, reinitialization_effort)
15: .self$estim_ascend(reinitialization_effort, changing_effort)
16: private$BMobject$estimate()
17: mySBM_sbm$optimize(estimOptions = list(verbosity = 0, plot = FALSE))
18: eval(code, test_env)
19: eval(code, test_env)
20: withCallingHandlers({ eval(code, test_env) new_expectations <- the$test_expectations > starting_expectations if (snapshot_skipped) { skip("On CRAN") }
Traceback:
1: else if (!new_expectations && skip_on_empty) {dispatcher(membership_name, membership_init$to_cc(), model_name, skip_empty() .self$network_to_cc(), TRUE) }
2: }, expectation = handle_expectation, packageNotFoundError = function(e) {FUN(X[[i]], ...) if (on_cran()) {
3: skip(paste0("{", e$package, "} is not installed."))lapply(X = S, FUN = FUN, ...) }
}, snapshot_on_cran = function(cnd) { 4: doTryCatch(return(expr), name, parentenv, handler) snapshot_skipped <<- TRUE
invokeRestart("muffle_cran_snapshot") 5: }, skip = handle_skip, warning = handle_warning, message = handle_message, tryCatchOne(expr, names, parentenv, handlers[[1L]]) error = handle_error, interrupt = handle_interrupt)
6: 21: doTryCatch(return(expr), name, parentenv, handler)tryCatchList(expr, classes, parentenv, handlers)
7:
tryCatch(expr, error = function(e) {22: call <- conditionCall(e)tryCatchOne(expr, names, parentenv, handlers[[1L]]) if (!is.null(call)) {
if (identical(call[[1L]], quote(doTryCatch))) 23: call <- sys.call(-4L)tryCatchList(expr, classes, parentenv, handlers) dcall <- deparse(call, nlines = 1L)
prefix <- paste("Error in", dcall, ": ")24: LONG <- 75LtryCatch(withCallingHandlers({ sm <- strsplit(conditionMessage(e), "\n")[[1L]] eval(code, test_env) w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w") new_expectations <- the$test_expectations > starting_expectations if (is.na(w)) if (snapshot_skipped) { w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L], skip("On CRAN") type = "b") } if (w > LONG) else if (!new_expectations && skip_on_empty) { prefix <- paste0(prefix, "\n ") skip_empty() } } else prefix <- "Error : "}, expectation = handle_expectation, packageNotFoundError = function(e) { msg <- paste0(prefix, conditionMessage(e), "\n") if (on_cran()) { skip(paste0("{", e$package, "} is not installed.")) } .Internal(seterrmessage(msg[1L]))}, snapshot_on_cran = function(cnd) { if (!silent && isTRUE(getOption("show.error.messages"))) { snapshot_skipped <<- TRUE invokeRestart("muffle_cran_snapshot") cat(msg, file = outFile) .Internal(printDeferredWarnings())}, skip = handle_skip, warning = handle_warning, message = handle_message, } error = handle_error, interrupt = handle_interrupt), error = handle_fatal) invisible(structure(msg, class = "try-error", condition = e))
})25:
doWithOneRestart(return(expr), restart) 8:
try(lapply(X = S, FUN = FUN, ...), silent = TRUE)26:
withOneRestart(expr, restarts[[1L]]) 9:
sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE))27:
withRestarts(tryCatch(withCallingHandlers({10: eval(code, test_env)FUN(X[[i]], ...) new_expectations <- the$test_expectations > starting_expectations
if (snapshot_skipped) {11: skip("On CRAN")lapply(seq_len(cores), inner.do) }
else if (!new_expectations && skip_on_empty) {12: skip_empty()parallel::mclapply(X, FUN, ..., mc.cores = mc.cores, mc.set.seed = FALSE, mc.silent = TRUE) }
}, expectation = handle_expectation, packageNotFoundError = function(e) {13: if (on_cran()) {parallel_lapply(inits, .self$do_one_estim, mc.cores = ncores, skip(paste0("{", e$package, "} is not installed.")) verbose = (verbosity > 4)) }
}, snapshot_on_cran = function(cnd) {14: snapshot_skipped <<- TRUE.self$do_with_inits(inits, Q, reinitialization_effort) invokeRestart("muffle_cran_snapshot")
}, skip = handle_skip, warning = handle_warning, message = handle_message, error = handle_error, interrupt = handle_interrupt), error = handle_fatal), 15: end_test = function() {.self$estim_ascend(reinitialization_effort, changing_effort)
})
16: 28: private$BMobject$estimate()test_code(code, parent.frame())
29: 17: test_that("SimpleSBM_fit 'Bernoulli' model, undirected, no covariate", mySBM_sbm$optimize(estimOptions = list(verbosity = 0, plot = FALSE)) {
sampler_undirected_nocov$rNetwork(store = TRUE)18: eval(code, test_env) mySBM_sbm <- sbm::SimpleSBM_fit$new(sampler_undirected_nocov$networkData,
"bernoulli", FALSE)19: mySBM_sbm$optimize(estimOptions = list(verbosity = 0, eval(code, test_env) plot = FALSE))
20: mySBM_sbm$setModel(3)withCallingHandlers({ net <- missSBM:::partlyObservedNetwork$new(sampler_undirected_nocov$networkData) cl <- net$clustering(3)[[1]] eval(code, test_env) mySBM_missSBM <- missSBM:::SimpleSBM_fit_noCov$new(net, new_expectations <- the$test_expectations > starting_expectations clusterInit = cl) if (snapshot_skipped) { mySBM_missSBM$doVEM() skip("On CRAN") expect_lt(rmse(mySBM_missSBM$connectParam$mean, mySBM_sbm$connectParam$mean), } 0.05) else if (!new_expectations && skip_on_empty) { expect_gt(ARI(mySBM_missSBM$memberships, mySBM_sbm$memberships), skip_empty() } 0.95)}, expectation = handle_expectation, packageNotFoundError = function(e) { expect_lt(rmse(mySBM_missSBM$loglik, mySBM_sbm$loglik), if (on_cran()) { 0.01) skip(paste0("{", e$package, "} is not installed.")) expect_lt(rmse(mySBM_missSBM$connectParam$mean, sampler_undirected_nocov$connectParam$mean), } 0.05)}, snapshot_on_cran = function(cnd) { expect_gt(ARI(mySBM_missSBM$memberships, sampler_undirected_nocov$memberships), snapshot_skipped <<- TRUE invokeRestart("muffle_cran_snapshot") 0.95)}, skip = handle_skip, warning = handle_warning, message = handle_message, }) error = handle_error, interrupt = handle_interrupt)
21: 30: doTryCatch(return(expr), name, parentenv, handler)eval(code, test_env)
22: tryCatchOne(expr, names, parentenv, handlers[[1L]])31:
eval(code, test_env)
23: 32: tryCatchList(expr, classes, parentenv, handlers)withCallingHandlers({
eval(code, test_env)24: new_expectations <- the$test_expectations > starting_expectationstryCatch(withCallingHandlers({ if (snapshot_skipped) { eval(code, test_env) new_expectations <- the$test_expectations > starting_expectations skip("On CRAN") if (snapshot_skipped) { } skip("On CRAN") else if (!new_expectations && skip_on_empty) { } skip_empty() else if (!new_expectations && skip_on_empty) { } skip_empty()}, expectation = handle_expectation, packageNotFoundError = function(e) { } if (on_cran()) {}, expectation = handle_expectation, packageNotFoundError = function(e) { skip(paste0("{", e$package, "} is not installed.")) if (on_cran()) { } skip(paste0("{", e$package, "} is not installed."))}, snapshot_on_cran = function(cnd) { } snapshot_skipped <<- TRUE}, snapshot_on_cran = function(cnd) { invokeRestart("muffle_cran_snapshot") snapshot_skipped <<- TRUE}, skip = handle_skip, warning = handle_warning, message = handle_message, invokeRestart("muffle_cran_snapshot") error = handle_error, interrupt = handle_interrupt)}, skip = handle_skip, warning = handle_warning, message = handle_message,
error = handle_error, interrupt = handle_interrupt), error = handle_fatal)33: doTryCatch(return(expr), name, parentenv, handler)
25: 34: doWithOneRestart(return(expr), restart)tryCatchOne(expr, names, parentenv, handlers[[1L]])
35: tryCatchList(expr, classes, parentenv, handlers)26: withOneRestart(expr, restarts[[1L]])
36: 27: tryCatch(withCallingHandlers({withRestarts(tryCatch(withCallingHandlers({ eval(code, test_env) eval(code, test_env) new_expectations <- the$test_expectations > starting_expectations new_expectations <- the$test_expectations > starting_expectations if (snapshot_skipped) { if (snapshot_skipped) { skip("On CRAN") skip("On CRAN") } } else if (!new_expectations && skip_on_empty) { else if (!new_expectations && skip_on_empty) { skip_empty() skip_empty() } }}, expectation = handle_expectation, packageNotFoundError = function(e) {}, expectation = handle_expectation, packageNotFoundError = function(e) { if (on_cran()) { if (on_cran()) { skip(paste0("{", e$package, "} is not installed.")) skip(paste0("{", e$package, "} is not installed.")) } }}, snapshot_on_cran = function(cnd) {}, snapshot_on_cran = function(cnd) { snapshot_skipped <<- TRUE snapshot_skipped <<- TRUE invokeRestart("muffle_cran_snapshot") invokeRestart("muffle_cran_snapshot")}, skip = handle_skip, warning = handle_warning, message = handle_message, error = handle_error, interrupt = handle_interrupt), error = handle_fatal), }, skip = handle_skip, warning = handle_warning, message = handle_message, end_test = function() { error = handle_error, interrupt = handle_interrupt), error = handle_fatal) })
28: 37: test_code(code, parent.frame())doWithOneRestart(return(expr), restart)
38: 29: withOneRestart(expr, restarts[[1L]])test_that("SimpleSBM_fit 'Bernoulli' model, undirected, no covariate",
{39: sampler_undirected_nocov$rNetwork(store = TRUE)withRestarts(tryCatch(withCallingHandlers({ mySBM_sbm <- sbm::SimpleSBM_fit$new(sampler_undirected_nocov$networkData, eval(code, test_env) "bernoulli", FALSE) new_expectations <- the$test_expectations > starting_expectations mySBM_sbm$optimize(estimOptions = list(verbosity = 0, if (snapshot_skipped) { plot = FALSE)) skip("On CRAN") mySBM_sbm$setModel(3) } net <- missSBM:::partlyObservedNetwork$new(sampler_undirected_nocov$networkData) cl <- net$clustering(3)[[1]] else if (!new_expectations && skip_on_empty) { mySBM_missSBM <- missSBM:::SimpleSBM_fit_noCov$new(net, skip_empty() } clusterInit = cl)}, expectation = handle_expectation, packageNotFoundError = function(e) { mySBM_missSBM$doVEM() if (on_cran()) { expect_lt(rmse(mySBM_missSBM$connectParam$mean, mySBM_sbm$connectParam$mean), skip(paste0("{", e$package, "} is not installed.")) 0.05) } expect_gt(ARI(mySBM_missSBM$memberships, mySBM_sbm$memberships), }, snapshot_on_cran = function(cnd) { 0.95) snapshot_skipped <<- TRUE expect_lt(rmse(mySBM_missSBM$loglik, mySBM_sbm$loglik), invokeRestart("muffle_cran_snapshot")}, skip = handle_skip, warning = handle_warning, message = handle_message, 0.01) error = handle_error, interrupt = handle_interrupt), error = handle_fatal), expect_lt(rmse(mySBM_missSBM$connectParam$mean, sampler_undirected_nocov$connectParam$mean), end_test = function() { 0.05) }) expect_gt(ARI(mySBM_missSBM$memberships, sampler_undirected_nocov$memberships),
0.95)40: })test_code(code = exprs, env = env, reporter = get_reporter() %||%
StopReporter$new())
30: 41: eval(code, test_env)
source_file(path, env = env(env), desc = desc, shuffle = shuffle, 31: error_call = error_call)eval(code, test_env)
42: 32: FUN(X[[i]], ...)withCallingHandlers({
eval(code, test_env)43: new_expectations <- the$test_expectations > starting_expectationslapply(test_paths, test_one_file, env = env, desc = desc, shuffle = shuffle, if (snapshot_skipped) { skip("On CRAN") } error_call = error_call)
else if (!new_expectations && skip_on_empty) {44: skip_empty()doTryCatch(return(expr), name, parentenv, handler) }
}, expectation = handle_expectation, packageNotFoundError = function(e) {45: if (on_cran()) {tryCatchOne(expr, names, parentenv, handlers[[1L]]) skip(paste0("{", e$package, "} is not installed."))
}46: }, snapshot_on_cran = function(cnd) { snapshot_skipped <<- TRUEtryCatchList(expr, classes, parentenv, handlers) invokeRestart("muffle_cran_snapshot")
}, skip = handle_skip, warning = handle_warning, message = handle_message, 47: error = handle_error, interrupt = handle_interrupt)
tryCatch(code, testthat_abort_reporter = function(cnd) {33: cat(conditionMessage(cnd), "\n")doTryCatch(return(expr), name, parentenv, handler) NULL
})34:
tryCatchOne(expr, names, parentenv, handlers[[1L]])48:
with_reporter(reporters$multi, lapply(test_paths, test_one_file, 35: env = env, desc = desc, shuffle = shuffle, error_call = error_call))tryCatchList(expr, classes, parentenv, handlers)
49: 36: test_files_serial(test_dir = test_dir, test_package = test_package, tryCatch(withCallingHandlers({ test_paths = test_paths, load_helpers = load_helpers, reporter = reporter, eval(code, test_env) env = env, stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning, new_expectations <- the$test_expectations > starting_expectations desc = desc, load_package = load_package, shuffle = shuffle, if (snapshot_skipped) { error_call = error_call) skip("On CRAN")
}50: else if (!new_expectations && skip_on_empty) {test_files(test_dir = path, test_paths = test_paths, test_package = package, skip_empty() reporter = reporter, load_helpers = load_helpers, env = env, } stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning, load_package = load_package, parallel = parallel, shuffle = shuffle)
}, expectation = handle_expectation, packageNotFoundError = function(e) {51: if (on_cran()) {test_dir("testthat", package = package, reporter = reporter, skip(paste0("{", e$package, "} is not installed.")) } ..., load_package = "installed")}, snapshot_on_cran = function(cnd) {
snapshot_skipped <<- TRUE52: invokeRestart("muffle_cran_snapshot")}, skip = handle_skip, warning = handle_warning, message = handle_message, test_check("missSBM") error = handle_error, interrupt = handle_interrupt), error = handle_fatal)
An irrecoverable exception occurred. R is aborting now ...
37: doWithOneRestart(return(expr), restart)
38: withOneRestart(expr, restarts[[1L]])
39: 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), end_test = function() { })
40: test_code(code = exprs, env = env, reporter = get_reporter() %||% StopReporter$new())
41: source_file(path, env = env(env), desc = desc, shuffle = shuffle, error_call = error_call)
42: FUN(X[[i]], ...)
43: lapply(test_paths, test_one_file, env = env, desc = desc, shuffle = shuffle, error_call = error_call)
44: doTryCatch(return(expr), name, parentenv, handler)
45: tryCatchOne(expr, names, parentenv, handlers[[1L]])
46: tryCatchList(expr, classes, parentenv, handlers)
47: tryCatch(code, testthat_abort_reporter = function(cnd) { cat(conditionMessage(cnd), "\n") NULL})
48: with_reporter(reporters$multi, lapply(test_paths, test_one_file, env = env, desc = desc, shuffle = shuffle, error_call = error_call))
49: test_files_serial(test_dir = test_dir, test_package = test_package, test_paths = test_paths, load_helpers = load_helpers, reporter = reporter, env = env, stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning, desc = desc, load_package = load_package, shuffle = shuffle, error_call = error_call)
50: test_files(test_dir = path, test_paths = test_paths, test_package = package, reporter = reporter, load_helpers = load_helpers, env = env, stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning, load_package = load_package, parallel = parallel, shuffle = shuffle)
51: test_dir("testthat", package = package, reporter = reporter, ..., load_package = "installed")
52: test_check("missSBM")
An irrecoverable exception occurred. R is aborting now ...
Saving _problems/test-sbm-bernoulli-without-covariate-16.R
*** caught segfault ***
address 0x110, cause 'invalid permissions'
*** caught segfault ***
address 0x110, cause 'invalid permissions'
Traceback:
1: dispatcher(membership_name, membership_init$to_cc(), model_name, .self$network_to_cc(), TRUE)
2: FUN(X[[i]], ...)
3: lapply(X = S, FUN = FUN, ...)
4: doTryCatch(return(expr), name, parentenv, handler)
5: tryCatchOne(expr, names, parentenv, handlers[[1L]])
6: tryCatchList(expr, classes, parentenv, handlers)
7: 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))})
8: try(lapply(X = S, FUN = FUN, ...), silent = TRUE)
9: sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE))
10: FUN(X[[i]], ...)
11: lapply(seq_len(cores), inner.do)
12: parallel::mclapply(X, FUN, ..., mc.cores = mc.cores, mc.set.seed = FALSE, mc.silent = TRUE)
13: parallel_lapply(inits, .self$do_one_estim, mc.cores = ncores, verbose = (verbosity > 4))
14: .self$do_with_inits(inits, Q, reinitialization_effort)
15: .self$estim_ascend(reinitialization_effort, changing_effort)
16: private$BMobject$estimate()
17: mySBM_sbm$optimize(estimOptions = list(verbosity = 0, plot = FALSE))
18: eval(code, test_env)
19: eval(code, test_env)
20: 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)
21: doTryCatch(return(expr), name, parentenv, handler)
22: tryCatchOne(expr, names, parentenv, handlers[[1L]])
23: tryCatchList(expr, classes, parentenv, handlers)
24: 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)
25: doWithOneRestart(return(expr), restart)
26: withOneRestart(expr, restarts[[1L]])
27: 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), end_test = function() { })
28: test_code(code, parent.frame())
29: test_that("SimpleSBM_fit 'Bernoulli' model, directed, no covariate", { sampler_directed_nocov$rNetwork(store = TRUE) mySBM_sbm <- sbm::SimpleSBM_fit$new(sampler_directed_nocov$networkData, "bernoulli", TRUE) mySBM_sbm$optimize(estimOptions = list(verbosity = 0, plot = FALSE)) mySBM_sbm$setModel(3) net <- missSBM:::partlyObservedNetwork$new(sampler_directed_nocov$networkData) cl <- net$clustering(3)[[1]] mySBM_missSBM <- missSBM:::SimpleSBM_fit_noCov$new(sampler_directed_nocov$networkData, clusterInit = cl) mySBM_missSBM$doVEM() expect_lt(rmse(mySBM_missSBM$connectParam$mean, mySBM_sbm$connectParam$mean), 0.1) expect_gt(ARI(mySBM_missSBM$memberships, mySBM_sbm$memberships), 0.95) expect_lt(rmse(mySBM_missSBM$loglik, mySBM_sbm$loglik), 0.01) expect_lt(rmse(mySBM_missSBM$connectParam$mean, sampler_directed_nocov$connectParam$mean), 0.1) expect_lt(rmse(mySBM_missSBM$covarParam, sampler_directed_cov$covarParam), 0.2) expect_gt(ARI(mySBM_missSBM$memberships, sampler_directed_nocov$memberships), 0.95) })
30: eval(code, test_env)
31: eval(code, test_env)
32: 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)
33: doTryCatch(return(expr), name, parentenv, handler)
34: tryCatchOne(expr, names, parentenv, handlers[[1L]])
35: tryCatchList(expr, classes, parentenv, handlers)
36: 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)
Traceback:
37: 1: dispatcher(membership_name, membership_init$to_cc(), model_name, doWithOneRestart(return(expr), restart) .self$network_to_cc(), TRUE)
38: withOneRestart(expr, restarts[[1L]]) 2:
FUN(X[[i]], ...)
39: 3: lapply(X = S, FUN = FUN, ...)withRestarts(tryCatch(withCallingHandlers({
4: eval(code, test_env)doTryCatch(return(expr), name, parentenv, handler) new_expectations <- the$test_expectations > starting_expectations
if (snapshot_skipped) { 5: skip("On CRAN")tryCatchOne(expr, names, parentenv, handlers[[1L]]) }
else if (!new_expectations && skip_on_empty) { 6: skip_empty()tryCatchList(expr, classes, parentenv, handlers) }
}, expectation = handle_expectation, packageNotFoundError = function(e) { 7: if (on_cran()) {tryCatch(expr, error = function(e) { skip(paste0("{", e$package, "} is not installed.")) call <- conditionCall(e) } if (!is.null(call)) { if (identical(call[[1L]], quote(doTryCatch))) }, snapshot_on_cran = function(cnd) { snapshot_skipped <<- TRUE invokeRestart("muffle_cran_snapshot") call <- sys.call(-4L)}, skip = handle_skip, warning = handle_warning, message = handle_message, dcall <- deparse(call, nlines = 1L) error = handle_error, interrupt = handle_interrupt), error = handle_fatal), prefix <- paste("Error in", dcall, ": ") end_test = function() { LONG <- 75L }) sm <- strsplit(conditionMessage(e), "\n")[[1L]]
w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w")40: if (is.na(w)) test_code(code = exprs, env = env, reporter = get_reporter() %||% w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L], StopReporter$new()) type = "b")
if (w > LONG) 41: prefix <- paste0(prefix, "\n ")source_file(path, env = env(env), desc = desc, shuffle = shuffle, } error_call = error_call) else prefix <- "Error : "
msg <- paste0(prefix, conditionMessage(e), "\n")42: .Internal(seterrmessage(msg[1L]))FUN(X[[i]], ...) if (!silent && isTRUE(getOption("show.error.messages"))) {
cat(msg, file = outFile)43: .Internal(printDeferredWarnings())lapply(test_paths, test_one_file, env = env, desc = desc, shuffle = shuffle, } error_call = error_call) invisible(structure(msg, class = "try-error", condition = e))
})44:
doTryCatch(return(expr), name, parentenv, handler) 8:
try(lapply(X = S, FUN = FUN, ...), silent = TRUE)
45: 9: tryCatchOne(expr, names, parentenv, handlers[[1L]])sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE))
46: 10: tryCatchList(expr, classes, parentenv, handlers)
47: FUN(X[[i]], ...)tryCatch(code, testthat_abort_reporter = function(cnd) { cat(conditionMessage(cnd), "\n")
NULL11: lapply(seq_len(cores), inner.do)})
12: 48: parallel::mclapply(X, FUN, ..., mc.cores = mc.cores, mc.set.seed = FALSE, mc.silent = TRUE)with_reporter(reporters$multi, lapply(test_paths, test_one_file,
env = env, desc = desc, shuffle = shuffle, error_call = error_call))
13: 49: parallel_lapply(inits, .self$do_one_estim, mc.cores = ncores, test_files_serial(test_dir = test_dir, test_package = test_package, verbose = (verbosity > 4)) test_paths = test_paths, load_helpers = load_helpers, reporter = reporter,
env = env, stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning, 14: desc = desc, load_package = load_package, shuffle = shuffle, .self$do_with_inits(inits, Q, reinitialization_effort) error_call = error_call)
15: .self$estim_ascend(reinitialization_effort, changing_effort)50:
test_files(test_dir = path, test_paths = test_paths, test_package = package, 16: reporter = reporter, load_helpers = load_helpers, env = env, private$BMobject$estimate() stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning,
load_package = load_package, parallel = parallel, shuffle = shuffle)17:
mySBM_sbm$optimize(estimOptions = list(verbosity = 0, plot = FALSE))51:
18: test_dir("testthat", package = package, reporter = reporter, eval(code, test_env) ..., load_package = "installed")
19: 52: eval(code, test_env)test_check("missSBM")
20: An irrecoverable exception occurred. R is aborting now ...
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)
21: doTryCatch(return(expr), name, parentenv, handler)
22: tryCatchOne(expr, names, parentenv, handlers[[1L]])
23: tryCatchList(expr, classes, parentenv, handlers)
24: 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)
25: doWithOneRestart(return(expr), restart)
26: withOneRestart(expr, restarts[[1L]])
27: 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), end_test = function() { })
28: test_code(code, parent.frame())
29: test_that("SimpleSBM_fit 'Bernoulli' model, directed, no covariate", { sampler_directed_nocov$rNetwork(store = TRUE) mySBM_sbm <- sbm::SimpleSBM_fit$new(sampler_directed_nocov$networkData, "bernoulli", TRUE) mySBM_sbm$optimize(estimOptions = list(verbosity = 0, plot = FALSE)) mySBM_sbm$setModel(3) net <- missSBM:::partlyObservedNetwork$new(sampler_directed_nocov$networkData) cl <- net$clustering(3)[[1]] mySBM_missSBM <- missSBM:::SimpleSBM_fit_noCov$new(sampler_directed_nocov$networkData, clusterInit = cl) mySBM_missSBM$doVEM() expect_lt(rmse(mySBM_missSBM$connectParam$mean, mySBM_sbm$connectParam$mean), 0.1) expect_gt(ARI(mySBM_missSBM$memberships, mySBM_sbm$memberships), 0.95) expect_lt(rmse(mySBM_missSBM$loglik, mySBM_sbm$loglik), 0.01) expect_lt(rmse(mySBM_missSBM$connectParam$mean, sampler_directed_nocov$connectParam$mean), 0.1) expect_lt(rmse(mySBM_missSBM$covarParam, sampler_directed_cov$covarParam), 0.2) expect_gt(ARI(mySBM_missSBM$memberships, sampler_directed_nocov$memberships), 0.95) })
30: eval(code, test_env)
31: eval(code, test_env)
32: 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)
33: doTryCatch(return(expr), name, parentenv, handler)
34: tryCatchOne(expr, names, parentenv, handlers[[1L]])
35: tryCatchList(expr, classes, parentenv, handlers)
36: 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)
37: doWithOneRestart(return(expr), restart)
38: withOneRestart(expr, restarts[[1L]])
39: 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), end_test = function() { })
40: test_code(code = exprs, env = env, reporter = get_reporter() %||% StopReporter$new())
41: source_file(path, env = env(env), desc = desc, shuffle = shuffle, error_call = error_call)
42: FUN(X[[i]], ...)
43: lapply(test_paths, test_one_file, env = env, desc = desc, shuffle = shuffle, error_call = error_call)
44: doTryCatch(return(expr), name, parentenv, handler)
45: tryCatchOne(expr, names, parentenv, handlers[[1L]])
46: tryCatchList(expr, classes, parentenv, handlers)
47: tryCatch(code, testthat_abort_reporter = function(cnd) { cat(conditionMessage(cnd), "\n") NULL})
48: with_reporter(reporters$multi, lapply(test_paths, test_one_file, env = env, desc = desc, shuffle = shuffle, error_call = error_call))
49: test_files_serial(test_dir = test_dir, test_package = test_package, test_paths = test_paths, load_helpers = load_helpers, reporter = reporter, env = env, stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning, desc = desc, load_package = load_package, shuffle = shuffle, error_call = error_call)
50: test_files(test_dir = path, test_paths = test_paths, test_package = package, reporter = reporter, load_helpers = load_helpers, env = env, stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning, load_package = load_package, parallel = parallel, shuffle = shuffle)
51: test_dir("testthat", package = package, reporter = reporter, ..., load_package = "installed")
52: test_check("missSBM")
An irrecoverable exception occurred. R is aborting now ...
Saving _problems/test-sbm-bernoulli-without-covariate-44.R
[ FAIL 4 | WARN 4 | SKIP 3 | PASS 531 ]
══ Skipped tests (3) ═══════════════════════════════════════════════════════════
• On CRAN (3): 'test-explore-block-count.R:4:3',
'test-missSBM_collection-degenerate.R:80:3',
'test-missSBM_collection-estimate_chain.R:64:3'
══ Failed tests ════════════════════════════════════════════════════════════════
── Error ('test-sbm-bernoulli-with-covariates.R:16:3'): SimpleSBM_fit 'Bernoulli' model, undirected, one covariate ──
Error: invalid assignment for reference class field 'Z', should be from class "matrix" or a subclass (was class "NULL")
Backtrace:
▆
1. ├─mySBM_sbm$optimize(estimOptions = list(verbosity = 0, plot = FALSE)) at test-sbm-bernoulli-with-covariates.R:16:3
2. │ └─private$BMobject$estimate()
3. │ └─.self$estim_ascend(reinitialization_effort, changing_effort)
4. │ └─.self$do_with_inits(inits, Q, reinitialization_effort)
5. │ └─base::sapply(...)
6. │ └─base::lapply(X = X, FUN = FUN, ...)
7. │ └─blockmodels (local) FUN(X[[i]], ...)
8. │ └─getRefClass(membership_name)(from_cc = r$membership)
9. │ └─methods::new(`<chr>`, ...)
10. │ ├─methods::initialize(value, ...)
11. │ └─methods::initialize(value, ...)
12. │ └─.Object$initialize(...)
13. └─blockmodels (local) `<dfltBndF>`(base::quote(NULL))
14. └─methods:::.setDummyField(...)
── Error ('test-sbm-bernoulli-with-covariates.R:46:3'): SimpleSBM_fit 'Bernoulli' model, directed, one covariate ──
Error: invalid assignment for reference class field 'Z', should be from class "matrix" or a subclass (was class "NULL")
Backtrace:
▆
1. ├─mySBM_sbm$optimize(estimOptions = list(verbosity = 0, plot = FALSE)) at test-sbm-bernoulli-with-covariates.R:46:3
2. │ └─private$BMobject$estimate()
3. │ └─.self$estim_ascend(reinitialization_effort, changing_effort)
4. │ └─.self$do_with_inits(inits, Q, reinitialization_effort)
5. │ └─base::sapply(...)
6. │ └─base::lapply(X = X, FUN = FUN, ...)
7. │ └─blockmodels (local) FUN(X[[i]], ...)
8. │ └─getRefClass(membership_name)(from_cc = r$membership)
9. │ └─methods::new(`<chr>`, ...)
10. │ ├─methods::initialize(value, ...)
11. │ └─methods::initialize(value, ...)
12. │ └─.Object$initialize(...)
13. └─blockmodels (local) `<dfltBndF>`(base::quote(NULL))
14. └─methods:::.setDummyField(...)
── Error ('test-sbm-bernoulli-without-covariate.R:16:3'): SimpleSBM_fit 'Bernoulli' model, undirected, no covariate ──
Error: invalid assignment for reference class field 'Z', should be from class "matrix" or a subclass (was class "NULL")
Backtrace:
▆
1. ├─mySBM_sbm$optimize(estimOptions = list(verbosity = 0, plot = FALSE)) at test-sbm-bernoulli-without-covariate.R:16:3
2. │ └─private$BMobject$estimate()
3. │ └─.self$estim_ascend(reinitialization_effort, changing_effort)
4. │ └─.self$do_with_inits(inits, Q, reinitialization_effort)
5. │ └─base::sapply(...)
6. │ └─base::lapply(X = X, FUN = FUN, ...)
7. │ └─blockmodels (local) FUN(X[[i]], ...)
8. │ └─getRefClass(membership_name)(from_cc = r$membership)
9. │ └─methods::new(`<chr>`, ...)
10. │ ├─methods::initialize(value, ...)
11. │ └─methods::initialize(value, ...)
12. │ └─.Object$initialize(...)
13. └─blockmodels (local) `<dfltBndF>`(base::quote(NULL))
14. └─methods:::.setDummyField(...)
── Error ('test-sbm-bernoulli-without-covariate.R:44:3'): SimpleSBM_fit 'Bernoulli' model, directed, no covariate ──
Error: invalid assignment for reference class field 'Z', should be from class "matrix" or a subclass (was class "NULL")
Backtrace:
▆
1. ├─mySBM_sbm$optimize(estimOptions = list(verbosity = 0, plot = FALSE)) at test-sbm-bernoulli-without-covariate.R:44:3
2. │ └─private$BMobject$estimate()
3. │ └─.self$estim_ascend(reinitialization_effort, changing_effort)
4. │ └─.self$do_with_inits(inits, Q, reinitialization_effort)
5. │ └─base::sapply(...)
6. │ └─base::lapply(X = X, FUN = FUN, ...)
7. │ └─blockmodels (local) FUN(X[[i]], ...)
8. │ └─getRefClass(membership_name)(from_cc = r$membership)
9. │ └─methods::new(`<chr>`, ...)
10. │ ├─methods::initialize(value, ...)
11. │ └─methods::initialize(value, ...)
12. │ └─.Object$initialize(...)
13. └─blockmodels (local) `<dfltBndF>`(base::quote(NULL))
14. └─methods:::.setDummyField(...)
[ FAIL 4 | WARN 4 | SKIP 3 | PASS 531 ]
Error:
! Test failures.
Execution halted
Flavor: r-oldrel-macos-arm64