Last updated on 2026-12-01 06:51:48 CET.
| Flavor | Version | Tinstall | Tcheck | Ttotal | Status | Flags |
|---|---|---|---|---|---|---|
| r-devel-linux-x86_64-debian-clang | 1.1.0 | 81.03 | 385.39 | 466.42 | OK | |
| r-devel-linux-x86_64-debian-gcc | 1.1.0 | 60.41 | 267.11 | 327.52 | OK | |
| r-devel-linux-x86_64-fedora-clang | 1.1.0 | 26.00 | 120.19 | 146.19 | OK | |
| r-devel-linux-x86_64-fedora-gcc | 1.1.0 | 32.00 | 124.62 | 156.62 | OK | |
| r-devel-windows-x86_64 | 1.1.0 | 90.00 | 451.00 | 541.00 | OK | |
| r-patched-linux-x86_64 | 1.1.0 | 86.19 | 371.52 | 457.71 | OK | |
| r-release-linux-x86_64 | 1.1.0 | 81.53 | 372.00 | 453.53 | 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 | 90.00 | 387.00 | 477.00 | OK | |
| r-oldrel-macos-arm64 | 1.1.0 | 19.00 | 87.00 | 106.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 | 113.00 | 538.00 | 651.00 | OK |
Version: 1.1.0
Check: tests
Result: ERROR
Running ‘spelling.R’ [0s/0s]
Running ‘testthat.R’ [38s/30s]
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: 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]], ...)
Traceback:
11: 1: lapply(seq_len(cores), inner.do)dispatcher(membership_name, membership_init$to_cc(), model_name,
.self$network_to_cc(), TRUE)12:
2: parallel::mclapply(X, FUN, ..., mc.cores = mc.cores, mc.set.seed = FALSE, mc.silent = TRUE)FUN(X[[i]], ...)
13: 3: parallel_lapply(inits, .self$do_one_estim, mc.cores = ncores, lapply(X = S, FUN = FUN, ...) verbose = (verbosity > 4))
4: 14: doTryCatch(return(expr), name, parentenv, handler).self$do_with_inits(inits, Q, reinitialization_effort)
5: 15: tryCatchOne(expr, names, parentenv, handlers[[1L]]).self$estim_ascend(reinitialization_effort, changing_effort)
6: 16: tryCatchList(expr, classes, parentenv, handlers)private$BMobject$estimate()
7: 17: tryCatch(expr, error = function(e) {mySBM_sbm$optimize(estimOptions = list(verbosity = 0, plot = FALSE)) call <- conditionCall(e)
if (!is.null(call)) {18: if (identical(call[[1L]], quote(doTryCatch))) eval(code, test_env) call <- sys.call(-4L)
dcall <- deparse(call, nlines = 1L)19: prefix <- paste("Error in", dcall, ": ")eval(code, test_env) LONG <- 75L
sm <- strsplit(conditionMessage(e), "\n")[[1L]]20: w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w")withCallingHandlers({ if (is.na(w)) eval(code, test_env) w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L], new_expectations <- the$test_expectations > starting_expectations if (snapshot_skipped) { type = "b") skip("On CRAN") if (w > LONG) } prefix <- paste0(prefix, "\n ") else if (!new_expectations && skip_on_empty) { } skip_empty() else prefix <- "Error : " } msg <- paste0(prefix, conditionMessage(e), "\n")}, expectation = handle_expectation, packageNotFoundError = function(e) { .Internal(seterrmessage(msg[1L])) if (on_cran()) { if (!silent && isTRUE(getOption("show.error.messages"))) { skip(paste0("{", e$package, "} is not installed.")) cat(msg, file = outFile) }}, snapshot_on_cran = function(cnd) { .Internal(printDeferredWarnings()) } snapshot_skipped <<- TRUE invisible(structure(msg, class = "try-error", condition = e)) invokeRestart("muffle_cran_snapshot")})}, skip = handle_skip, warning = handle_warning, message = handle_message,
error = handle_error, interrupt = handle_interrupt) 8:
try(lapply(X = S, FUN = FUN, ...), silent = TRUE)
21: 9: doTryCatch(return(expr), name, parentenv, handler)sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE))
22: 10: tryCatchOne(expr, names, parentenv, handlers[[1L]])FUN(X[[i]], ...)
23: 11: tryCatchList(expr, classes, parentenv, handlers)lapply(seq_len(cores), inner.do)
24: 12: tryCatch(withCallingHandlers({parallel::mclapply(X, FUN, ..., mc.cores = mc.cores, mc.set.seed = FALSE, eval(code, test_env) mc.silent = TRUE) new_expectations <- the$test_expectations > starting_expectations
if (snapshot_skipped) {13: skip("On CRAN")parallel_lapply(inits, .self$do_one_estim, mc.cores = ncores, } verbose = (verbosity > 4)) else if (!new_expectations && skip_on_empty) {
skip_empty()14: }.self$do_with_inits(inits, Q, reinitialization_effort)}, expectation = handle_expectation, packageNotFoundError = function(e) {
if (on_cran()) {15: skip(paste0("{", e$package, "} is not installed.")).self$estim_ascend(reinitialization_effort, changing_effort) }
16: private$BMobject$estimate()}, snapshot_on_cran = function(cnd) {
snapshot_skipped <<- TRUE17: mySBM_sbm$optimize(estimOptions = list(verbosity = 0, plot = FALSE)) invokeRestart("muffle_cran_snapshot")
}, skip = handle_skip, warning = handle_warning, message = handle_message, 18: eval(code, test_env) error = handle_error, interrupt = handle_interrupt), error = handle_fatal)
19: 25: eval(code, test_env)doWithOneRestart(return(expr), restart)
20: 26: withCallingHandlers({ eval(code, test_env)withOneRestart(expr, restarts[[1L]]) new_expectations <- the$test_expectations > starting_expectations
if (snapshot_skipped) {27: skip("On CRAN")withRestarts(tryCatch(withCallingHandlers({ } eval(code, test_env) else if (!new_expectations && skip_on_empty) { new_expectations <- the$test_expectations > starting_expectations skip_empty() if (snapshot_skipped) { } skip("On CRAN")}, expectation = handle_expectation, packageNotFoundError = function(e) { } if (on_cran()) { else if (!new_expectations && skip_on_empty) { skip(paste0("{", e$package, "} is not installed.")) skip_empty() } }}, snapshot_on_cran = function(cnd) {}, expectation = handle_expectation, packageNotFoundError = function(e) { snapshot_skipped <<- TRUE if (on_cran()) { invokeRestart("muffle_cran_snapshot") skip(paste0("{", e$package, "} is not installed."))}, skip = handle_skip, warning = handle_warning, message = handle_message, } error = handle_error, interrupt = handle_interrupt)}, snapshot_on_cran = function(cnd) {
snapshot_skipped <<- TRUE21: invokeRestart("muffle_cran_snapshot")doTryCatch(return(expr), name, parentenv, handler)}, skip = handle_skip, warning = handle_warning, message = handle_message,
error = handle_error, interrupt = handle_interrupt), error = handle_fatal), 22: end_test = function() {tryCatchOne(expr, names, parentenv, handlers[[1L]]) })
23: 28: tryCatchList(expr, classes, parentenv, handlers)test_code(code, parent.frame())
24: 29: tryCatch(withCallingHandlers({test_that("SimpleSBM_fit 'Bernoulli' model, undirected, one covariate", eval(code, test_env) { new_expectations <- the$test_expectations > starting_expectations sampler_undirected_cov$rNetwork(store = TRUE) if (snapshot_skipped) { mySBM_sbm <- sbm::SimpleSBM_fit$new(sampler_undirected_cov$networkData, skip("On CRAN") "bernoulli", FALSE, covarList = covarList_undirected) } mySBM_sbm$optimize(estimOptions = list(verbosity = 0, else if (!new_expectations && skip_on_empty) { plot = FALSE)) skip_empty() mySBM_sbm$setModel(Q) } net <- missSBM:::partlyObservedNetwork$new(sampler_undirected_cov$networkData, }, expectation = handle_expectation, packageNotFoundError = function(e) { covariates = covarList_undirected) cls <- net$clustering(1:(2 * Q)) if (on_cran()) { cl <- cls[[Q]] skip(paste0("{", e$package, "} is not installed.")) mySBM_missSBM <- missSBM:::SimpleSBM_fit_withCov$new(net, } clusterInit = cl, covarList = covarList_undirected)}, snapshot_on_cran = function(cnd) { mySBM_missSBM$doVEM() snapshot_skipped <<- TRUE expect_lt(rmse(mySBM_missSBM$connectParam$mean, mySBM_sbm$connectParam$mean), invokeRestart("muffle_cran_snapshot") 0.05)}, skip = handle_skip, warning = handle_warning, message = handle_message, expect_gt(ARI(mySBM_missSBM$memberships, mySBM_sbm$memberships), error = handle_error, interrupt = handle_interrupt), error = handle_fatal) 0.8)
expect_lt(rmse(mySBM_missSBM$loglik, mySBM_sbm$loglik), 25: 0.01)doWithOneRestart(return(expr), restart) expect_lt(rmse(mySBM_missSBM$connectParam$mean, sampler_undirected_cov$connectParam$mean),
0.1)26: expect_lt(rmse(mySBM_missSBM$covarParam, sampler_undirected_cov$covarParam), 0.1)withOneRestart(expr, restarts[[1L]]) expect_gt(ARI(mySBM_missSBM$memberships, sampler_undirected_cov$memberships),
0.85)27: })withRestarts(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) {32: skip_empty()withCallingHandlers({ } eval(code, test_env)}, expectation = handle_expectation, packageNotFoundError = function(e) { 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) { else if (!new_expectations && skip_on_empty) { snapshot_skipped <<- TRUE skip_empty() invokeRestart("muffle_cran_snapshot") }}, skip = handle_skip, warning = handle_warning, message = handle_message, }, expectation = handle_expectation, packageNotFoundError = function(e) { error = handle_error, interrupt = handle_interrupt), error = handle_fatal), if (on_cran()) { end_test = function() { skip(paste0("{", e$package, "} is not installed.")) }) }
}, snapshot_on_cran = function(cnd) {28: snapshot_skipped <<- TRUEtest_code(code, parent.frame())
invokeRestart("muffle_cran_snapshot")29: }, skip = handle_skip, warning = handle_warning, message = handle_message, test_that("SimpleSBM_fit 'Bernoulli' model, undirected, one covariate", error = handle_error, interrupt = handle_interrupt) {
sampler_undirected_cov$rNetwork(store = TRUE)33: mySBM_sbm <- sbm::SimpleSBM_fit$new(sampler_undirected_cov$networkData, doTryCatch(return(expr), name, parentenv, handler) "bernoulli", FALSE, covarList = covarList_undirected)
mySBM_sbm$optimize(estimOptions = list(verbosity = 0, 34: plot = FALSE))tryCatchOne(expr, names, parentenv, handlers[[1L]]) mySBM_sbm$setModel(Q)
net <- missSBM:::partlyObservedNetwork$new(sampler_undirected_cov$networkData, 35: covariates = covarList_undirected)tryCatchList(expr, classes, parentenv, handlers) cls <- net$clustering(1:(2 * Q))
cl <- cls[[Q]]36: mySBM_missSBM <- missSBM:::SimpleSBM_fit_withCov$new(net, tryCatch(withCallingHandlers({ clusterInit = cl, covarList = covarList_undirected) eval(code, test_env) mySBM_missSBM$doVEM() new_expectations <- the$test_expectations > starting_expectations expect_lt(rmse(mySBM_missSBM$connectParam$mean, mySBM_sbm$connectParam$mean), if (snapshot_skipped) { 0.05) skip("On CRAN") expect_gt(ARI(mySBM_missSBM$memberships, mySBM_sbm$memberships), } 0.8) else if (!new_expectations && skip_on_empty) { expect_lt(rmse(mySBM_missSBM$loglik, mySBM_sbm$loglik), skip_empty() 0.01) } expect_lt(rmse(mySBM_missSBM$connectParam$mean, sampler_undirected_cov$connectParam$mean), }, expectation = handle_expectation, packageNotFoundError = function(e) { 0.1) if (on_cran()) { expect_lt(rmse(mySBM_missSBM$covarParam, sampler_undirected_cov$covarParam), skip(paste0("{", e$package, "} is not installed.")) 0.1) } expect_gt(ARI(mySBM_missSBM$memberships, sampler_undirected_cov$memberships), }, snapshot_on_cran = function(cnd) { 0.85) snapshot_skipped <<- TRUE }) invokeRestart("muffle_cran_snapshot")
}, skip = handle_skip, warning = handle_warning, message = handle_message, 30: error = handle_error, interrupt = handle_interrupt), error = handle_fatal)eval(code, test_env)
37: 31: eval(code, test_env)
doWithOneRestart(return(expr), restart)32:
withCallingHandlers({38: eval(code, test_env)withOneRestart(expr, restarts[[1L]])
new_expectations <- the$test_expectations > starting_expectations39: if (snapshot_skipped) { skip("On CRAN")withRestarts(tryCatch(withCallingHandlers({ } eval(code, test_env) else if (!new_expectations && skip_on_empty) { new_expectations <- the$test_expectations > starting_expectations if (snapshot_skipped) { skip_empty() skip("On CRAN") } } else if (!new_expectations && skip_on_empty) {}, expectation = handle_expectation, packageNotFoundError = function(e) { if (on_cran()) { skip_empty() skip(paste0("{", e$package, "} is not installed.")) } }}, snapshot_on_cran = function(cnd) {}, expectation = handle_expectation, packageNotFoundError = function(e) { snapshot_skipped <<- TRUE if (on_cran()) { invokeRestart("muffle_cran_snapshot") skip(paste0("{", e$package, "} is not installed."))}, skip = handle_skip, warning = handle_warning, message = handle_message, 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), error = handle_fatal), end_test = function() {tryCatchOne(expr, names, parentenv, handlers[[1L]]) })
35: 40: tryCatchList(expr, classes, parentenv, handlers)test_code(code = exprs, env = env, reporter = get_reporter() %||%
36: StopReporter$new())tryCatch(withCallingHandlers({
eval(code, test_env)41: new_expectations <- the$test_expectations > starting_expectationssource_file(path, env = env(env), desc = desc, shuffle = shuffle, if (snapshot_skipped) { skip("On CRAN") error_call = error_call) }
42: else if (!new_expectations && skip_on_empty) {FUN(X[[i]], ...) skip_empty()
}43: lapply(test_paths, test_one_file, env = env, desc = desc, shuffle = shuffle, }, expectation = handle_expectation, packageNotFoundError = function(e) { error_call = error_call) if (on_cran()) {
44: doTryCatch(return(expr), name, parentenv, handler)
skip(paste0("{", e$package, "} is not installed."))45: }tryCatchOne(expr, names, parentenv, handlers[[1L]])}, snapshot_on_cran = function(cnd) {
snapshot_skipped <<- TRUE46: invokeRestart("muffle_cran_snapshot")}, skip = handle_skip, warning = handle_warning, message = handle_message, tryCatchList(expr, classes, parentenv, handlers) error = handle_error, interrupt = handle_interrupt), error = handle_fatal)
37: 47: tryCatch(code, testthat_abort_reporter = function(cnd) {doWithOneRestart(return(expr), restart) cat(conditionMessage(cnd), "\n")
NULL38: })withOneRestart(expr, restarts[[1L]])
48: 39: with_reporter(reporters$multi, lapply(test_paths, test_one_file, withRestarts(tryCatch(withCallingHandlers({ env = env, desc = desc, shuffle = shuffle, error_call = error_call)) eval(code, test_env) new_expectations <- the$test_expectations > starting_expectations
if (snapshot_skipped) { skip("On CRAN")49: } else if (!new_expectations && skip_on_empty) { skip_empty()test_files_serial(test_dir = test_dir, test_package = test_package, }}, expectation = handle_expectation, packageNotFoundError = function(e) { 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, }}, snapshot_on_cran = function(cnd) { desc = desc, load_package = load_package, shuffle = shuffle, snapshot_skipped <<- TRUE error_call = error_call) invokeRestart("muffle_cran_snapshot")}, skip = handle_skip, warning = handle_warning, message = handle_message,
50: error = handle_error, interrupt = handle_interrupt), error = handle_fatal), test_files(test_dir = path, test_paths = test_paths, test_package = package, end_test = function() { 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: 40: test_dir("testthat", package = package, reporter = reporter, test_code(code = exprs, env = env, reporter = get_reporter() %||% ..., load_package = "installed") StopReporter$new())
52: 41: test_check("missSBM")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-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)
Traceback:
26: 1: withOneRestart(expr, restarts[[1L]])dispatcher(membership_name, membership_init$to_cc(), model_name,
.self$network_to_cc(), TRUE)27:
withRestarts(tryCatch(withCallingHandlers({ 2: eval(code, test_env)FUN(X[[i]], ...) new_expectations <- the$test_expectations > starting_expectations
if (snapshot_skipped) { 3: skip("On CRAN")lapply(X = S, FUN = FUN, ...) }
else if (!new_expectations && skip_on_empty) { 4: skip_empty()doTryCatch(return(expr), name, parentenv, handler) }
}, expectation = handle_expectation, packageNotFoundError = function(e) { 5: if (on_cran()) {tryCatchOne(expr, names, parentenv, handlers[[1L]]) skip(paste0("{", e$package, "} is not installed."))
} 6: }, snapshot_on_cran = function(cnd) {tryCatchList(expr, classes, parentenv, handlers) snapshot_skipped <<- TRUE
invokeRestart("muffle_cran_snapshot") 7: }, skip = handle_skip, warning = handle_warning, message = handle_message, tryCatch(expr, error = function(e) { error = handle_error, interrupt = handle_interrupt), error = handle_fatal), call <- conditionCall(e) end_test = function() { if (!is.null(call)) { }) if (identical(call[[1L]], quote(doTryCatch)))
call <- sys.call(-4L)28: test_code(code, parent.frame()) dcall <- deparse(call, nlines = 1L)
prefix <- paste("Error in", dcall, ": ")29: LONG <- 75Ltest_that("SimpleSBM_fit 'Bernoulli' model, directed, one covariate", sm <- strsplit(conditionMessage(e), "\n")[[1L]] { w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w") sampler_directed_cov$rNetwork(store = TRUE) if (is.na(w)) mySBM_sbm <- sbm::SimpleSBM_fit$new(sampler_directed_cov$networkData, w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L], "bernoulli", TRUE, covarList = covarList_directed) type = "b") mySBM_sbm$optimize(estimOptions = list(verbosity = 0, if (w > LONG) plot = FALSE)) prefix <- paste0(prefix, "\n ") mySBM_sbm$setModel(Q) } net <- missSBM:::partlyObservedNetwork$new(sampler_directed_cov$networkData, else prefix <- "Error : " covariates = covarList_directed) msg <- paste0(prefix, conditionMessage(e), "\n") cls <- net$clustering(1:(2 * Q)) .Internal(seterrmessage(msg[1L])) cl <- cls[[Q]] if (!silent && isTRUE(getOption("show.error.messages"))) { mySBM_missSBM <- missSBM:::SimpleSBM_fit_withCov$new(net, cat(msg, file = outFile) clusterInit = cl, covarList = covarList_directed) .Internal(printDeferredWarnings()) mySBM_missSBM$doVEM(trace = TRUE) } expect_lt(rmse(mySBM_missSBM$connectParam$mean, mySBM_sbm$connectParam$mean), invisible(structure(msg, class = "try-error", condition = e)) 0.1)}) expect_gt(ARI(mySBM_missSBM$memberships, mySBM_sbm$memberships),
0.8) 8: expect_lt(rmse(mySBM_missSBM$loglik, mySBM_sbm$loglik), try(lapply(X = S, FUN = FUN, ...), silent = TRUE) 0.05) expect_lt(rmse(mySBM_missSBM$connectParam$mean, sampler_directed_cov$connectParam$mean),
0.1) 9: expect_gt(ARI(mySBM_missSBM$memberships, sampler_directed_cov$memberships), sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE)) 0.85)
})
10: 30: FUN(X[[i]], ...)eval(code, test_env)
11: 31: lapply(seq_len(cores), inner.do)eval(code, test_env)
12: 32: parallel::mclapply(X, FUN, ..., mc.cores = mc.cores, mc.set.seed = FALSE, withCallingHandlers({ mc.silent = TRUE) eval(code, test_env)
new_expectations <- the$test_expectations > starting_expectations13: if (snapshot_skipped) {parallel_lapply(inits, .self$do_one_estim, mc.cores = ncores, skip("On CRAN") verbose = (verbosity > 4)) }
else if (!new_expectations && skip_on_empty) {14: skip_empty().self$do_with_inits(inits, Q, reinitialization_effort) }}, expectation = handle_expectation, packageNotFoundError = function(e) {
if (on_cran()) {15: skip(paste0("{", e$package, "} is not installed.")).self$estim_ascend(reinitialization_effort, changing_effort)
}16: private$BMobject$estimate()}, snapshot_on_cran = function(cnd) {
snapshot_skipped <<- TRUE17: invokeRestart("muffle_cran_snapshot")mySBM_sbm$optimize(estimOptions = list(verbosity = 0, plot = FALSE))}, skip = handle_skip, warning = handle_warning, message = handle_message,
error = handle_error, interrupt = handle_interrupt)
18: 33: eval(code, test_env)
doTryCatch(return(expr), name, parentenv, handler)19:
eval(code, test_env)34:
tryCatchOne(expr, names, parentenv, handlers[[1L]])20:
withCallingHandlers({35: eval(code, test_env) new_expectations <- the$test_expectations > starting_expectationstryCatchList(expr, classes, parentenv, handlers) if (snapshot_skipped) {
skip("On CRAN")36: }tryCatch(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 } 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) skip(paste0("{", e$package, "} is not installed.")) }
21: }, snapshot_on_cran = function(cnd) {doTryCatch(return(expr), name, parentenv, handler) snapshot_skipped <<- TRUE
invokeRestart("muffle_cran_snapshot")22: }, skip = handle_skip, warning = handle_warning, message = handle_message, tryCatchOne(expr, names, parentenv, handlers[[1L]]) error = handle_error, interrupt = handle_interrupt), error = handle_fatal)
23: 37: tryCatchList(expr, classes, parentenv, handlers)doWithOneRestart(return(expr), restart)
24: 38: tryCatch(withCallingHandlers({withOneRestart(expr, restarts[[1L]]) eval(code, test_env) new_expectations <- the$test_expectations > starting_expectations
if (snapshot_skipped) {39: skip("On CRAN")withRestarts(tryCatch(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), error = handle_fatal) }
}, snapshot_on_cran = function(cnd) {25: snapshot_skipped <<- TRUEdoWithOneRestart(return(expr), restart) invokeRestart("muffle_cran_snapshot")
26: }, skip = handle_skip, warning = handle_warning, message = handle_message, withOneRestart(expr, restarts[[1L]]) error = handle_error, interrupt = handle_interrupt), error = handle_fatal),
27: end_test = function() {withRestarts(tryCatch(withCallingHandlers({ }) eval(code, test_env)
40: new_expectations <- the$test_expectations > starting_expectationstest_code(code = exprs, env = env, reporter = get_reporter() %||% if (snapshot_skipped) { StopReporter$new()) skip("On CRAN")
}41: else if (!new_expectations && skip_on_empty) {source_file(path, env = env(env), desc = desc, shuffle = shuffle, skip_empty() } error_call = error_call)}, expectation = handle_expectation, packageNotFoundError = function(e) {
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")}, skip = handle_skip, warning = handle_warning, message = handle_message, lapply(test_paths, test_one_file, env = env, desc = desc, shuffle = shuffle, error = handle_error, interrupt = handle_interrupt), error = handle_fatal), error_call = error_call) end_test = function() {
})44:
doTryCatch(return(expr), name, parentenv, handler)28:
test_code(code, parent.frame())45: tryCatchOne(expr, names, parentenv, handlers[[1L]])
29: 46: test_that("SimpleSBM_fit 'Bernoulli' model, directed, one covariate", tryCatchList(expr, classes, parentenv, handlers) {
sampler_directed_cov$rNetwork(store = TRUE)47: mySBM_sbm <- sbm::SimpleSBM_fit$new(sampler_directed_cov$networkData, tryCatch(code, testthat_abort_reporter = function(cnd) { cat(conditionMessage(cnd), "\n") "bernoulli", TRUE, covarList = covarList_directed) NULL mySBM_sbm$optimize(estimOptions = list(verbosity = 0, }) plot = FALSE))
mySBM_sbm$setModel(Q)48: net <- missSBM:::partlyObservedNetwork$new(sampler_directed_cov$networkData, with_reporter(reporters$multi, lapply(test_paths, test_one_file, covariates = covarList_directed) env = env, desc = desc, shuffle = shuffle, error_call = error_call)) cls <- net$clustering(1:(2 * Q))
49: cl <- cls[[Q]]test_files_serial(test_dir = test_dir, test_package = test_package, test_paths = test_paths, load_helpers = load_helpers, reporter = reporter, mySBM_missSBM <- missSBM:::SimpleSBM_fit_withCov$new(net, env = env, stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning, desc = desc, load_package = load_package, shuffle = shuffle, clusterInit = cl, covarList = covarList_directed) error_call = error_call) mySBM_missSBM$doVEM(trace = TRUE)
expect_lt(rmse(mySBM_missSBM$connectParam$mean, mySBM_sbm$connectParam$mean), 50: 0.1)test_files(test_dir = path, test_paths = test_paths, test_package = package, expect_gt(ARI(mySBM_missSBM$memberships, mySBM_sbm$memberships), reporter = reporter, load_helpers = load_helpers, env = env, 0.8) stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning, expect_lt(rmse(mySBM_missSBM$loglik, mySBM_sbm$loglik), load_package = load_package, parallel = parallel, shuffle = shuffle) 0.05)
expect_lt(rmse(mySBM_missSBM$connectParam$mean, sampler_directed_cov$connectParam$mean), 51: 0.1)test_dir("testthat", package = package, reporter = reporter, expect_gt(ARI(mySBM_missSBM$memberships, sampler_directed_cov$memberships), ..., load_package = "installed")
0.85) })52:
test_check("missSBM")30:
eval(code, test_env)An irrecoverable exception occurred. R is aborting now ...
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-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)
Traceback:
1: 5: dispatcher(membership_name, membership_init$to_cc(), model_name, tryCatchOne(expr, names, parentenv, handlers[[1L]]) .self$network_to_cc(), TRUE)
6: 2: tryCatchList(expr, classes, parentenv, handlers)FUN(X[[i]], ...)
7: tryCatch(expr, error = function(e) { 3: call <- conditionCall(e)lapply(X = S, FUN = FUN, ...) if (!is.null(call)) { if (identical(call[[1L]], quote(doTryCatch)))
call <- sys.call(-4L) 4: dcall <- deparse(call, nlines = 1L)doTryCatch(return(expr), name, parentenv, handler) prefix <- paste("Error in", dcall, ": ")
LONG <- 75L sm <- strsplit(conditionMessage(e), "\n")[[1L]] 5: w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w")tryCatchOne(expr, names, parentenv, handlers[[1L]]) if (is.na(w))
w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L], 6: type = "b")tryCatchList(expr, classes, parentenv, handlers) if (w > LONG)
prefix <- paste0(prefix, "\n ") 7: }tryCatch(expr, error = function(e) { else prefix <- "Error : " call <- conditionCall(e) msg <- paste0(prefix, conditionMessage(e), "\n") if (!is.null(call)) { .Internal(seterrmessage(msg[1L])) if (identical(call[[1L]], quote(doTryCatch))) if (!silent && isTRUE(getOption("show.error.messages"))) { cat(msg, file = outFile) call <- sys.call(-4L) .Internal(printDeferredWarnings()) dcall <- deparse(call, nlines = 1L) } prefix <- paste("Error in", dcall, ": ") invisible(structure(msg, class = "try-error", condition = e)) LONG <- 75L}) sm <- strsplit(conditionMessage(e), "\n")[[1L]]
8: w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w")try(lapply(X = S, FUN = FUN, ...), silent = TRUE) if (is.na(w))
w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L], 9: type = "b")sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE)) if (w > LONG)
prefix <- paste0(prefix, "\n ") }10: else prefix <- "Error : "FUN(X[[i]], ...) msg <- paste0(prefix, conditionMessage(e), "\n")
.Internal(seterrmessage(msg[1L]))11: if (!silent && isTRUE(getOption("show.error.messages"))) {lapply(seq_len(cores), inner.do) cat(msg, file = outFile)
.Internal(printDeferredWarnings())12: }parallel::mclapply(X, FUN, ..., mc.cores = mc.cores, mc.set.seed = FALSE, mc.silent = TRUE) invisible(structure(msg, class = "try-error", condition = e))
13: })parallel_lapply(inits, .self$do_one_estim, mc.cores = ncores,
verbose = (verbosity > 4)) 8:
try(lapply(X = S, FUN = FUN, ...), silent = TRUE)14:
.self$do_with_inits(inits, Q, reinitialization_effort) 9:
sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE))
15: 10: .self$estim_ascend(reinitialization_effort, changing_effort)FUN(X[[i]], ...)
16: 11: private$BMobject$estimate()lapply(seq_len(cores), inner.do)
17: 12: mySBM_sbm$optimize(estimOptions = list(verbosity = 0, plot = FALSE))parallel::mclapply(X, FUN, ..., mc.cores = mc.cores, mc.set.seed = FALSE,
mc.silent = TRUE)18:
eval(code, test_env)13:
parallel_lapply(inits, .self$do_one_estim, mc.cores = ncores, 19: verbose = (verbosity > 4))eval(code, test_env)
14: 20: .self$do_with_inits(inits, Q, reinitialization_effort)withCallingHandlers({
eval(code, test_env)15: new_expectations <- the$test_expectations > starting_expectations.self$estim_ascend(reinitialization_effort, changing_effort) if (snapshot_skipped) {
skip("On CRAN")16: }private$BMobject$estimate() else if (!new_expectations && skip_on_empty) {
skip_empty()17: }mySBM_sbm$optimize(estimOptions = list(verbosity = 0, plot = FALSE))
}, expectation = handle_expectation, packageNotFoundError = function(e) {18: if (on_cran()) {eval(code, test_env) skip(paste0("{", e$package, "} is not installed.")) }
}, snapshot_on_cran = function(cnd) {19: snapshot_skipped <<- TRUEeval(code, test_env) invokeRestart("muffle_cran_snapshot")
}, skip = handle_skip, warning = handle_warning, message = handle_message, 20: error = handle_error, interrupt = handle_interrupt)withCallingHandlers({
eval(code, test_env)21: doTryCatch(return(expr), name, parentenv, handler) new_expectations <- the$test_expectations > starting_expectations
if (snapshot_skipped) {22: skip("On CRAN")tryCatchOne(expr, names, parentenv, handlers[[1L]]) }
else if (!new_expectations && skip_on_empty) {23: skip_empty()tryCatchList(expr, classes, parentenv, handlers) }
}, expectation = handle_expectation, packageNotFoundError = function(e) {24: if (on_cran()) {tryCatch(withCallingHandlers({ skip(paste0("{", e$package, "} is not installed.")) eval(code, test_env) } new_expectations <- the$test_expectations > starting_expectations}, snapshot_on_cran = function(cnd) { if (snapshot_skipped) { snapshot_skipped <<- TRUE skip("On CRAN") invokeRestart("muffle_cran_snapshot") }}, skip = handle_skip, warning = handle_warning, message = handle_message, else if (!new_expectations && skip_on_empty) { error = handle_error, interrupt = handle_interrupt) 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 <<- TRUE23: invokeRestart("muffle_cran_snapshot")tryCatchList(expr, classes, parentenv, handlers)}, skip = handle_skip, warning = handle_warning, message = handle_message,
error = handle_error, interrupt = handle_interrupt), error = handle_fatal)
24: 25: tryCatch(withCallingHandlers({doWithOneRestart(return(expr), restart) eval(code, test_env)
new_expectations <- the$test_expectations > starting_expectations26: if (snapshot_skipped) {withOneRestart(expr, restarts[[1L]]) skip("On CRAN")
}27: withRestarts(tryCatch(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) {}, expectation = handle_expectation, packageNotFoundError = function(e) { snapshot_skipped <<- TRUE if (on_cran()) { invokeRestart("muffle_cran_snapshot")}, skip = handle_skip, warning = handle_warning, message = handle_message, skip(paste0("{", e$package, "} is not installed.")) error = handle_error, interrupt = handle_interrupt), error = handle_fatal) }
}, snapshot_on_cran = function(cnd) {25: snapshot_skipped <<- TRUEdoWithOneRestart(return(expr), restart) invokeRestart("muffle_cran_snapshot")
}, skip = handle_skip, warning = handle_warning, message = handle_message, 26: error = handle_error, interrupt = handle_interrupt), error = handle_fatal), withOneRestart(expr, restarts[[1L]]) end_test = function() {
})
27: 28: withRestarts(tryCatch(withCallingHandlers({test_code(code, parent.frame()) eval(code, test_env)
new_expectations <- the$test_expectations > starting_expectations29: test_that("SimpleSBM_fit 'Bernoulli' model, undirected, no covariate", if (snapshot_skipped) { { skip("On CRAN") sampler_undirected_nocov$rNetwork(store = TRUE) } mySBM_sbm <- sbm::SimpleSBM_fit$new(sampler_undirected_nocov$networkData, else if (!new_expectations && skip_on_empty) { "bernoulli", FALSE) mySBM_sbm$optimize(estimOptions = list(verbosity = 0, skip_empty() plot = FALSE)) } mySBM_sbm$setModel(3)}, expectation = handle_expectation, packageNotFoundError = function(e) { net <- missSBM:::partlyObservedNetwork$new(sampler_undirected_nocov$networkData) if (on_cran()) { cl <- net$clustering(3)[[1]] skip(paste0("{", e$package, "} is not installed.")) mySBM_missSBM <- missSBM:::SimpleSBM_fit_noCov$new(net, } clusterInit = cl)}, snapshot_on_cran = function(cnd) { mySBM_missSBM$doVEM() snapshot_skipped <<- TRUE expect_lt(rmse(mySBM_missSBM$connectParam$mean, mySBM_sbm$connectParam$mean), invokeRestart("muffle_cran_snapshot") 0.05)}, skip = handle_skip, warning = handle_warning, message = handle_message, expect_gt(ARI(mySBM_missSBM$memberships, mySBM_sbm$memberships), error = handle_error, interrupt = handle_interrupt), error = handle_fatal), 0.95) end_test = function() { expect_lt(rmse(mySBM_missSBM$loglik, mySBM_sbm$loglik), }) 0.01)
expect_lt(rmse(mySBM_missSBM$connectParam$mean, sampler_undirected_nocov$connectParam$mean), 28: 0.05)test_code(code, parent.frame()) expect_gt(ARI(mySBM_missSBM$memberships, sampler_undirected_nocov$memberships),
0.95) })29:
test_that("SimpleSBM_fit 'Bernoulli' model, undirected, no covariate", 30: {eval(code, test_env) sampler_undirected_nocov$rNetwork(store = TRUE)
mySBM_sbm <- sbm::SimpleSBM_fit$new(sampler_undirected_nocov$networkData, "bernoulli", FALSE)31: mySBM_sbm$optimize(estimOptions = list(verbosity = 0, eval(code, test_env) plot = FALSE))
mySBM_sbm$setModel(3)32: withCallingHandlers({ net <- missSBM:::partlyObservedNetwork$new(sampler_undirected_nocov$networkData) eval(code, test_env) new_expectations <- the$test_expectations > starting_expectations cl <- net$clustering(3)[[1]] if (snapshot_skipped) { mySBM_missSBM <- missSBM:::SimpleSBM_fit_noCov$new(net, skip("On CRAN") clusterInit = cl) } mySBM_missSBM$doVEM() expect_lt(rmse(mySBM_missSBM$connectParam$mean, mySBM_sbm$connectParam$mean), else if (!new_expectations && skip_on_empty) { skip_empty() 0.05) } expect_gt(ARI(mySBM_missSBM$memberships, mySBM_sbm$memberships), }, expectation = handle_expectation, packageNotFoundError = function(e) { if (on_cran()) { 0.95) skip(paste0("{", e$package, "} is not installed.")) expect_lt(rmse(mySBM_missSBM$loglik, mySBM_sbm$loglik), } 0.01)}, snapshot_on_cran = function(cnd) { expect_lt(rmse(mySBM_missSBM$connectParam$mean, sampler_undirected_nocov$connectParam$mean), snapshot_skipped <<- TRUE invokeRestart("muffle_cran_snapshot") 0.05)}, skip = handle_skip, warning = handle_warning, message = handle_message, expect_gt(ARI(mySBM_missSBM$memberships, sampler_undirected_nocov$memberships), error = handle_error, interrupt = handle_interrupt) 0.95)
})33:
doTryCatch(return(expr), name, parentenv, handler)30:
eval(code, test_env)34: tryCatchOne(expr, names, parentenv, handlers[[1L]])
31: 35: eval(code, test_env)tryCatchList(expr, classes, parentenv, handlers)
32: 36: withCallingHandlers({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) { 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)37:
doWithOneRestart(return(expr), restart)33:
doTryCatch(return(expr), name, parentenv, handler)38:
withOneRestart(expr, restarts[[1L]])34:
tryCatchOne(expr, names, parentenv, handlers[[1L]])39:
withRestarts(tryCatch(withCallingHandlers({ eval(code, test_env) new_expectations <- the$test_expectations > starting_expectations if (snapshot_skipped) {35: skip("On CRAN")tryCatchList(expr, classes, parentenv, handlers) }
else if (!new_expectations && skip_on_empty) {36: skip_empty()tryCatch(withCallingHandlers({ } eval(code, test_env)}, expectation = handle_expectation, packageNotFoundError = function(e) { new_expectations <- the$test_expectations > starting_expectations if (on_cran()) { if (snapshot_skipped) { skip(paste0("{", e$package, "} is not installed.")) skip("On CRAN") } } else if (!new_expectations && skip_on_empty) {}, snapshot_on_cran = function(cnd) { skip_empty() 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.")) end_test = function() { } })}, snapshot_on_cran = function(cnd) {
40: snapshot_skipped <<- TRUEtest_code(code = exprs, env = env, reporter = get_reporter() %||% invokeRestart("muffle_cran_snapshot")}, skip = handle_skip, warning = handle_warning, message = handle_message, StopReporter$new()) error = handle_error, interrupt = handle_interrupt), error = handle_fatal)
41: 37: source_file(path, env = env(env), desc = desc, shuffle = shuffle, doWithOneRestart(return(expr), restart) error_call = error_call)
38:
withOneRestart(expr, restarts[[1L]])42:
FUN(X[[i]], ...)39:
43: withRestarts(tryCatch(withCallingHandlers({lapply(test_paths, test_one_file, env = env, desc = desc, shuffle = shuffle, eval(code, test_env) new_expectations <- the$test_expectations > starting_expectations error_call = error_call)
if (snapshot_skipped) {44: skip("On CRAN")doTryCatch(return(expr), name, parentenv, handler) }
else if (!new_expectations && skip_on_empty) {45: skip_empty()tryCatchOne(expr, names, parentenv, handlers[[1L]])
}}, expectation = handle_expectation, packageNotFoundError = function(e) {46: if (on_cran()) {tryCatchList(expr, classes, parentenv, handlers) skip(paste0("{", e$package, "} is not installed."))
47: }tryCatch(code, testthat_abort_reporter = function(cnd) {}, snapshot_on_cran = function(cnd) { cat(conditionMessage(cnd), "\n") snapshot_skipped <<- TRUE NULL invokeRestart("muffle_cran_snapshot")})}, skip = handle_skip, warning = handle_warning, message = handle_message,
error = handle_error, interrupt = handle_interrupt), error = handle_fatal), 48: end_test = function() {with_reporter(reporters$multi, lapply(test_paths, test_one_file, }) env = env, desc = desc, shuffle = shuffle, error_call = error_call))
40: 49: test_code(code = exprs, env = env, reporter = get_reporter() %||% test_files_serial(test_dir = test_dir, test_package = test_package, StopReporter$new())
test_paths = test_paths, load_helpers = load_helpers, reporter = reporter, 41: source_file(path, env = env(env), desc = desc, shuffle = shuffle, env = env, stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning, error_call = error_call) desc = desc, load_package = load_package, shuffle = shuffle,
error_call = error_call)42:
FUN(X[[i]], ...)50:
test_files(test_dir = path, test_paths = test_paths, test_package = package, 43: reporter = reporter, load_helpers = load_helpers, env = env, lapply(test_paths, test_one_file, env = env, desc = desc, shuffle = shuffle, error_call = error_call) stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning,
load_package = load_package, parallel = parallel, shuffle = shuffle)
44: 51: doTryCatch(return(expr), name, parentenv, handler)test_dir("testthat", package = package, reporter = reporter,
..., load_package = "installed")45:
tryCatchOne(expr, names, parentenv, handlers[[1L]])52:
test_check("missSBM")
46: tryCatchList(expr, classes, parentenv, handlers)An irrecoverable exception occurred. R is aborting now ...
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()
Traceback:
} 1: }, expectation = handle_expectation, packageNotFoundError = function(e) {dispatcher(membership_name, membership_init$to_cc(), model_name, if (on_cran()) { .self$network_to_cc(), TRUE) skip(paste0("{", e$package, "} is not installed."))
} 2: FUN(X[[i]], ...)}, snapshot_on_cran = function(cnd) {
snapshot_skipped <<- TRUE 3: invokeRestart("muffle_cran_snapshot")lapply(X = S, FUN = FUN, ...)}, skip = handle_skip, warning = handle_warning, message = handle_message,
error = handle_error, interrupt = handle_interrupt), error = handle_fatal), 4: end_test = function() {doTryCatch(return(expr), name, parentenv, handler) })
5: 28: tryCatchOne(expr, names, parentenv, handlers[[1L]])test_code(code, parent.frame())
6: 29: tryCatchList(expr, classes, parentenv, handlers)test_that("SimpleSBM_fit 'Bernoulli' model, directed, no covariate",
{ 7: sampler_directed_nocov$rNetwork(store = TRUE)tryCatch(expr, error = function(e) { mySBM_sbm <- sbm::SimpleSBM_fit$new(sampler_directed_nocov$networkData, call <- conditionCall(e) "bernoulli", TRUE) if (!is.null(call)) { mySBM_sbm$optimize(estimOptions = list(verbosity = 0, if (identical(call[[1L]], quote(doTryCatch))) plot = FALSE)) call <- sys.call(-4L) mySBM_sbm$setModel(3) dcall <- deparse(call, nlines = 1L) net <- missSBM:::partlyObservedNetwork$new(sampler_directed_nocov$networkData) prefix <- paste("Error in", dcall, ": ") cl <- net$clustering(3)[[1]] LONG <- 75L mySBM_missSBM <- missSBM:::SimpleSBM_fit_noCov$new(sampler_directed_nocov$networkData, sm <- strsplit(conditionMessage(e), "\n")[[1L]] clusterInit = cl) w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w") mySBM_missSBM$doVEM() if (is.na(w)) expect_lt(rmse(mySBM_missSBM$connectParam$mean, mySBM_sbm$connectParam$mean), w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L], 0.1) type = "b") expect_gt(ARI(mySBM_missSBM$memberships, mySBM_sbm$memberships), if (w > LONG) 0.95) prefix <- paste0(prefix, "\n ") } expect_lt(rmse(mySBM_missSBM$loglik, mySBM_sbm$loglik), else prefix <- "Error : " 0.01) msg <- paste0(prefix, conditionMessage(e), "\n") expect_lt(rmse(mySBM_missSBM$connectParam$mean, sampler_directed_nocov$connectParam$mean), .Internal(seterrmessage(msg[1L])) 0.1) if (!silent && isTRUE(getOption("show.error.messages"))) { expect_lt(rmse(mySBM_missSBM$covarParam, sampler_directed_cov$covarParam), cat(msg, file = outFile) 0.2) .Internal(printDeferredWarnings()) expect_gt(ARI(mySBM_missSBM$memberships, sampler_directed_nocov$memberships), } 0.95) invisible(structure(msg, class = "try-error", condition = e)) })})
30: 8: eval(code, test_env)try(lapply(X = S, FUN = FUN, ...), silent = TRUE)
31: 9: eval(code, test_env)sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE))
32: 10: withCallingHandlers({FUN(X[[i]], ...) eval(code, test_env)
new_expectations <- the$test_expectations > starting_expectations11: if (snapshot_skipped) {lapply(seq_len(cores), inner.do) skip("On CRAN")
}12: else if (!new_expectations && skip_on_empty) {parallel::mclapply(X, FUN, ..., mc.cores = mc.cores, mc.set.seed = FALSE, skip_empty() mc.silent = TRUE) }
}, expectation = handle_expectation, packageNotFoundError = function(e) { if (on_cran()) {13: skip(paste0("{", e$package, "} is not installed."))parallel_lapply(inits, .self$do_one_estim, mc.cores = ncores, } verbose = (verbosity > 4))}, snapshot_on_cran = function(cnd) {
snapshot_skipped <<- TRUE14: invokeRestart("muffle_cran_snapshot").self$do_with_inits(inits, Q, reinitialization_effort)}, skip = handle_skip, warning = handle_warning, message = handle_message,
error = handle_error, interrupt = handle_interrupt)15:
.self$estim_ascend(reinitialization_effort, changing_effort)33:
doTryCatch(return(expr), name, parentenv, handler)16:
private$BMobject$estimate()34:
tryCatchOne(expr, names, parentenv, handlers[[1L]])17:
mySBM_sbm$optimize(estimOptions = list(verbosity = 0, plot = FALSE))35:
tryCatchList(expr, classes, parentenv, handlers)18:
36: eval(code, test_env)tryCatch(withCallingHandlers({
eval(code, test_env)19: new_expectations <- the$test_expectations > starting_expectations if (snapshot_skipped) {eval(code, test_env) skip("On CRAN")
}20: else if (!new_expectations && skip_on_empty) {withCallingHandlers({ skip_empty() } eval(code, test_env)}, expectation = handle_expectation, packageNotFoundError = function(e) { if (on_cran()) { new_expectations <- the$test_expectations > starting_expectations skip(paste0("{", e$package, "} is not installed.")) if (snapshot_skipped) { } skip("On CRAN")}, snapshot_on_cran = function(cnd) { } snapshot_skipped <<- TRUE invokeRestart("muffle_cran_snapshot") else if (!new_expectations && skip_on_empty) {}, skip = handle_skip, warning = handle_warning, message = handle_message, skip_empty() error = handle_error, interrupt = handle_interrupt), error = handle_fatal) }
}, expectation = handle_expectation, packageNotFoundError = function(e) {37: if (on_cran()) {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({ error = handle_error, interrupt = handle_interrupt) eval(code, test_env)
new_expectations <- the$test_expectations > starting_expectations21: if (snapshot_skipped) {doTryCatch(return(expr), name, parentenv, handler) skip("On CRAN")
}22: else if (!new_expectations && skip_on_empty) {tryCatchOne(expr, names, parentenv, handlers[[1L]]) skip_empty()
}23: }, expectation = handle_expectation, packageNotFoundError = function(e) {tryCatchList(expr, classes, parentenv, handlers) if (on_cran()) {
skip(paste0("{", e$package, "} is not installed."))24: }tryCatch(withCallingHandlers({}, snapshot_on_cran = function(cnd) { eval(code, test_env) snapshot_skipped <<- TRUE new_expectations <- the$test_expectations > starting_expectations invokeRestart("muffle_cran_snapshot") if (snapshot_skipped) {}, skip = handle_skip, warning = handle_warning, message = handle_message, skip("On CRAN") error = handle_error, interrupt = handle_interrupt), error = handle_fatal), } end_test = function() { else if (!new_expectations && skip_on_empty) { }) skip_empty() }
}, expectation = handle_expectation, packageNotFoundError = function(e) {40: test_code(code = exprs, env = env, reporter = get_reporter() %||% if (on_cran()) { StopReporter$new()) skip(paste0("{", e$package, "} is not installed."))
}41: }, snapshot_on_cran = function(cnd) {source_file(path, env = env(env), desc = desc, shuffle = shuffle, snapshot_skipped <<- TRUE error_call = error_call) invokeRestart("muffle_cran_snapshot")
}, skip = handle_skip, warning = handle_warning, message = handle_message, 42: error = handle_error, interrupt = handle_interrupt), error = handle_fatal)FUN(X[[i]], ...)
43: 25: lapply(test_paths, test_one_file, env = env, desc = desc, shuffle = shuffle, doWithOneRestart(return(expr), restart) error_call = error_call)
26: 44: withOneRestart(expr, restarts[[1L]])doTryCatch(return(expr), name, parentenv, handler)
27: 45: withRestarts(tryCatch(withCallingHandlers({tryCatchOne(expr, names, parentenv, handlers[[1L]]) eval(code, test_env)
new_expectations <- the$test_expectations > starting_expectations46: if (snapshot_skipped) {tryCatchList(expr, classes, parentenv, handlers) skip("On CRAN")
}47: else if (!new_expectations && skip_on_empty) {tryCatch(code, testthat_abort_reporter = function(cnd) { skip_empty() cat(conditionMessage(cnd), "\n") } NULL}, expectation = handle_expectation, packageNotFoundError = function(e) {}) if (on_cran()) {
skip(paste0("{", e$package, "} is not installed."))48: }with_reporter(reporters$multi, lapply(test_paths, test_one_file, }, snapshot_on_cran = function(cnd) { env = env, desc = desc, shuffle = shuffle, error_call = error_call)) snapshot_skipped <<- TRUE
invokeRestart("muffle_cran_snapshot")49: }, skip = handle_skip, warning = handle_warning, message = handle_message, test_files_serial(test_dir = test_dir, test_package = test_package, error = handle_error, interrupt = handle_interrupt), error = handle_fatal), test_paths = test_paths, load_helpers = load_helpers, reporter = reporter, end_test = function() { 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)28:
test_code(code, parent.frame())50:
test_files(test_dir = path, test_paths = test_paths, test_package = package, 29: reporter = reporter, load_helpers = load_helpers, env = env, test_that("SimpleSBM_fit 'Bernoulli' model, directed, no covariate", stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning, { load_package = load_package, parallel = parallel, shuffle = shuffle) sampler_directed_nocov$rNetwork(store = TRUE)
mySBM_sbm <- sbm::SimpleSBM_fit$new(sampler_directed_nocov$networkData, "bernoulli", TRUE)51: mySBM_sbm$optimize(estimOptions = list(verbosity = 0, test_dir("testthat", package = package, reporter = reporter, plot = FALSE)) ..., load_package = "installed") mySBM_sbm$setModel(3)
net <- missSBM:::partlyObservedNetwork$new(sampler_directed_nocov$networkData)52: cl <- net$clustering(3)[[1]]test_check("missSBM") mySBM_missSBM <- missSBM:::SimpleSBM_fit_noCov$new(sampler_directed_nocov$networkData,
clusterInit = cl)An irrecoverable exception occurred. R is aborting now ...
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