Last updated on 2026-10-30 23:55:08 CET.
| Flavor | Version | Tinstall | Tcheck | Ttotal | Status | Flags |
|---|---|---|---|---|---|---|
| r-devel-linux-x86_64-debian-clang | 1.1.0 | 82.70 | 337.88 | 420.58 | OK | |
| r-devel-linux-x86_64-debian-gcc | 1.1.0 | 63.47 | 239.12 | 302.59 | OK | |
| r-devel-linux-x86_64-fedora-clang | 1.1.0 | 60.00 | 235.13 | 295.13 | OK | |
| r-devel-linux-x86_64-fedora-gcc | 1.1.0 | 62.00 | 241.02 | 303.02 | OK | |
| r-devel-windows-x86_64 | 1.1.0 | 91.00 | 417.00 | 508.00 | OK | |
| r-patched-linux-x86_64 | 1.1.0 | 85.14 | 334.40 | 419.54 | OK | |
| r-release-linux-x86_64 | 1.1.0 | 81.31 | 327.81 | 409.12 | 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 | 101.00 | 348.00 | 449.00 | OK | |
| r-oldrel-macos-arm64 | 1.1.0 | ERROR | ||||
| r-oldrel-macos-x86_64 | 1.1.0 | 59.00 | 679.00 | 738.00 | OK | |
| r-oldrel-windows-x86_64 | 1.1.0 | 117.00 | 477.00 | 594.00 | OK |
Version: 1.1.0
Check: tests
Result: ERROR
Running ‘spelling.R’ [0s/0s]
Running ‘testthat.R’ [36s/29s]
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]], ...)
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)
Traceback:
1: 15: dispatcher(membership_name, membership_init$to_cc(), model_name, .self$estim_ascend(reinitialization_effort, changing_effort) .self$network_to_cc(), TRUE)
16: 2: private$BMobject$estimate()FUN(X[[i]], ...)
17: 3: mySBM_sbm$optimize(estimOptions = list(verbosity = 0, plot = FALSE))lapply(X = S, FUN = FUN, ...)
18: 4: eval(code, test_env)doTryCatch(return(expr), name, parentenv, handler)
19: 5: eval(code, test_env)tryCatchOne(expr, names, parentenv, handlers[[1L]])
20: 6: withCallingHandlers({tryCatchList(expr, classes, parentenv, handlers) eval(code, test_env)
new_expectations <- the$test_expectations > starting_expectations 7: if (snapshot_skipped) {tryCatch(expr, error = function(e) { skip("On CRAN") call <- conditionCall(e) } if (!is.null(call)) { else if (!new_expectations && skip_on_empty) { if (identical(call[[1L]], quote(doTryCatch))) skip_empty() call <- sys.call(-4L) } dcall <- deparse(call, nlines = 1L)}, expectation = handle_expectation, packageNotFoundError = function(e) { prefix <- paste("Error in", dcall, ": ") if (on_cran()) { LONG <- 75L skip(paste0("{", e$package, "} is not installed.")) sm <- strsplit(conditionMessage(e), "\n")[[1L]] } w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w")}, snapshot_on_cran = function(cnd) { if (is.na(w)) snapshot_skipped <<- TRUE w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L], invokeRestart("muffle_cran_snapshot") type = "b")}, skip = handle_skip, warning = handle_warning, message = handle_message, if (w > LONG) error = handle_error, interrupt = handle_interrupt) prefix <- paste0(prefix, "\n ")
}21: else prefix <- "Error : "doTryCatch(return(expr), name, parentenv, handler) msg <- paste0(prefix, conditionMessage(e), "\n")
.Internal(seterrmessage(msg[1L]))22: if (!silent && isTRUE(getOption("show.error.messages"))) {tryCatchOne(expr, names, parentenv, handlers[[1L]]) cat(msg, file = outFile)
.Internal(printDeferredWarnings())23: }tryCatchList(expr, classes, parentenv, handlers) invisible(structure(msg, class = "try-error", condition = e))
})24:
tryCatch(withCallingHandlers({ 8: eval(code, test_env)try(lapply(X = S, FUN = FUN, ...), silent = TRUE) new_expectations <- the$test_expectations > starting_expectations
if (snapshot_skipped) { 9: skip("On CRAN")sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE)) }
else if (!new_expectations && skip_on_empty) {10: skip_empty()FUN(X[[i]], ...) }
}, expectation = handle_expectation, packageNotFoundError = function(e) {11: if (on_cran()) {lapply(seq_len(cores), inner.do) skip(paste0("{", e$package, "} is not installed."))
}12: }, snapshot_on_cran = function(cnd) {parallel::mclapply(X, FUN, ..., mc.cores = mc.cores, mc.set.seed = FALSE, snapshot_skipped <<- TRUE mc.silent = TRUE) invokeRestart("muffle_cran_snapshot")
}, skip = handle_skip, warning = handle_warning, message = handle_message, 13: error = handle_error, interrupt = handle_interrupt), error = handle_fatal)parallel_lapply(inits, .self$do_one_estim, mc.cores = ncores,
verbose = (verbosity > 4))25:
doWithOneRestart(return(expr), restart)14:
.self$do_with_inits(inits, Q, reinitialization_effort)26:
withOneRestart(expr, restarts[[1L]])15:
.self$estim_ascend(reinitialization_effort, changing_effort)27:
withRestarts(tryCatch(withCallingHandlers({16: eval(code, test_env)private$BMobject$estimate() new_expectations <- the$test_expectations > starting_expectations
if (snapshot_skipped) {17: skip("On CRAN")mySBM_sbm$optimize(estimOptions = list(verbosity = 0, plot = FALSE)) }
else if (!new_expectations && skip_on_empty) {18: 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) {withCallingHandlers({ snapshot_skipped <<- TRUE eval(code, test_env) invokeRestart("muffle_cran_snapshot") new_expectations <- the$test_expectations > starting_expectations}, skip = handle_skip, warning = handle_warning, message = handle_message, if (snapshot_skipped) { error = handle_error, interrupt = handle_interrupt), error = handle_fatal), skip("On CRAN") end_test = function() { } }) else if (!new_expectations && skip_on_empty) {
skip_empty()28: }test_code(code, parent.frame())}, expectation = handle_expectation, packageNotFoundError = function(e) {
if (on_cran()) {29: skip(paste0("{", e$package, "} is not installed."))test_that("SimpleSBM_fit 'Bernoulli' model, undirected, one covariate", } {}, snapshot_on_cran = function(cnd) { sampler_undirected_cov$rNetwork(store = TRUE) snapshot_skipped <<- TRUE mySBM_sbm <- sbm::SimpleSBM_fit$new(sampler_undirected_cov$networkData, invokeRestart("muffle_cran_snapshot") "bernoulli", FALSE, covarList = covarList_undirected)}, skip = handle_skip, warning = handle_warning, message = handle_message, mySBM_sbm$optimize(estimOptions = list(verbosity = 0, error = handle_error, interrupt = handle_interrupt) plot = FALSE))
mySBM_sbm$setModel(Q)21: net <- missSBM:::partlyObservedNetwork$new(sampler_undirected_cov$networkData, doTryCatch(return(expr), name, parentenv, handler) covariates = covarList_undirected)
cls <- net$clustering(1:(2 * Q))22: cl <- cls[[Q]]tryCatchOne(expr, names, parentenv, handlers[[1L]]) mySBM_missSBM <- missSBM:::SimpleSBM_fit_withCov$new(net,
clusterInit = cl, covarList = covarList_undirected)23: mySBM_missSBM$doVEM()tryCatchList(expr, classes, parentenv, handlers) expect_lt(rmse(mySBM_missSBM$connectParam$mean, mySBM_sbm$connectParam$mean),
0.05)24: expect_gt(ARI(mySBM_missSBM$memberships, mySBM_sbm$memberships), tryCatch(withCallingHandlers({ 0.8) eval(code, test_env) expect_lt(rmse(mySBM_missSBM$loglik, mySBM_sbm$loglik), new_expectations <- the$test_expectations > starting_expectations 0.01) if (snapshot_skipped) { expect_lt(rmse(mySBM_missSBM$connectParam$mean, sampler_undirected_cov$connectParam$mean), skip("On CRAN") 0.1) } expect_lt(rmse(mySBM_missSBM$covarParam, sampler_undirected_cov$covarParam), else if (!new_expectations && skip_on_empty) { 0.1) skip_empty() expect_gt(ARI(mySBM_missSBM$memberships, sampler_undirected_cov$memberships), } 0.85)}, expectation = handle_expectation, packageNotFoundError = function(e) { }) if (on_cran()) {
skip(paste0("{", e$package, "} is not installed."))30: }eval(code, test_env)}, snapshot_on_cran = function(cnd) {
snapshot_skipped <<- TRUE31: invokeRestart("muffle_cran_snapshot")eval(code, test_env)}, skip = handle_skip, warning = handle_warning, message = handle_message,
error = handle_error, interrupt = handle_interrupt), error = handle_fatal)32:
withCallingHandlers({25: eval(code, test_env)doWithOneRestart(return(expr), restart) new_expectations <- the$test_expectations > starting_expectations
if (snapshot_skipped) {26: skip("On CRAN")withOneRestart(expr, restarts[[1L]]) }
else if (!new_expectations && skip_on_empty) {27: skip_empty()withRestarts(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") } }}, 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) if (on_cran()) {
skip(paste0("{", e$package, "} is not installed."))33: }doTryCatch(return(expr), name, parentenv, handler)}, snapshot_on_cran = function(cnd) {
snapshot_skipped <<- TRUE34: invokeRestart("muffle_cran_snapshot")tryCatchOne(expr, names, parentenv, handlers[[1L]])}, skip = handle_skip, warning = handle_warning, message = handle_message,
error = handle_error, interrupt = handle_interrupt), error = handle_fatal), 35: end_test = function() {tryCatchList(expr, classes, parentenv, handlers) })
36: 28: tryCatch(withCallingHandlers({test_code(code, parent.frame()) eval(code, test_env)
new_expectations <- the$test_expectations > starting_expectations29: if (snapshot_skipped) {test_that("SimpleSBM_fit 'Bernoulli' model, undirected, one covariate", skip("On CRAN") { } sampler_undirected_cov$rNetwork(store = TRUE) else if (!new_expectations && skip_on_empty) { mySBM_sbm <- sbm::SimpleSBM_fit$new(sampler_undirected_cov$networkData, skip_empty() "bernoulli", FALSE, covarList = covarList_undirected) } mySBM_sbm$optimize(estimOptions = list(verbosity = 0, }, expectation = handle_expectation, packageNotFoundError = function(e) { plot = FALSE)) if (on_cran()) { mySBM_sbm$setModel(Q) skip(paste0("{", e$package, "} is not installed.")) net <- missSBM:::partlyObservedNetwork$new(sampler_undirected_cov$networkData, } covariates = covarList_undirected)}, snapshot_on_cran = function(cnd) { cls <- net$clustering(1:(2 * Q)) snapshot_skipped <<- TRUE cl <- cls[[Q]] invokeRestart("muffle_cran_snapshot") mySBM_missSBM <- missSBM:::SimpleSBM_fit_withCov$new(net, }, skip = handle_skip, warning = handle_warning, message = handle_message, clusterInit = cl, covarList = covarList_undirected) error = handle_error, interrupt = handle_interrupt), error = handle_fatal) mySBM_missSBM$doVEM()
expect_lt(rmse(mySBM_missSBM$connectParam$mean, mySBM_sbm$connectParam$mean), 37: 0.05)doWithOneRestart(return(expr), restart) expect_gt(ARI(mySBM_missSBM$memberships, mySBM_sbm$memberships),
0.8)38: expect_lt(rmse(mySBM_missSBM$loglik, mySBM_sbm$loglik), withOneRestart(expr, restarts[[1L]]) 0.01)
expect_lt(rmse(mySBM_missSBM$connectParam$mean, sampler_undirected_cov$connectParam$mean), 39: 0.1)withRestarts(tryCatch(withCallingHandlers({ expect_lt(rmse(mySBM_missSBM$covarParam, sampler_undirected_cov$covarParam), eval(code, test_env) 0.1) new_expectations <- the$test_expectations > starting_expectations expect_gt(ARI(mySBM_missSBM$memberships, sampler_undirected_cov$memberships), if (snapshot_skipped) { 0.85) skip("On CRAN") }) }
else if (!new_expectations && skip_on_empty) {30: skip_empty()eval(code, test_env) }
}, expectation = handle_expectation, packageNotFoundError = function(e) {31: if (on_cran()) {eval(code, test_env) skip(paste0("{", e$package, "} is not installed."))
}32: }, snapshot_on_cran = function(cnd) {withCallingHandlers({ snapshot_skipped <<- TRUE eval(code, test_env) invokeRestart("muffle_cran_snapshot") new_expectations <- the$test_expectations > starting_expectations}, skip = handle_skip, warning = handle_warning, message = handle_message, if (snapshot_skipped) { error = handle_error, interrupt = handle_interrupt), error = handle_fatal), skip("On CRAN") end_test = function() { } }) else if (!new_expectations && skip_on_empty) {
skip_empty()40: }test_code(code = exprs, env = env, reporter = get_reporter() %||% }, expectation = handle_expectation, packageNotFoundError = function(e) { StopReporter$new()) if (on_cran()) {
skip(paste0("{", e$package, "} is not installed."))41: }source_file(path, env = env(env), desc = desc, shuffle = shuffle, }, snapshot_on_cran = function(cnd) { error_call = error_call) snapshot_skipped <<- TRUE
invokeRestart("muffle_cran_snapshot")42: }, skip = handle_skip, warning = handle_warning, message = handle_message, FUN(X[[i]], ...) error = handle_error, interrupt = handle_interrupt)
43: 33: lapply(test_paths, test_one_file, env = env, desc = desc, shuffle = shuffle, doTryCatch(return(expr), name, parentenv, handler) error_call = error_call)
34: 44: tryCatchOne(expr, names, parentenv, handlers[[1L]])doTryCatch(return(expr), name, parentenv, handler)
35: 45: tryCatchList(expr, classes, parentenv, handlers)tryCatchOne(expr, names, parentenv, handlers[[1L]])
36: 46: tryCatch(withCallingHandlers({tryCatchList(expr, classes, parentenv, handlers) eval(code, test_env)
new_expectations <- the$test_expectations > starting_expectations47: if (snapshot_skipped) {tryCatch(code, testthat_abort_reporter = function(cnd) { skip("On CRAN") cat(conditionMessage(cnd), "\n") } NULL else if (!new_expectations && skip_on_empty) {}) skip_empty()
}48: }, expectation = handle_expectation, packageNotFoundError = function(e) {with_reporter(reporters$multi, lapply(test_paths, test_one_file, if (on_cran()) { env = env, desc = desc, shuffle = shuffle, error_call = error_call)) skip(paste0("{", e$package, "} is not installed."))
}49: }, snapshot_on_cran = function(cnd) {test_files_serial(test_dir = test_dir, test_package = test_package, snapshot_skipped <<- TRUE test_paths = test_paths, load_helpers = load_helpers, reporter = reporter, invokeRestart("muffle_cran_snapshot") env = env, stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning, }, skip = handle_skip, warning = handle_warning, message = handle_message, desc = desc, load_package = load_package, shuffle = shuffle, error = handle_error, interrupt = handle_interrupt), error = handle_fatal) error_call = error_call)
37: 50: doWithOneRestart(return(expr), restart)test_files(test_dir = path, test_paths = test_paths, test_package = package,
reporter = reporter, load_helpers = load_helpers, env = env, 38: stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning, withOneRestart(expr, restarts[[1L]]) load_package = load_package, parallel = parallel, shuffle = shuffle)
39: 51: withRestarts(tryCatch(withCallingHandlers({test_dir("testthat", package = package, reporter = reporter, eval(code, test_env) ..., load_package = "installed") new_expectations <- the$test_expectations > starting_expectations
if (snapshot_skipped) {52: skip("On CRAN")test_check("missSBM") }
else if (!new_expectations && skip_on_empty) {An irrecoverable exception occurred. R is aborting now ...
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-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)
Traceback:
1: .Internal(printDeferredWarnings())dispatcher(membership_name, membership_init$to_cc(), model_name, .self$network_to_cc(), TRUE) }
invisible(structure(msg, class = "try-error", condition = e)) 2: })FUN(X[[i]], ...)
8: 3: lapply(X = S, FUN = FUN, ...)try(lapply(X = S, FUN = FUN, ...), silent = TRUE)
4: 9: sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE))doTryCatch(return(expr), name, parentenv, handler)
10:
FUN(X[[i]], ...)
5: tryCatchOne(expr, names, parentenv, handlers[[1L]])11: lapply(seq_len(cores), inner.do)
6: tryCatchList(expr, classes, parentenv, handlers)12:
parallel::mclapply(X, FUN, ..., mc.cores = mc.cores, mc.set.seed = FALSE, mc.silent = TRUE) 7: tryCatch(expr, error = function(e) {
13: call <- conditionCall(e)parallel_lapply(inits, .self$do_one_estim, mc.cores = ncores, if (!is.null(call)) { if (identical(call[[1L]], quote(doTryCatch))) verbose = (verbosity > 4))
call <- sys.call(-4L)14: .self$do_with_inits(inits, Q, reinitialization_effort) dcall <- deparse(call, nlines = 1L) prefix <- paste("Error in", dcall, ": ") LONG <- 75L
15: sm <- strsplit(conditionMessage(e), "\n")[[1L]].self$estim_ascend(reinitialization_effort, changing_effort) w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w")
if (is.na(w)) 16: private$BMobject$estimate() w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L],
17: mySBM_sbm$optimize(estimOptions = list(verbosity = 0, plot = FALSE)) type = "b") if (w > LONG)
18: prefix <- paste0(prefix, "\n ")eval(code, test_env) }
else prefix <- "Error : " 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: withCallingHandlers({ .Internal(printDeferredWarnings()) 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()) { skip(paste0("{", e$package, "} is not installed."))10: FUN(X[[i]], ...) }}, snapshot_on_cran = function(cnd) {
snapshot_skipped <<- TRUE11: lapply(seq_len(cores), inner.do) invokeRestart("muffle_cran_snapshot")
}, skip = handle_skip, warning = handle_warning, message = handle_message, error = handle_error, interrupt = handle_interrupt)
12: parallel::mclapply(X, FUN, ..., mc.cores = mc.cores, mc.set.seed = FALSE, 21: doTryCatch(return(expr), name, parentenv, handler) mc.silent = TRUE)
22: 13: tryCatchOne(expr, names, parentenv, handlers[[1L]])parallel_lapply(inits, .self$do_one_estim, mc.cores = ncores, verbose = (verbosity > 4))
23:
tryCatchList(expr, classes, parentenv, handlers)14: .self$do_with_inits(inits, Q, reinitialization_effort)
24:
tryCatch(withCallingHandlers({15: eval(code, test_env) 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()) { skip(paste0("{", e$package, "} is not installed."))eval(code, test_env) }
}, snapshot_on_cran = function(cnd) { snapshot_skipped <<- TRUE19: invokeRestart("muffle_cran_snapshot")eval(code, test_env)}, skip = handle_skip, warning = handle_warning, message = handle_message, error = handle_error, interrupt = handle_interrupt), error = handle_fatal)
20: 25: doWithOneRestart(return(expr), restart)withCallingHandlers({
eval(code, test_env)26: new_expectations <- the$test_expectations > starting_expectations 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) new_expectations <- the$test_expectations > starting_expectations skip_empty() if (snapshot_skipped) { }}, expectation = handle_expectation, packageNotFoundError = function(e) { skip("On CRAN") 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 invokeRestart("muffle_cran_snapshot") if (on_cran()) { skip(paste0("{", e$package, "} is not installed."))}, 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), error = handle_fatal), end_test = function() {
})22: tryCatchOne(expr, names, parentenv, handlers[[1L]])
28:
test_code(code, parent.frame())
29: 23: tryCatchList(expr, classes, parentenv, handlers)
test_that("SimpleSBM_fit 'Bernoulli' model, directed, one covariate", 24: { sampler_directed_cov$rNetwork(store = TRUE)tryCatch(withCallingHandlers({ eval(code, test_env) mySBM_sbm <- sbm::SimpleSBM_fit$new(sampler_directed_cov$networkData, "bernoulli", TRUE, covarList = covarList_directed) new_expectations <- the$test_expectations > starting_expectations mySBM_sbm$optimize(estimOptions = list(verbosity = 0, if (snapshot_skipped) { skip("On CRAN") plot = FALSE)) mySBM_sbm$setModel(Q) } net <- missSBM:::partlyObservedNetwork$new(sampler_directed_cov$networkData, covariates = covarList_directed) else if (!new_expectations && skip_on_empty) { skip_empty() cls <- net$clustering(1:(2 * Q)) cl <- cls[[Q]] } mySBM_missSBM <- missSBM:::SimpleSBM_fit_withCov$new(net, }, expectation = handle_expectation, packageNotFoundError = function(e) { if (on_cran()) { clusterInit = cl, covarList = covarList_directed) mySBM_missSBM$doVEM(trace = TRUE) skip(paste0("{", e$package, "} is not installed.")) expect_lt(rmse(mySBM_missSBM$connectParam$mean, mySBM_sbm$connectParam$mean), }}, snapshot_on_cran = function(cnd) { 0.1) 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)
expect_gt(ARI(mySBM_missSBM$memberships, mySBM_sbm$memberships), 0.8)25: expect_lt(rmse(mySBM_missSBM$loglik, mySBM_sbm$loglik), doWithOneRestart(return(expr), restart) 0.05) expect_lt(rmse(mySBM_missSBM$connectParam$mean, sampler_directed_cov$connectParam$mean),
26: 0.1) expect_gt(ARI(mySBM_missSBM$memberships, sampler_directed_cov$memberships), withOneRestart(expr, restarts[[1L]]) 0.85)
27: })withRestarts(tryCatch(withCallingHandlers({
eval(code, test_env)30: new_expectations <- the$test_expectations > starting_expectationseval(code, test_env)
if (snapshot_skipped) {31: skip("On CRAN") }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 (snapshot_skipped) { if (on_cran()) { skip("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) { end_test = function() { }) snapshot_skipped <<- TRUE invokeRestart("muffle_cran_snapshot")
}, skip = handle_skip, warning = handle_warning, message = handle_message, error = handle_error, interrupt = handle_interrupt)
28: test_code(code, parent.frame())33: doTryCatch(return(expr), name, parentenv, handler)
34: tryCatchOne(expr, names, parentenv, handlers[[1L]])29:
35: test_that("SimpleSBM_fit 'Bernoulli' model, directed, one covariate", {tryCatchList(expr, classes, parentenv, handlers)
sampler_directed_cov$rNetwork(store = TRUE) mySBM_sbm <- sbm::SimpleSBM_fit$new(sampler_directed_cov$networkData, 36: tryCatch(withCallingHandlers({ "bernoulli", TRUE, covarList = covarList_directed) eval(code, test_env) mySBM_sbm$optimize(estimOptions = list(verbosity = 0, plot = FALSE)) new_expectations <- the$test_expectations > starting_expectations mySBM_sbm$setModel(Q) if (snapshot_skipped) { skip("On CRAN") } net <- missSBM:::partlyObservedNetwork$new(sampler_directed_cov$networkData, covariates = covarList_directed) else if (!new_expectations && skip_on_empty) { skip_empty() cls <- net$clustering(1:(2 * Q)) cl <- cls[[Q]] }}, expectation = handle_expectation, packageNotFoundError = function(e) { mySBM_missSBM <- missSBM:::SimpleSBM_fit_withCov$new(net, if (on_cran()) { clusterInit = cl, covarList = covarList_directed) mySBM_missSBM$doVEM(trace = TRUE) skip(paste0("{", e$package, "} is not installed.")) expect_lt(rmse(mySBM_missSBM$connectParam$mean, mySBM_sbm$connectParam$mean), }}, snapshot_on_cran = function(cnd) { 0.1) expect_gt(ARI(mySBM_missSBM$memberships, mySBM_sbm$memberships), snapshot_skipped <<- TRUE invokeRestart("muffle_cran_snapshot") 0.8)}, skip = handle_skip, warning = handle_warning, message = handle_message, error = handle_error, interrupt = handle_interrupt), error = handle_fatal) expect_lt(rmse(mySBM_missSBM$loglik, mySBM_sbm$loglik), 0.05)
37: expect_lt(rmse(mySBM_missSBM$connectParam$mean, sampler_directed_cov$connectParam$mean), doWithOneRestart(return(expr), restart)
0.1) expect_gt(ARI(mySBM_missSBM$memberships, sampler_directed_cov$memberships), 38: withOneRestart(expr, restarts[[1L]]) 0.85) })
39:
withRestarts(tryCatch(withCallingHandlers({ eval(code, test_env)30: new_expectations <- the$test_expectations > starting_expectations if (snapshot_skipped) {eval(code, test_env)
skip("On CRAN") }31: else if (!new_expectations && skip_on_empty) { skip_empty()eval(code, test_env) }
32: }, expectation = handle_expectation, packageNotFoundError = function(e) {withCallingHandlers({ if (on_cran()) { eval(code, test_env) skip(paste0("{", e$package, "} is not installed.")) 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") else if (!new_expectations && skip_on_empty) {}, skip = handle_skip, warning = handle_warning, message = handle_message, error = handle_error, interrupt = handle_interrupt), error = handle_fatal), skip_empty() }}, expectation = handle_expectation, packageNotFoundError = function(e) { end_test = function() { })
if (on_cran()) { skip(paste0("{", e$package, "} is not installed."))40: }test_code(code = exprs, env = env, reporter = get_reporter() %||% }, snapshot_on_cran = function(cnd) { StopReporter$new()) snapshot_skipped <<- TRUE invokeRestart("muffle_cran_snapshot")
}, skip = handle_skip, warning = handle_warning, message = handle_message, 41: source_file(path, env = env(env), desc = desc, shuffle = shuffle, error = handle_error, interrupt = handle_interrupt) error_call = error_call)
33: 42: doTryCatch(return(expr), name, parentenv, handler)FUN(X[[i]], ...)
34: 43: lapply(test_paths, test_one_file, env = env, desc = desc, shuffle = shuffle, tryCatchOne(expr, names, parentenv, handlers[[1L]]) error_call = error_call)
35: tryCatchList(expr, classes, parentenv, handlers)44: doTryCatch(return(expr), name, parentenv, handler)
36: 45: tryCatchOne(expr, names, parentenv, handlers[[1L]])tryCatch(withCallingHandlers({ eval(code, test_env)
46: new_expectations <- the$test_expectations > starting_expectationstryCatchList(expr, classes, parentenv, handlers)
if (snapshot_skipped) { skip("On CRAN")47: tryCatch(code, testthat_abort_reporter = function(cnd) { } cat(conditionMessage(cnd), "\n") else if (!new_expectations && skip_on_empty) { skip_empty() NULL }})}, expectation = handle_expectation, packageNotFoundError = function(e) {
if (on_cran()) {48: skip(paste0("{", e$package, "} is not installed."))with_reporter(reporters$multi, lapply(test_paths, test_one_file, } env = env, desc = desc, shuffle = shuffle, error_call = error_call))}, snapshot_on_cran = function(cnd) {
snapshot_skipped <<- TRUE invokeRestart("muffle_cran_snapshot")49: test_files_serial(test_dir = test_dir, test_package = test_package, }, skip = handle_skip, warning = handle_warning, message = handle_message, test_paths = test_paths, load_helpers = load_helpers, reporter = reporter, error = handle_error, interrupt = handle_interrupt), error = handle_fatal) env = env, stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning,
desc = desc, load_package = load_package, shuffle = shuffle, 37: error_call = error_call)doWithOneRestart(return(expr), restart)
38: 50: test_files(test_dir = path, test_paths = test_paths, test_package = package, withOneRestart(expr, restarts[[1L]]) 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)
39: 51: withRestarts(tryCatch(withCallingHandlers({test_dir("testthat", package = package, reporter = reporter, ..., load_package = "installed") eval(code, test_env)
52: new_expectations <- the$test_expectations > starting_expectations if (snapshot_skipped) {test_check("missSBM")
skip("On CRAN")An irrecoverable exception occurred. R is aborting now ...
} 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 ***
*** caught segfault ***
address 0x110, cause 'invalid permissions'
address 0x110, cause 'invalid permissions'
Traceback:
1: dispatcher(membership_name, membership_init$to_cc(), model_name, .self$network_to_cc(), TRUE)
Traceback:
2: 1: FUN(X[[i]], ...)dispatcher(membership_name, membership_init$to_cc(), model_name,
.self$network_to_cc(), TRUE) 3:
lapply(X = S, FUN = FUN, ...) 2:
FUN(X[[i]], ...) 4:
doTryCatch(return(expr), name, parentenv, handler) 3:
lapply(X = S, FUN = FUN, ...) 5:
tryCatchOne(expr, names, parentenv, handlers[[1L]]) 4:
doTryCatch(return(expr), name, parentenv, handler) 6:
tryCatchList(expr, classes, parentenv, handlers) 5:
tryCatchOne(expr, names, parentenv, handlers[[1L]]) 7:
tryCatch(expr, error = function(e) { 6: call <- conditionCall(e)tryCatchList(expr, classes, parentenv, handlers) if (!is.null(call)) {
if (identical(call[[1L]], quote(doTryCatch))) 7: call <- sys.call(-4L)tryCatch(expr, error = function(e) { dcall <- deparse(call, nlines = 1L) call <- conditionCall(e) prefix <- paste("Error in", dcall, ": ") if (!is.null(call)) { LONG <- 75L if (identical(call[[1L]], quote(doTryCatch))) sm <- strsplit(conditionMessage(e), "\n")[[1L]] call <- sys.call(-4L) w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w") dcall <- deparse(call, nlines = 1L) if (is.na(w)) prefix <- paste("Error in", dcall, ": ") w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L], LONG <- 75L type = "b") sm <- strsplit(conditionMessage(e), "\n")[[1L]] if (w > LONG) w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w") prefix <- paste0(prefix, "\n ") if (is.na(w)) } w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L], else prefix <- "Error : " type = "b") msg <- paste0(prefix, conditionMessage(e), "\n") if (w > LONG) .Internal(seterrmessage(msg[1L])) prefix <- paste0(prefix, "\n ") if (!silent && isTRUE(getOption("show.error.messages"))) { } cat(msg, file = outFile) else prefix <- "Error : " .Internal(printDeferredWarnings()) msg <- paste0(prefix, conditionMessage(e), "\n") } .Internal(seterrmessage(msg[1L])) invisible(structure(msg, class = "try-error", condition = e)) if (!silent && isTRUE(getOption("show.error.messages"))) {}) cat(msg, file = outFile)
.Internal(printDeferredWarnings()) 8: }try(lapply(X = S, FUN = FUN, ...), silent = TRUE) invisible(structure(msg, class = "try-error", condition = e))
}) 9:
sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE)) 8:
try(lapply(X = S, FUN = FUN, ...), silent = TRUE)10:
FUN(X[[i]], ...) 9:
sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE))11:
lapply(seq_len(cores), inner.do)10:
FUN(X[[i]], ...)12:
parallel::mclapply(X, FUN, ..., mc.cores = mc.cores, mc.set.seed = FALSE, 11: mc.silent = TRUE)lapply(seq_len(cores), inner.do)
13: 12: parallel_lapply(inits, .self$do_one_estim, mc.cores = ncores, parallel::mclapply(X, FUN, ..., mc.cores = mc.cores, mc.set.seed = FALSE, verbose = (verbosity > 4)) mc.silent = TRUE)
14: 13: .self$do_with_inits(inits, Q, reinitialization_effort)parallel_lapply(inits, .self$do_one_estim, mc.cores = ncores,
verbose = (verbosity > 4))15:
.self$estim_ascend(reinitialization_effort, changing_effort)14:
.self$do_with_inits(inits, Q, reinitialization_effort)16:
private$BMobject$estimate()15:
.self$estim_ascend(reinitialization_effort, changing_effort)17:
mySBM_sbm$optimize(estimOptions = list(verbosity = 0, plot = FALSE))16:
private$BMobject$estimate()18:
eval(code, test_env)17:
mySBM_sbm$optimize(estimOptions = list(verbosity = 0, plot = FALSE))19:
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()) { 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)22:
tryCatchOne(expr, names, parentenv, handlers[[1L]])21:
doTryCatch(return(expr), name, parentenv, handler)23:
tryCatchList(expr, classes, parentenv, handlers)22:
tryCatchOne(expr, names, parentenv, handlers[[1L]])24:
tryCatch(withCallingHandlers({23: eval(code, test_env)tryCatchList(expr, classes, parentenv, handlers) new_expectations <- the$test_expectations > starting_expectations
if (snapshot_skipped) {24: skip("On CRAN")tryCatch(withCallingHandlers({ } eval(code, test_env) else if (!new_expectations && skip_on_empty) { new_expectations <- the$test_expectations > starting_expectations skip_empty() if (snapshot_skipped) { } skip("On CRAN")}, expectation = handle_expectation, packageNotFoundError = function(e) { } if (on_cran()) { else if (!new_expectations && skip_on_empty) { skip(paste0("{", e$package, "} is not installed.")) skip_empty() } }}, 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), error = handle_fatal)}, snapshot_on_cran = function(cnd) {
snapshot_skipped <<- TRUE25: invokeRestart("muffle_cran_snapshot")doWithOneRestart(return(expr), restart)}, skip = handle_skip, warning = handle_warning, message = handle_message,
error = handle_error, interrupt = handle_interrupt), error = handle_fatal)26:
withOneRestart(expr, restarts[[1L]])25:
doWithOneRestart(return(expr), restart)27:
withRestarts(tryCatch(withCallingHandlers({26: 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), error = handle_fatal), }, snapshot_on_cran = function(cnd) { end_test = function() { snapshot_skipped <<- TRUE }) invokeRestart("muffle_cran_snapshot")
}, skip = handle_skip, warning = handle_warning, message = handle_message, 28: error = handle_error, interrupt = handle_interrupt), error = handle_fatal), test_code(code, parent.frame()) end_test = function() {
})29:
test_that("SimpleSBM_fit 'Bernoulli' model, undirected, no covariate", 28: {test_code(code, parent.frame()) sampler_undirected_nocov$rNetwork(store = TRUE)
mySBM_sbm <- sbm::SimpleSBM_fit$new(sampler_undirected_nocov$networkData, 29: "bernoulli", FALSE)test_that("SimpleSBM_fit 'Bernoulli' model, undirected, no covariate", mySBM_sbm$optimize(estimOptions = list(verbosity = 0, { plot = FALSE)) sampler_undirected_nocov$rNetwork(store = TRUE) mySBM_sbm$setModel(3) mySBM_sbm <- sbm::SimpleSBM_fit$new(sampler_undirected_nocov$networkData, net <- missSBM:::partlyObservedNetwork$new(sampler_undirected_nocov$networkData) "bernoulli", FALSE) cl <- net$clustering(3)[[1]] mySBM_sbm$optimize(estimOptions = list(verbosity = 0, mySBM_missSBM <- missSBM:::SimpleSBM_fit_noCov$new(net, plot = FALSE)) clusterInit = cl) mySBM_sbm$setModel(3) mySBM_missSBM$doVEM() net <- missSBM:::partlyObservedNetwork$new(sampler_undirected_nocov$networkData) expect_lt(rmse(mySBM_missSBM$connectParam$mean, mySBM_sbm$connectParam$mean), cl <- net$clustering(3)[[1]] 0.05) mySBM_missSBM <- missSBM:::SimpleSBM_fit_noCov$new(net, expect_gt(ARI(mySBM_missSBM$memberships, mySBM_sbm$memberships), clusterInit = cl) 0.95) mySBM_missSBM$doVEM() expect_lt(rmse(mySBM_missSBM$loglik, mySBM_sbm$loglik), 0.01) expect_lt(rmse(mySBM_missSBM$connectParam$mean, mySBM_sbm$connectParam$mean), expect_lt(rmse(mySBM_missSBM$connectParam$mean, sampler_undirected_nocov$connectParam$mean), 0.05) 0.05) expect_gt(ARI(mySBM_missSBM$memberships, mySBM_sbm$memberships), expect_gt(ARI(mySBM_missSBM$memberships, sampler_undirected_nocov$memberships), 0.95) 0.95) expect_lt(rmse(mySBM_missSBM$loglik, mySBM_sbm$loglik), }) 0.01)
expect_lt(rmse(mySBM_missSBM$connectParam$mean, sampler_undirected_nocov$connectParam$mean), 30: 0.05)eval(code, test_env) expect_gt(ARI(mySBM_missSBM$memberships, sampler_undirected_nocov$memberships),
0.95)31: })eval(code, test_env)
30: 32: eval(code, test_env)withCallingHandlers({
eval(code, test_env)31: new_expectations <- the$test_expectations > starting_expectationseval(code, test_env) if (snapshot_skipped) {
skip("On CRAN")32: }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: 36: tryCatchOne(expr, names, parentenv, handlers[[1L]])tryCatch(withCallingHandlers({
eval(code, test_env)35: 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}, 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) {37: snapshot_skipped <<- TRUEdoWithOneRestart(return(expr), restart) invokeRestart("muffle_cran_snapshot")
}, skip = handle_skip, warning = handle_warning, message = handle_message, 38: error = handle_error, interrupt = handle_interrupt), error = handle_fatal)withOneRestart(expr, restarts[[1L]])
37: 39: doWithOneRestart(return(expr), restart)withRestarts(tryCatch(withCallingHandlers({
eval(code, test_env)38: new_expectations <- the$test_expectations > starting_expectationswithOneRestart(expr, restarts[[1L]]) if (snapshot_skipped) {
skip("On CRAN")39: 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), } end_test = function() {}, snapshot_on_cran = function(cnd) { }) snapshot_skipped <<- TRUE
invokeRestart("muffle_cran_snapshot")40: }, skip = handle_skip, warning = handle_warning, message = handle_message, test_code(code = exprs, env = env, reporter = get_reporter() %||% error = handle_error, interrupt = handle_interrupt), error = handle_fatal), StopReporter$new()) end_test = function() {
})41:
source_file(path, env = env(env), desc = desc, shuffle = shuffle, 40: error_call = error_call)test_code(code = exprs, env = env, reporter = get_reporter() %||%
StopReporter$new())42:
FUN(X[[i]], ...)41:
source_file(path, env = env(env), desc = desc, shuffle = shuffle, 43: error_call = error_call)lapply(test_paths, test_one_file, env = env, desc = desc, shuffle = shuffle,
error_call = error_call)42:
FUN(X[[i]], ...)44:
doTryCatch(return(expr), name, parentenv, handler)43:
lapply(test_paths, test_one_file, env = env, desc = desc, shuffle = shuffle, 45: error_call = error_call)tryCatchOne(expr, names, parentenv, handlers[[1L]])
44: 46: doTryCatch(return(expr), name, parentenv, handler)tryCatchList(expr, classes, parentenv, handlers)
45: 47: tryCatchOne(expr, names, parentenv, handlers[[1L]])tryCatch(code, testthat_abort_reporter = function(cnd) {
cat(conditionMessage(cnd), "\n")46: NULLtryCatchList(expr, classes, parentenv, handlers)})
47: 48: tryCatch(code, testthat_abort_reporter = function(cnd) {with_reporter(reporters$multi, lapply(test_paths, test_one_file, cat(conditionMessage(cnd), "\n") env = env, desc = desc, shuffle = shuffle, error_call = error_call)) NULL
})49:
test_files_serial(test_dir = test_dir, test_package = test_package, 48: test_paths = test_paths, load_helpers = load_helpers, reporter = reporter, with_reporter(reporters$multi, lapply(test_paths, test_one_file, env = env, stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning, env = env, desc = desc, shuffle = shuffle, error_call = error_call)) desc = desc, load_package = load_package, shuffle = shuffle,
error_call = error_call)49:
test_files_serial(test_dir = test_dir, test_package = test_package, 50: test_paths = test_paths, load_helpers = load_helpers, reporter = reporter, test_files(test_dir = path, test_paths = test_paths, test_package = package, env = env, stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning, reporter = reporter, load_helpers = load_helpers, env = env, desc = desc, load_package = load_package, shuffle = shuffle, stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning, error_call = error_call) load_package = load_package, parallel = parallel, shuffle = shuffle)
50: 51: test_files(test_dir = path, test_paths = test_paths, test_package = package, test_dir("testthat", package = package, reporter = reporter, reporter = reporter, load_helpers = load_helpers, env = env, ..., load_package = "installed") stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning,
load_package = load_package, parallel = parallel, shuffle = shuffle)52:
test_check("missSBM")51:
test_dir("testthat", package = package, reporter = reporter, An irrecoverable exception occurred. R is aborting now ...
..., 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)
Traceback:
1: new_expectations <- the$test_expectations > starting_expectationsdispatcher(membership_name, membership_init$to_cc(), model_name, .self$network_to_cc(), TRUE) if (snapshot_skipped) {
skip("On CRAN") 2: }FUN(X[[i]], ...) else if (!new_expectations && skip_on_empty) {
3: skip_empty()lapply(X = S, FUN = FUN, ...) }
}, expectation = handle_expectation, packageNotFoundError = function(e) { 4: if (on_cran()) { skip(paste0("{", e$package, "} is not installed."))doTryCatch(return(expr), name, parentenv, handler)
} 5: }, snapshot_on_cran = function(cnd) { snapshot_skipped <<- TRUEtryCatchOne(expr, names, parentenv, handlers[[1L]]) invokeRestart("muffle_cran_snapshot")
6: }, skip = handle_skip, warning = handle_warning, message = handle_message, tryCatchList(expr, classes, parentenv, handlers)
error = handle_error, interrupt = handle_interrupt), error = handle_fatal)
7: tryCatch(expr, error = function(e) {25: doWithOneRestart(return(expr), restart) call <- conditionCall(e)
if (!is.null(call)) {26: if (identical(call[[1L]], quote(doTryCatch))) withOneRestart(expr, restarts[[1L]]) call <- sys.call(-4L)
27: dcall <- deparse(call, nlines = 1L) prefix <- paste("Error in", dcall, ": ")withRestarts(tryCatch(withCallingHandlers({ eval(code, test_env) LONG <- 75L sm <- strsplit(conditionMessage(e), "\n")[[1L]] new_expectations <- the$test_expectations > starting_expectations w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w") if (snapshot_skipped) { skip("On CRAN") if (is.na(w)) } else if (!new_expectations && skip_on_empty) { w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L], type = "b") skip_empty() } if (w > LONG) }, expectation = handle_expectation, packageNotFoundError = function(e) { prefix <- paste0(prefix, "\n ") if (on_cran()) { } else prefix <- "Error : " skip(paste0("{", e$package, "} is not installed.")) } msg <- paste0(prefix, conditionMessage(e), "\n") .Internal(seterrmessage(msg[1L]))}, snapshot_on_cran = function(cnd) { snapshot_skipped <<- TRUE invokeRestart("muffle_cran_snapshot") if (!silent && isTRUE(getOption("show.error.messages"))) {}, skip = handle_skip, warning = handle_warning, message = handle_message, error = handle_error, interrupt = handle_interrupt), error = handle_fatal), cat(msg, file = outFile) end_test = function() { .Internal(printDeferredWarnings()) }) }
invisible(structure(msg, class = "try-error", condition = e))28: })test_code(code, parent.frame())
8: 29: try(lapply(X = S, FUN = FUN, ...), silent = TRUE)test_that("SimpleSBM_fit 'Bernoulli' model, directed, no covariate",
{ 9: sampler_directed_nocov$rNetwork(store = TRUE)sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE)) mySBM_sbm <- sbm::SimpleSBM_fit$new(sampler_directed_nocov$networkData,
"bernoulli", TRUE)10: mySBM_sbm$optimize(estimOptions = list(verbosity = 0, FUN(X[[i]], ...) plot = FALSE))
mySBM_sbm$setModel(3)11: net <- missSBM:::partlyObservedNetwork$new(sampler_directed_nocov$networkData)lapply(seq_len(cores), inner.do) cl <- net$clustering(3)[[1]]
mySBM_missSBM <- missSBM:::SimpleSBM_fit_noCov$new(sampler_directed_nocov$networkData, 12: clusterInit = cl)parallel::mclapply(X, FUN, ..., mc.cores = mc.cores, mc.set.seed = FALSE, mySBM_missSBM$doVEM() mc.silent = TRUE) expect_lt(rmse(mySBM_missSBM$connectParam$mean, mySBM_sbm$connectParam$mean),
0.1)13: expect_gt(ARI(mySBM_missSBM$memberships, mySBM_sbm$memberships), parallel_lapply(inits, .self$do_one_estim, mc.cores = ncores, 0.95) verbose = (verbosity > 4)) expect_lt(rmse(mySBM_missSBM$loglik, mySBM_sbm$loglik),
0.01)14: expect_lt(rmse(mySBM_missSBM$connectParam$mean, sampler_directed_nocov$connectParam$mean), .self$do_with_inits(inits, Q, reinitialization_effort) 0.1)
expect_lt(rmse(mySBM_missSBM$covarParam, sampler_directed_cov$covarParam), 15: 0.2).self$estim_ascend(reinitialization_effort, changing_effort) expect_gt(ARI(mySBM_missSBM$memberships, sampler_directed_nocov$memberships),
0.95)16: })private$BMobject$estimate()
30: 17: eval(code, test_env)mySBM_sbm$optimize(estimOptions = list(verbosity = 0, plot = FALSE))
31: 18: eval(code, test_env)eval(code, test_env)
32: 19: withCallingHandlers({eval(code, test_env) eval(code, test_env)
new_expectations <- the$test_expectations > starting_expectations20: if (snapshot_skipped) {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) { error = handle_error, interrupt = handle_interrupt) snapshot_skipped <<- TRUE invokeRestart("muffle_cran_snapshot")}, skip = handle_skip, warning = handle_warning, message = handle_message,
error = handle_error, interrupt = handle_interrupt)33:
21: doTryCatch(return(expr), name, parentenv, handler)
doTryCatch(return(expr), name, parentenv, handler)
34: 22: tryCatchOne(expr, names, parentenv, handlers[[1L]])tryCatchOne(expr, names, parentenv, handlers[[1L]])
23: 35: tryCatchList(expr, classes, parentenv, handlers)tryCatchList(expr, classes, parentenv, handlers)
24: 36: tryCatch(withCallingHandlers({tryCatch(withCallingHandlers({ eval(code, test_env) new_expectations <- the$test_expectations > starting_expectations eval(code, test_env) 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) { 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)
25: 37: doWithOneRestart(return(expr), restart)doWithOneRestart(return(expr), restart)
26: 38: withOneRestart(expr, restarts[[1L]])
withOneRestart(expr, restarts[[1L]])27:
withRestarts(tryCatch(withCallingHandlers({39: 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()) { skip(paste0("{", e$package, "} is not installed.")) if (on_cran()) { 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() { })
})
40: 28: test_code(code = exprs, env = env, reporter = get_reporter() %||% test_code(code, parent.frame()) StopReporter$new())
29: 41: test_that("SimpleSBM_fit 'Bernoulli' model, directed, no covariate", {source_file(path, env = env(env), desc = desc, shuffle = shuffle, error_call = error_call) 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, 42: FUN(X[[i]], ...) plot = FALSE)) mySBM_sbm$setModel(3)
net <- missSBM:::partlyObservedNetwork$new(sampler_directed_nocov$networkData)43: cl <- net$clustering(3)[[1]]lapply(test_paths, test_one_file, env = env, desc = desc, shuffle = shuffle, mySBM_missSBM <- missSBM:::SimpleSBM_fit_noCov$new(sampler_directed_nocov$networkData, error_call = error_call) clusterInit = cl)
44: mySBM_missSBM$doVEM() expect_lt(rmse(mySBM_missSBM$connectParam$mean, mySBM_sbm$connectParam$mean), doTryCatch(return(expr), name, parentenv, handler) 0.1)
45: expect_gt(ARI(mySBM_missSBM$memberships, mySBM_sbm$memberships), tryCatchOne(expr, names, parentenv, handlers[[1L]]) 0.95)
expect_lt(rmse(mySBM_missSBM$loglik, mySBM_sbm$loglik), 46: tryCatchList(expr, classes, parentenv, handlers) 0.01) expect_lt(rmse(mySBM_missSBM$connectParam$mean, sampler_directed_nocov$connectParam$mean),
0.1)47: tryCatch(code, testthat_abort_reporter = function(cnd) { expect_lt(rmse(mySBM_missSBM$covarParam, sampler_directed_cov$covarParam), 0.2) cat(conditionMessage(cnd), "\n") expect_gt(ARI(mySBM_missSBM$memberships, sampler_directed_nocov$memberships), NULL 0.95)}) })
48: 30: eval(code, test_env)with_reporter(reporters$multi, lapply(test_paths, test_one_file,
env = env, desc = desc, shuffle = shuffle, error_call = error_call))31:
eval(code, test_env)
49: 32: withCallingHandlers({test_files_serial(test_dir = test_dir, test_package = test_package, eval(code, test_env) new_expectations <- the$test_expectations > starting_expectations test_paths = test_paths, load_helpers = load_helpers, reporter = reporter, env = env, stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning, if (snapshot_skipped) { skip("On CRAN") desc = desc, load_package = load_package, shuffle = shuffle, } error_call = error_call)
else if (!new_expectations && skip_on_empty) { skip_empty()50: }test_files(test_dir = path, test_paths = test_paths, test_package = package, }, expectation = handle_expectation, packageNotFoundError = function(e) { reporter = reporter, load_helpers = load_helpers, env = env, stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning, if (on_cran()) { skip(paste0("{", e$package, "} is not installed.")) load_package = load_package, parallel = parallel, shuffle = shuffle) }
}, snapshot_on_cran = function(cnd) { snapshot_skipped <<- TRUE51: test_dir("testthat", package = package, reporter = reporter, invokeRestart("muffle_cran_snapshot") ..., load_package = "installed")
}, skip = handle_skip, warning = handle_warning, message = handle_message, error = handle_error, interrupt = handle_interrupt)52: test_check("missSBM")
33:
doTryCatch(return(expr), name, parentenv, handler)An irrecoverable exception occurred. R is aborting now ...
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