Last updated on 2026-11-21 00:52:24 CET.
| Flavor | Version | Tinstall | Tcheck | Ttotal | Status | Flags |
|---|---|---|---|---|---|---|
| r-devel-linux-x86_64-debian-clang | 1.1.0 | 79.64 | 381.25 | 460.89 | OK | |
| r-devel-linux-x86_64-debian-gcc | 1.1.0 | 57.00 | 269.09 | 326.09 | OK | |
| r-devel-linux-x86_64-fedora-clang | 1.1.0 | 66.00 | 274.28 | 340.28 | OK | |
| r-devel-linux-x86_64-fedora-gcc | 1.1.0 | 63.00 | 262.15 | 325.15 | OK | |
| r-devel-windows-x86_64 | 1.1.0 | 91.00 | 459.00 | 550.00 | OK | |
| r-patched-linux-x86_64 | 1.1.0 | 88.83 | 361.66 | 450.49 | OK | |
| r-release-linux-x86_64 | 1.1.0 | 81.91 | 363.09 | 445.00 | 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 | 103.00 | 374.00 | 477.00 | OK | |
| r-oldrel-macos-arm64 | 1.1.0 | 20.00 | 87.00 | 107.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 | 525.00 | 638.00 | OK |
Version: 1.1.0
Check: tests
Result: ERROR
Running ‘spelling.R’ [0s/0s]
Running ‘testthat.R’ [36s/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)
Traceback:
7: 1: tryCatch(expr, error = function(e) {dispatcher(membership_name, membership_init$to_cc(), model_name, call <- conditionCall(e) .self$network_to_cc(), TRUE) if (!is.null(call)) {
if (identical(call[[1L]], quote(doTryCatch))) 2: call <- sys.call(-4L)FUN(X[[i]], ...) dcall <- deparse(call, nlines = 1L)
prefix <- paste("Error in", dcall, ": ") 3: LONG <- 75Llapply(X = S, FUN = FUN, ...) sm <- strsplit(conditionMessage(e), "\n")[[1L]]
w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w") 4: if (is.na(w)) w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L], doTryCatch(return(expr), name, parentenv, handler) type = "b")
if (w > LONG) 5: prefix <- paste0(prefix, "\n ")tryCatchOne(expr, names, parentenv, handlers[[1L]]) }
else prefix <- "Error : " 6: msg <- paste0(prefix, conditionMessage(e), "\n")tryCatchList(expr, classes, parentenv, handlers) .Internal(seterrmessage(msg[1L]))
if (!silent && isTRUE(getOption("show.error.messages"))) { 7: tryCatch(expr, error = function(e) { cat(msg, file = outFile) call <- conditionCall(e) .Internal(printDeferredWarnings()) if (!is.null(call)) { } if (identical(call[[1L]], quote(doTryCatch))) invisible(structure(msg, class = "try-error", condition = e)) call <- sys.call(-4L)}) dcall <- deparse(call, nlines = 1L)
prefix <- paste("Error in", dcall, ": ") 8: LONG <- 75Ltry(lapply(X = S, FUN = FUN, ...), silent = TRUE) sm <- strsplit(conditionMessage(e), "\n")[[1L]]
w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w") 9: if (is.na(w)) sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE)) w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L], type = "b")
if (w > LONG) 10: prefix <- paste0(prefix, "\n ")FUN(X[[i]], ...) }
else prefix <- "Error : "11: msg <- paste0(prefix, conditionMessage(e), "\n")lapply(seq_len(cores), inner.do) .Internal(seterrmessage(msg[1L]))
if (!silent && isTRUE(getOption("show.error.messages"))) {12: cat(msg, file = outFile)parallel::mclapply(X, FUN, ..., mc.cores = mc.cores, mc.set.seed = FALSE, .Internal(printDeferredWarnings()) 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:
.self$estim_ascend(reinitialization_effort, changing_effort)10:
FUN(X[[i]], ...)16:
private$BMobject$estimate()11:
lapply(seq_len(cores), inner.do)17:
mySBM_sbm$optimize(estimOptions = list(verbosity = 0, plot = FALSE))12:
parallel::mclapply(X, FUN, ..., mc.cores = mc.cores, mc.set.seed = FALSE, 18: mc.silent = TRUE)eval(code, test_env)
13: 19: parallel_lapply(inits, .self$do_one_estim, mc.cores = ncores, eval(code, test_env) verbose = (verbosity > 4))
20: 14: withCallingHandlers({.self$do_with_inits(inits, Q, reinitialization_effort) eval(code, test_env)
new_expectations <- the$test_expectations > starting_expectations15: if (snapshot_skipped) {.self$estim_ascend(reinitialization_effort, changing_effort) skip("On CRAN")
}16: else if (!new_expectations && skip_on_empty) {private$BMobject$estimate() skip_empty()
}17: }, expectation = handle_expectation, packageNotFoundError = function(e) {mySBM_sbm$optimize(estimOptions = list(verbosity = 0, plot = FALSE)) if (on_cran()) {
skip(paste0("{", e$package, "} is not installed."))18: }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)
20: 21: withCallingHandlers({doTryCatch(return(expr), name, parentenv, handler) eval(code, test_env)
new_expectations <- the$test_expectations > starting_expectations22: if (snapshot_skipped) {tryCatchOne(expr, names, parentenv, handlers[[1L]]) skip("On CRAN")
}23: else if (!new_expectations && skip_on_empty) {tryCatchList(expr, classes, parentenv, handlers) skip_empty()
}24: }, expectation = handle_expectation, packageNotFoundError = function(e) {tryCatch(withCallingHandlers({ if (on_cran()) { eval(code, test_env) skip(paste0("{", e$package, "} is not installed.")) new_expectations <- the$test_expectations > starting_expectations } if (snapshot_skipped) {}, snapshot_on_cran = function(cnd) { skip("On CRAN") snapshot_skipped <<- TRUE } else if (!new_expectations && skip_on_empty) { invokeRestart("muffle_cran_snapshot") skip_empty()}, skip = handle_skip, warning = handle_warning, message = handle_message, } error = handle_error, interrupt = handle_interrupt)}, expectation = handle_expectation, packageNotFoundError = function(e) {
if (on_cran()) {21: skip(paste0("{", e$package, "} is not installed."))doTryCatch(return(expr), name, parentenv, handler) }
}, snapshot_on_cran = function(cnd) {22: snapshot_skipped <<- TRUEtryCatchOne(expr, names, parentenv, handlers[[1L]]) invokeRestart("muffle_cran_snapshot")
}, skip = handle_skip, warning = handle_warning, message = handle_message, 23: error = handle_error, interrupt = handle_interrupt), error = handle_fatal)tryCatchList(expr, classes, parentenv, handlers)
25: doWithOneRestart(return(expr), restart)
26: 24: withOneRestart(expr, restarts[[1L]])tryCatch(withCallingHandlers({
eval(code, test_env) new_expectations <- the$test_expectations > starting_expectations27: if (snapshot_skipped) {withRestarts(tryCatch(withCallingHandlers({ skip("On CRAN") eval(code, test_env) } new_expectations <- the$test_expectations > starting_expectations else if (!new_expectations && skip_on_empty) { if (snapshot_skipped) { skip_empty() skip("On CRAN") } }}, expectation = handle_expectation, packageNotFoundError = function(e) { else if (!new_expectations && skip_on_empty) { if (on_cran()) { skip_empty() skip(paste0("{", e$package, "} is not installed.")) } }}, expectation = handle_expectation, packageNotFoundError = function(e) {}, snapshot_on_cran = function(cnd) { if (on_cran()) { snapshot_skipped <<- TRUE skip(paste0("{", e$package, "} is not installed.")) invokeRestart("muffle_cran_snapshot") }}, skip = handle_skip, warning = handle_warning, message = handle_message, }, snapshot_on_cran = function(cnd) { error = handle_error, interrupt = handle_interrupt), error = handle_fatal) snapshot_skipped <<- TRUE
invokeRestart("muffle_cran_snapshot")25: }, skip = handle_skip, warning = handle_warning, message = handle_message, doWithOneRestart(return(expr), restart) error = handle_error, interrupt = handle_interrupt), error = handle_fatal),
end_test = function() {26: })withOneRestart(expr, restarts[[1L]])
27: 28: withRestarts(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)) mySBM_sbm$setModel(Q) if (on_cran()) { net <- missSBM:::partlyObservedNetwork$new(sampler_undirected_cov$networkData, skip(paste0("{", e$package, "} is not installed.")) } covariates = covarList_undirected)}, snapshot_on_cran = function(cnd) { cls <- net$clustering(1:(2 * Q)) cl <- cls[[Q]] snapshot_skipped <<- TRUE mySBM_missSBM <- missSBM:::SimpleSBM_fit_withCov$new(net, invokeRestart("muffle_cran_snapshot") clusterInit = cl, covarList = covarList_undirected)}, skip = handle_skip, warning = handle_warning, message = handle_message, mySBM_missSBM$doVEM() expect_lt(rmse(mySBM_missSBM$connectParam$mean, mySBM_sbm$connectParam$mean), error = handle_error, interrupt = handle_interrupt), error = handle_fatal), 0.05) end_test = function() { expect_gt(ARI(mySBM_missSBM$memberships, mySBM_sbm$memberships), }) 0.8)
expect_lt(rmse(mySBM_missSBM$loglik, mySBM_sbm$loglik), 28: 0.01)test_code(code, parent.frame()) expect_lt(rmse(mySBM_missSBM$connectParam$mean, sampler_undirected_cov$connectParam$mean),
0.1)29: expect_lt(rmse(mySBM_missSBM$covarParam, sampler_undirected_cov$covarParam), test_that("SimpleSBM_fit 'Bernoulli' model, undirected, one covariate", 0.1) { expect_gt(ARI(mySBM_missSBM$memberships, sampler_undirected_cov$memberships), sampler_undirected_cov$rNetwork(store = TRUE) 0.85) mySBM_sbm <- sbm::SimpleSBM_fit$new(sampler_undirected_cov$networkData, }) "bernoulli", FALSE, covarList = covarList_undirected)
mySBM_sbm$optimize(estimOptions = list(verbosity = 0, 30: plot = FALSE))eval(code, test_env) mySBM_sbm$setModel(Q)
net <- missSBM:::partlyObservedNetwork$new(sampler_undirected_cov$networkData, 31: covariates = covarList_undirected)eval(code, test_env) cls <- net$clustering(1:(2 * Q))
cl <- cls[[Q]]32: mySBM_missSBM <- missSBM:::SimpleSBM_fit_withCov$new(net, 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)eval(code, test_env)
33: 31: doTryCatch(return(expr), name, parentenv, handler)eval(code, test_env)
34: 32: tryCatchOne(expr, names, parentenv, handlers[[1L]])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) }
}, 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)tryCatchOne(expr, names, parentenv, handlers[[1L]])
37: doWithOneRestart(return(expr), restart)35:
tryCatchList(expr, classes, parentenv, handlers)38:
withOneRestart(expr, restarts[[1L]])36:
tryCatch(withCallingHandlers({39: eval(code, test_env)withRestarts(tryCatch(withCallingHandlers({ new_expectations <- the$test_expectations > starting_expectations eval(code, test_env) if (snapshot_skipped) { new_expectations <- the$test_expectations > starting_expectations skip("On CRAN") if (snapshot_skipped) { } skip("On CRAN") else if (!new_expectations && skip_on_empty) { } skip_empty() else if (!new_expectations && skip_on_empty) { } skip_empty()}, expectation = handle_expectation, packageNotFoundError = function(e) { } if (on_cran()) {}, expectation = handle_expectation, packageNotFoundError = function(e) { skip(paste0("{", e$package, "} is not installed.")) if (on_cran()) { } skip(paste0("{", e$package, "} is not installed."))}, snapshot_on_cran = function(cnd) { } snapshot_skipped <<- TRUE}, snapshot_on_cran = function(cnd) { invokeRestart("muffle_cran_snapshot") snapshot_skipped <<- TRUE}, skip = handle_skip, warning = handle_warning, message = handle_message, invokeRestart("muffle_cran_snapshot") error = handle_error, interrupt = handle_interrupt), error = handle_fatal)}, skip = handle_skip, warning = handle_warning, message = handle_message,
error = handle_error, interrupt = handle_interrupt), error = handle_fatal), 37: end_test = function() {doWithOneRestart(return(expr), restart) })
38: 40: withOneRestart(expr, restarts[[1L]])test_code(code = exprs, env = env, reporter = get_reporter() %||%
StopReporter$new())39:
withRestarts(tryCatch(withCallingHandlers({41: eval(code, test_env)source_file(path, env = env(env), desc = desc, shuffle = shuffle, new_expectations <- the$test_expectations > starting_expectations error_call = error_call) if (snapshot_skipped) { skip("On CRAN") } else if (!new_expectations && skip_on_empty) {
skip_empty()42: FUN(X[[i]], ...) }
}, expectation = handle_expectation, packageNotFoundError = function(e) { if (on_cran()) {43: skip(paste0("{", e$package, "} is not installed."))lapply(test_paths, test_one_file, env = env, desc = desc, shuffle = shuffle, } error_call = error_call)}, snapshot_on_cran = function(cnd) {
snapshot_skipped <<- TRUE44: 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), 45: end_test = function() {tryCatchOne(expr, names, parentenv, handlers[[1L]]) })
40: 46: test_code(code = exprs, env = env, reporter = get_reporter() %||% tryCatchList(expr, classes, parentenv, handlers) StopReporter$new())
47: 41: tryCatch(code, testthat_abort_reporter = function(cnd) {source_file(path, env = env(env), desc = desc, shuffle = shuffle, cat(conditionMessage(cnd), "\n") error_call = error_call) NULL
})42:
FUN(X[[i]], ...)48:
with_reporter(reporters$multi, lapply(test_paths, test_one_file, 43: env = env, desc = desc, shuffle = shuffle, error_call = error_call))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, 44: test_paths = test_paths, load_helpers = load_helpers, reporter = reporter, doTryCatch(return(expr), name, parentenv, handler) env = env, stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning,
desc = desc, load_package = load_package, shuffle = shuffle, 45: error_call = error_call)tryCatchOne(expr, names, parentenv, handlers[[1L]])
50: 46: test_files(test_dir = path, test_paths = test_paths, test_package = package, tryCatchList(expr, classes, parentenv, handlers) reporter = reporter, load_helpers = load_helpers, env = env,
stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning, 47: load_package = load_package, parallel = parallel, shuffle = shuffle)tryCatch(code, testthat_abort_reporter = function(cnd) {
cat(conditionMessage(cnd), "\n")51: NULLtest_dir("testthat", package = package, reporter = reporter, }) ..., load_package = "installed")
48: 52: with_reporter(reporters$multi, lapply(test_paths, test_one_file, test_check("missSBM") env = env, desc = desc, shuffle = shuffle, error_call = error_call))
An irrecoverable exception occurred. R is aborting now ...
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 ") }
Traceback:
else prefix <- "Error : " 1: msg <- paste0(prefix, conditionMessage(e), "\n")dispatcher(membership_name, membership_init$to_cc(), model_name, .Internal(seterrmessage(msg[1L])) .self$network_to_cc(), TRUE) if (!silent && isTRUE(getOption("show.error.messages"))) {
cat(msg, file = outFile) 2: .Internal(printDeferredWarnings()) }FUN(X[[i]], ...) invisible(structure(msg, class = "try-error", condition = e))
}) 3: lapply(X = S, FUN = FUN, ...)
4: doTryCatch(return(expr), name, parentenv, handler) 8:
try(lapply(X = S, FUN = FUN, ...), silent = TRUE) 5:
tryCatchOne(expr, names, parentenv, handlers[[1L]]) 9:
sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE)) 6:
tryCatchList(expr, classes, parentenv, handlers)
10: 7: FUN(X[[i]], ...)tryCatch(expr, error = function(e) {
call <- conditionCall(e)11: if (!is.null(call)) { if (identical(call[[1L]], quote(doTryCatch))) lapply(seq_len(cores), inner.do) call <- sys.call(-4L)
12: dcall <- deparse(call, nlines = 1L)parallel::mclapply(X, FUN, ..., mc.cores = mc.cores, mc.set.seed = FALSE, prefix <- paste("Error in", dcall, ": ") mc.silent = TRUE) LONG <- 75L
sm <- strsplit(conditionMessage(e), "\n")[[1L]]13: w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w") if (is.na(w)) parallel_lapply(inits, .self$do_one_estim, mc.cores = ncores, verbose = (verbosity > 4)) w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L],
14: .self$do_with_inits(inits, Q, reinitialization_effort) type = "b")
if (w > LONG) 15: prefix <- paste0(prefix, "\n ").self$estim_ascend(reinitialization_effort, changing_effort)
}16: else prefix <- "Error : "private$BMobject$estimate() msg <- paste0(prefix, conditionMessage(e), "\n")
17: .Internal(seterrmessage(msg[1L]))mySBM_sbm$optimize(estimOptions = list(verbosity = 0, plot = FALSE)) if (!silent && isTRUE(getOption("show.error.messages"))) {
cat(msg, file = outFile)18: eval(code, test_env) .Internal(printDeferredWarnings())
}19: invisible(structure(msg, class = "try-error", condition = e))eval(code, test_env)})
20: 8: withCallingHandlers({try(lapply(X = S, FUN = FUN, ...), silent = TRUE) eval(code, test_env)
new_expectations <- the$test_expectations > starting_expectations 9: if (snapshot_skipped) {sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE)) skip("On CRAN")
}10: else if (!new_expectations && skip_on_empty) {FUN(X[[i]], ...) skip_empty() }
11: }, expectation = handle_expectation, packageNotFoundError = function(e) {lapply(seq_len(cores), inner.do) if (on_cran()) {
skip(paste0("{", e$package, "} is not installed."))12: }parallel::mclapply(X, FUN, ..., mc.cores = mc.cores, mc.set.seed = FALSE, }, snapshot_on_cran = function(cnd) { mc.silent = TRUE) snapshot_skipped <<- TRUE invokeRestart("muffle_cran_snapshot")
}, skip = handle_skip, warning = handle_warning, message = handle_message, 13: error = handle_error, interrupt = handle_interrupt)parallel_lapply(inits, .self$do_one_estim, mc.cores = ncores,
verbose = (verbosity > 4))21:
doTryCatch(return(expr), name, parentenv, handler)14: .self$do_with_inits(inits, Q, reinitialization_effort)
22: 15: .self$estim_ascend(reinitialization_effort, changing_effort)tryCatchOne(expr, names, parentenv, handlers[[1L]])
16: 23: private$BMobject$estimate()tryCatchList(expr, classes, parentenv, handlers)
24: 17: tryCatch(withCallingHandlers({mySBM_sbm$optimize(estimOptions = list(verbosity = 0, plot = FALSE)) eval(code, test_env)
new_expectations <- the$test_expectations > starting_expectations18: if (snapshot_skipped) {eval(code, test_env)
skip("On CRAN")19: }eval(code, test_env) else if (!new_expectations && skip_on_empty) {
20: 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") } } 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, error = handle_error, interrupt = handle_interrupt), error = handle_fatal) if (on_cran()) {
25: skip(paste0("{", e$package, "} is not installed."))doWithOneRestart(return(expr), restart) }
}, snapshot_on_cran = function(cnd) {26: snapshot_skipped <<- TRUEwithOneRestart(expr, restarts[[1L]]) invokeRestart("muffle_cran_snapshot")
}, skip = handle_skip, warning = handle_warning, message = handle_message, 27: error = handle_error, interrupt = handle_interrupt)withRestarts(tryCatch(withCallingHandlers({ eval(code, test_env)
new_expectations <- the$test_expectations > starting_expectations21: if (snapshot_skipped) { skip("On CRAN")doTryCatch(return(expr), name, parentenv, handler) } else if (!new_expectations && skip_on_empty) {
skip_empty() }22: }, expectation = handle_expectation, packageNotFoundError = function(e) {tryCatchOne(expr, names, parentenv, handlers[[1L]]) if (on_cran()) {
skip(paste0("{", e$package, "} is not installed.")) }23: }, snapshot_on_cran = function(cnd) {tryCatchList(expr, classes, parentenv, handlers) snapshot_skipped <<- TRUE
invokeRestart("muffle_cran_snapshot")}, skip = handle_skip, warning = handle_warning, message = handle_message, 24: error = handle_error, interrupt = handle_interrupt), error = handle_fatal), tryCatch(withCallingHandlers({ end_test = function() { eval(code, test_env) })
new_expectations <- the$test_expectations > starting_expectations28: if (snapshot_skipped) {test_code(code, parent.frame()) skip("On CRAN") }
else if (!new_expectations && skip_on_empty) {29: test_that("SimpleSBM_fit 'Bernoulli' model, directed, one covariate", { skip_empty() sampler_directed_cov$rNetwork(store = TRUE) } mySBM_sbm <- sbm::SimpleSBM_fit$new(sampler_directed_cov$networkData, }, expectation = handle_expectation, packageNotFoundError = function(e) { "bernoulli", TRUE, covarList = covarList_directed) if (on_cran()) { mySBM_sbm$optimize(estimOptions = list(verbosity = 0, skip(paste0("{", e$package, "} is not installed.")) plot = FALSE)) } mySBM_sbm$setModel(Q)}, snapshot_on_cran = function(cnd) { net <- missSBM:::partlyObservedNetwork$new(sampler_directed_cov$networkData, snapshot_skipped <<- TRUE covariates = covarList_directed) invokeRestart("muffle_cran_snapshot") cls <- net$clustering(1:(2 * Q))}, skip = handle_skip, warning = handle_warning, message = handle_message, cl <- cls[[Q]] error = handle_error, interrupt = handle_interrupt), error = handle_fatal) mySBM_missSBM <- missSBM:::SimpleSBM_fit_withCov$new(net,
clusterInit = cl, covarList = covarList_directed)25: doWithOneRestart(return(expr), restart) mySBM_missSBM$doVEM(trace = TRUE)
expect_lt(rmse(mySBM_missSBM$connectParam$mean, mySBM_sbm$connectParam$mean), 26: 0.1)withOneRestart(expr, restarts[[1L]]) expect_gt(ARI(mySBM_missSBM$memberships, mySBM_sbm$memberships),
0.8)27: expect_lt(rmse(mySBM_missSBM$loglik, mySBM_sbm$loglik), withRestarts(tryCatch(withCallingHandlers({ 0.05) eval(code, test_env) expect_lt(rmse(mySBM_missSBM$connectParam$mean, sampler_directed_cov$connectParam$mean), new_expectations <- the$test_expectations > starting_expectations if (snapshot_skipped) { 0.1) skip("On CRAN") expect_gt(ARI(mySBM_missSBM$memberships, sampler_directed_cov$memberships), } 0.85) else if (!new_expectations && skip_on_empty) { }) skip_empty()
}}, expectation = handle_expectation, packageNotFoundError = function(e) { if (on_cran()) {30: skip(paste0("{", e$package, "} is not installed."))eval(code, test_env) }
}, snapshot_on_cran = function(cnd) {31: snapshot_skipped <<- TRUEeval(code, test_env)
invokeRestart("muffle_cran_snapshot")}, skip = handle_skip, warning = handle_warning, message = handle_message, error = handle_error, interrupt = handle_interrupt), error = handle_fatal), end_test = function() { })32:
withCallingHandlers({28: eval(code, test_env)test_code(code, parent.frame()) new_expectations <- the$test_expectations > starting_expectations
if (snapshot_skipped) {29: skip("On CRAN") }test_that("SimpleSBM_fit 'Bernoulli' model, directed, one covariate", else if (!new_expectations && skip_on_empty) { { skip_empty() sampler_directed_cov$rNetwork(store = TRUE) } mySBM_sbm <- sbm::SimpleSBM_fit$new(sampler_directed_cov$networkData, }, expectation = handle_expectation, packageNotFoundError = function(e) { "bernoulli", TRUE, covarList = covarList_directed) if (on_cran()) { mySBM_sbm$optimize(estimOptions = list(verbosity = 0, skip(paste0("{", e$package, "} is not installed.")) plot = FALSE)) } mySBM_sbm$setModel(Q)}, snapshot_on_cran = function(cnd) { net <- missSBM:::partlyObservedNetwork$new(sampler_directed_cov$networkData, snapshot_skipped <<- TRUE covariates = covarList_directed) invokeRestart("muffle_cran_snapshot") cls <- net$clustering(1:(2 * Q)) cl <- cls[[Q]]}, skip = handle_skip, warning = handle_warning, message = handle_message, mySBM_missSBM <- missSBM:::SimpleSBM_fit_withCov$new(net, clusterInit = cl, covarList = covarList_directed) error = handle_error, interrupt = handle_interrupt) mySBM_missSBM$doVEM(trace = TRUE) expect_lt(rmse(mySBM_missSBM$connectParam$mean, mySBM_sbm$connectParam$mean),
0.1)33: expect_gt(ARI(mySBM_missSBM$memberships, mySBM_sbm$memberships), doTryCatch(return(expr), name, parentenv, handler) 0.8)
expect_lt(rmse(mySBM_missSBM$loglik, mySBM_sbm$loglik), 34: 0.05)tryCatchOne(expr, names, parentenv, handlers[[1L]]) expect_lt(rmse(mySBM_missSBM$connectParam$mean, sampler_directed_cov$connectParam$mean),
0.1)35: expect_gt(ARI(mySBM_missSBM$memberships, sampler_directed_cov$memberships), tryCatchList(expr, classes, parentenv, handlers) 0.85)
})36:
tryCatch(withCallingHandlers({30: eval(code, test_env) new_expectations <- the$test_expectations > starting_expectationseval(code, test_env) if (snapshot_skipped) {
skip("On CRAN")31: }eval(code, test_env) else if (!new_expectations && skip_on_empty) {
skip_empty()32: }withCallingHandlers({}, expectation = handle_expectation, packageNotFoundError = function(e) { eval(code, test_env) if (on_cran()) { skip(paste0("{", e$package, "} is not installed.")) new_expectations <- the$test_expectations > starting_expectations } if (snapshot_skipped) {}, snapshot_on_cran = function(cnd) { skip("On CRAN") snapshot_skipped <<- TRUE } invokeRestart("muffle_cran_snapshot") else if (!new_expectations && skip_on_empty) { skip_empty()}, skip = handle_skip, warning = handle_warning, message = handle_message, } error = handle_error, interrupt = handle_interrupt), error = handle_fatal)}, expectation = handle_expectation, packageNotFoundError = function(e) {
if (on_cran()) {37: skip(paste0("{", e$package, "} is not installed."))doWithOneRestart(return(expr), restart) }
}, snapshot_on_cran = function(cnd) {38: snapshot_skipped <<- TRUEwithOneRestart(expr, restarts[[1L]]) invokeRestart("muffle_cran_snapshot")
}, skip = handle_skip, warning = handle_warning, message = handle_message, 39: error = handle_error, interrupt = handle_interrupt)withRestarts(tryCatch(withCallingHandlers({ eval(code, test_env)
33: new_expectations <- the$test_expectations > starting_expectationsdoTryCatch(return(expr), name, parentenv, handler) if (snapshot_skipped) {
skip("On CRAN")34: }tryCatchOne(expr, names, parentenv, handlers[[1L]]) else if (!new_expectations && skip_on_empty) {
skip_empty()35: }tryCatchList(expr, classes, parentenv, handlers)}, expectation = handle_expectation, packageNotFoundError = function(e) {
if (on_cran()) {36: skip(paste0("{", e$package, "} is not installed."))tryCatch(withCallingHandlers({ } eval(code, test_env)}, snapshot_on_cran = function(cnd) { new_expectations <- the$test_expectations > starting_expectations snapshot_skipped <<- TRUE if (snapshot_skipped) { invokeRestart("muffle_cran_snapshot") skip("On CRAN")}, skip = handle_skip, warning = handle_warning, message = handle_message, } error = handle_error, interrupt = handle_interrupt), error = handle_fatal), else if (!new_expectations && skip_on_empty) { end_test = function() { skip_empty() }) }
}, expectation = handle_expectation, packageNotFoundError = function(e) {40: if (on_cran()) {test_code(code = exprs, env = env, reporter = get_reporter() %||% skip(paste0("{", e$package, "} is not installed.")) StopReporter$new()) }
}, snapshot_on_cran = function(cnd) {41: snapshot_skipped <<- TRUEsource_file(path, env = env(env), desc = desc, shuffle = shuffle, 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]], ...)
37: 43: doWithOneRestart(return(expr), restart)lapply(test_paths, test_one_file, env = env, desc = desc, shuffle = shuffle,
error_call = error_call)38:
withOneRestart(expr, restarts[[1L]])44:
doTryCatch(return(expr), name, parentenv, handler)39:
withRestarts(tryCatch(withCallingHandlers({45: eval(code, test_env)tryCatchOne(expr, names, parentenv, handlers[[1L]]) new_expectations <- the$test_expectations > starting_expectations
if (snapshot_skipped) {46: skip("On CRAN")tryCatchList(expr, classes, parentenv, handlers) }
else if (!new_expectations && skip_on_empty) {47: skip_empty()tryCatch(code, testthat_abort_reporter = function(cnd) { } cat(conditionMessage(cnd), "\n")}, expectation = handle_expectation, packageNotFoundError = function(e) { NULL if (on_cran()) {}) skip(paste0("{", e$package, "} is not installed."))
}}, snapshot_on_cran = function(cnd) {48: with_reporter(reporters$multi, lapply(test_paths, test_one_file, snapshot_skipped <<- TRUE env = env, desc = desc, shuffle = shuffle, error_call = error_call)) invokeRestart("muffle_cran_snapshot")
}, skip = handle_skip, warning = handle_warning, message = handle_message, 49: error = handle_error, interrupt = handle_interrupt), error = handle_fatal), test_files_serial(test_dir = test_dir, test_package = test_package, end_test = function() { 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, 40: error_call = error_call)test_code(code = exprs, env = env, reporter = get_reporter() %||%
StopReporter$new())50:
test_files(test_dir = path, test_paths = test_paths, test_package = package, reporter = reporter, load_helpers = load_helpers, env = env, 41: stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning, source_file(path, env = env(env), desc = desc, shuffle = shuffle, load_package = load_package, parallel = parallel, shuffle = shuffle) error_call = error_call)
42: 51: FUN(X[[i]], ...)test_dir("testthat", package = package, reporter = reporter,
43: ..., load_package = "installed")lapply(test_paths, test_one_file, env = env, desc = desc, shuffle = shuffle,
error_call = error_call)52:
test_check("missSBM")44:
doTryCatch(return(expr), name, parentenv, handler)An irrecoverable exception occurred. R is aborting now ...
45: tryCatchOne(expr, names, parentenv, handlers[[1L]])
46: tryCatchList(expr, classes, parentenv, handlers)
47: tryCatch(code, testthat_abort_reporter = function(cnd) { cat(conditionMessage(cnd), "\n") NULL})
48: with_reporter(reporters$multi, lapply(test_paths, test_one_file, env = env, desc = desc, shuffle = shuffle, error_call = error_call))
49: test_files_serial(test_dir = test_dir, test_package = test_package, test_paths = test_paths, load_helpers = load_helpers, reporter = reporter, env = env, stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning, desc = desc, load_package = load_package, shuffle = shuffle, error_call = error_call)
50: test_files(test_dir = path, test_paths = test_paths, test_package = package, reporter = reporter, load_helpers = load_helpers, env = env, stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning, load_package = load_package, parallel = parallel, shuffle = shuffle)
51: test_dir("testthat", package = package, reporter = reporter, ..., load_package = "installed")
52: test_check("missSBM")
An irrecoverable exception occurred. R is aborting now ...
Saving _problems/test-sbm-bernoulli-with-covariates-46.R
*** caught segfault ***
address 0x110, cause 'invalid permissions'
*** caught segfault ***
address 0x110, cause 'invalid permissions'
Traceback:
1: dispatcher(membership_name, membership_init$to_cc(), model_name, .self$network_to_cc(), TRUE)
2: FUN(X[[i]], ...)
3: lapply(X = S, FUN = FUN, ...)
4: doTryCatch(return(expr), name, parentenv, handler)
5: tryCatchOne(expr, names, parentenv, handlers[[1L]])
6: tryCatchList(expr, classes, parentenv, handlers)
7: tryCatch(expr, error = function(e) { call <- conditionCall(e) if (!is.null(call)) { if (identical(call[[1L]], quote(doTryCatch))) call <- sys.call(-4L) dcall <- deparse(call, nlines = 1L) prefix <- paste("Error in", dcall, ": ") LONG <- 75L sm <- strsplit(conditionMessage(e), "\n")[[1L]] w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w") if (is.na(w)) w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L], type = "b") if (w > LONG) prefix <- paste0(prefix, "\n ") } else prefix <- "Error : " msg <- paste0(prefix, conditionMessage(e), "\n") .Internal(seterrmessage(msg[1L])) if (!silent && isTRUE(getOption("show.error.messages"))) { cat(msg, file = outFile) .Internal(printDeferredWarnings()) } invisible(structure(msg, class = "try-error", condition = e))})
8: try(lapply(X = S, FUN = FUN, ...), silent = TRUE)
9: sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE))
10: FUN(X[[i]], ...)
11: lapply(seq_len(cores), inner.do)
12: parallel::mclapply(X, FUN, ..., mc.cores = mc.cores, mc.set.seed = FALSE, mc.silent = TRUE)
13: parallel_lapply(inits, .self$do_one_estim, mc.cores = ncores, verbose = (verbosity > 4))
14: .self$do_with_inits(inits, Q, reinitialization_effort)
15: .self$estim_ascend(reinitialization_effort, changing_effort)
16: private$BMobject$estimate()
17: mySBM_sbm$optimize(estimOptions = list(verbosity = 0, plot = FALSE))
18: eval(code, test_env)
19: eval(code, test_env)
20: withCallingHandlers({ eval(code, test_env) new_expectations <- the$test_expectations > starting_expectations if (snapshot_skipped) { skip("On CRAN") } else if (!new_expectations && skip_on_empty) { skip_empty() }}, expectation = handle_expectation, packageNotFoundError = function(e) { if (on_cran()) { skip(paste0("{", e$package, "} is not installed.")) }}, snapshot_on_cran = function(cnd) { snapshot_skipped <<- TRUE invokeRestart("muffle_cran_snapshot")}, skip = handle_skip, warning = handle_warning, message = handle_message, error = handle_error, interrupt = handle_interrupt)
21: doTryCatch(return(expr), name, parentenv, handler)
22: tryCatchOne(expr, names, parentenv, handlers[[1L]])
23: tryCatchList(expr, classes, parentenv, handlers)
24: tryCatch(withCallingHandlers({ eval(code, test_env) new_expectations <- the$test_expectations > starting_expectations if (snapshot_skipped) { skip("On CRAN") } else if (!new_expectations && skip_on_empty) { skip_empty() }}, expectation = handle_expectation, packageNotFoundError = function(e) { if (on_cran()) { skip(paste0("{", e$package, "} is not installed.")) }}, snapshot_on_cran = function(cnd) { snapshot_skipped <<- TRUE invokeRestart("muffle_cran_snapshot")}, skip = handle_skip, warning = handle_warning, message = handle_message, error = handle_error, interrupt = handle_interrupt), error = handle_fatal)
25: doWithOneRestart(return(expr), restart)
26: withOneRestart(expr, restarts[[1L]])
27: withRestarts(tryCatch(withCallingHandlers({ eval(code, test_env) new_expectations <- the$test_expectations > starting_expectations if (snapshot_skipped) { skip("On CRAN") } else if (!new_expectations && skip_on_empty) { skip_empty() }}, expectation = handle_expectation, packageNotFoundError = function(e) { if (on_cran()) { skip(paste0("{", e$package, "} is not installed.")) }}, snapshot_on_cran = function(cnd) { snapshot_skipped <<- TRUE invokeRestart("muffle_cran_snapshot")}, skip = handle_skip, warning = handle_warning, message = handle_message, error = handle_error, interrupt = handle_interrupt), error = handle_fatal), end_test = function() { })
28: test_code(code, parent.frame())
29: test_that("SimpleSBM_fit 'Bernoulli' model, undirected, no covariate", { sampler_undirected_nocov$rNetwork(store = TRUE) mySBM_sbm <- sbm::SimpleSBM_fit$new(sampler_undirected_nocov$networkData, "bernoulli", FALSE) mySBM_sbm$optimize(estimOptions = list(verbosity = 0, plot = FALSE)) mySBM_sbm$setModel(3) net <- missSBM:::partlyObservedNetwork$new(sampler_undirected_nocov$networkData) cl <- net$clustering(3)[[1]] mySBM_missSBM <- missSBM:::SimpleSBM_fit_noCov$new(net, clusterInit = cl) mySBM_missSBM$doVEM() expect_lt(rmse(mySBM_missSBM$connectParam$mean, mySBM_sbm$connectParam$mean), 0.05) 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_undirected_nocov$connectParam$mean), 0.05) expect_gt(ARI(mySBM_missSBM$memberships, sampler_undirected_nocov$memberships), 0.95) })
30: eval(code, test_env)
31: eval(code, test_env)
32: withCallingHandlers({
Traceback:
eval(code, test_env) 1: new_expectations <- the$test_expectations > starting_expectationsdispatcher(membership_name, membership_init$to_cc(), model_name, if (snapshot_skipped) { skip("On CRAN") .self$network_to_cc(), TRUE) } else if (!new_expectations && skip_on_empty) {
skip_empty() 2: }FUN(X[[i]], ...)}, expectation = handle_expectation, packageNotFoundError = function(e) {
3: if (on_cran()) {lapply(X = S, FUN = FUN, ...) skip(paste0("{", e$package, "} is not installed."))
} 4: }, snapshot_on_cran = function(cnd) {doTryCatch(return(expr), name, parentenv, handler) snapshot_skipped <<- TRUE
invokeRestart("muffle_cran_snapshot") 5: }, skip = handle_skip, warning = handle_warning, message = handle_message, tryCatchOne(expr, names, parentenv, handlers[[1L]]) error = handle_error, interrupt = handle_interrupt)
6:
tryCatchList(expr, classes, parentenv, handlers)33:
doTryCatch(return(expr), name, parentenv, handler) 7:
tryCatch(expr, error = function(e) {34: call <- conditionCall(e)tryCatchOne(expr, names, parentenv, handlers[[1L]]) if (!is.null(call)) {
if (identical(call[[1L]], quote(doTryCatch))) 35: call <- sys.call(-4L)tryCatchList(expr, classes, parentenv, handlers) dcall <- deparse(call, nlines = 1L) prefix <- paste("Error in", dcall, ": ")
36: LONG <- 75LtryCatch(withCallingHandlers({ sm <- strsplit(conditionMessage(e), "\n")[[1L]] eval(code, test_env) w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w") new_expectations <- the$test_expectations > starting_expectations if (is.na(w)) if (snapshot_skipped) { w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L], skip("On CRAN") type = "b") } if (w > LONG) else if (!new_expectations && skip_on_empty) { prefix <- paste0(prefix, "\n ") skip_empty() } } else prefix <- "Error : "}, expectation = handle_expectation, packageNotFoundError = function(e) { msg <- paste0(prefix, conditionMessage(e), "\n") if (on_cran()) { .Internal(seterrmessage(msg[1L])) skip(paste0("{", e$package, "} is not installed.")) if (!silent && isTRUE(getOption("show.error.messages"))) { cat(msg, file = outFile) } .Internal(printDeferredWarnings())}, snapshot_on_cran = function(cnd) { } invisible(structure(msg, class = "try-error", condition = e)) snapshot_skipped <<- TRUE}) invokeRestart("muffle_cran_snapshot")
}, skip = handle_skip, warning = handle_warning, message = handle_message, 8: error = handle_error, interrupt = handle_interrupt), error = handle_fatal)try(lapply(X = S, FUN = FUN, ...), silent = TRUE)
37: 9: doWithOneRestart(return(expr), restart)sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE))
38: 10: FUN(X[[i]], ...)withOneRestart(expr, restarts[[1L]])
11: 39: lapply(seq_len(cores), inner.do)withRestarts(tryCatch(withCallingHandlers({
eval(code, test_env)12: new_expectations <- the$test_expectations > starting_expectationsparallel::mclapply(X, FUN, ..., mc.cores = mc.cores, mc.set.seed = FALSE, if (snapshot_skipped) { mc.silent = TRUE) skip("On CRAN")
}13: else if (!new_expectations && skip_on_empty) {parallel_lapply(inits, .self$do_one_estim, mc.cores = ncores, skip_empty() } verbose = (verbosity > 4))}, expectation = handle_expectation, packageNotFoundError = function(e) {
if (on_cran()) {14: skip(paste0("{", e$package, "} is not installed.")).self$do_with_inits(inits, Q, reinitialization_effort) }
}, snapshot_on_cran = function(cnd) {15: snapshot_skipped <<- TRUE.self$estim_ascend(reinitialization_effort, changing_effort) invokeRestart("muffle_cran_snapshot")
}, skip = handle_skip, warning = handle_warning, message = handle_message, 16: error = handle_error, interrupt = handle_interrupt), error = handle_fatal), private$BMobject$estimate() end_test = function() {
})17:
mySBM_sbm$optimize(estimOptions = list(verbosity = 0, plot = FALSE))40:
test_code(code = exprs, env = env, reporter = get_reporter() %||% 18: StopReporter$new())eval(code, test_env)
41: 19: source_file(path, env = env(env), desc = desc, shuffle = shuffle, eval(code, test_env) error_call = error_call)
20: 42: withCallingHandlers({FUN(X[[i]], ...) eval(code, test_env)
new_expectations <- the$test_expectations > starting_expectations43: if (snapshot_skipped) {lapply(test_paths, test_one_file, env = env, desc = desc, shuffle = shuffle, error_call = error_call) skip("On CRAN")
}44: else if (!new_expectations && skip_on_empty) {doTryCatch(return(expr), name, parentenv, handler) skip_empty()
}45: }, expectation = handle_expectation, packageNotFoundError = function(e) {tryCatchOne(expr, names, parentenv, handlers[[1L]]) if (on_cran()) {
skip(paste0("{", e$package, "} is not installed."))46: }tryCatchList(expr, classes, parentenv, handlers)}, snapshot_on_cran = function(cnd) {
snapshot_skipped <<- TRUE47: invokeRestart("muffle_cran_snapshot")tryCatch(code, testthat_abort_reporter = function(cnd) {}, skip = handle_skip, warning = handle_warning, message = handle_message, cat(conditionMessage(cnd), "\n") error = handle_error, interrupt = handle_interrupt) NULL
})
21: 48: doTryCatch(return(expr), name, parentenv, handler)with_reporter(reporters$multi, lapply(test_paths, test_one_file,
env = env, desc = desc, shuffle = shuffle, error_call = error_call))22:
tryCatchOne(expr, names, parentenv, handlers[[1L]])49: test_files_serial(test_dir = test_dir, test_package = test_package,
test_paths = test_paths, load_helpers = load_helpers, reporter = reporter, 23: env = env, stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning, tryCatchList(expr, classes, parentenv, handlers) desc = desc, load_package = load_package, shuffle = shuffle, error_call = error_call)
24: 50: tryCatch(withCallingHandlers({test_files(test_dir = path, test_paths = test_paths, test_package = package, eval(code, test_env) new_expectations <- the$test_expectations > starting_expectations if (snapshot_skipped) { skip("On CRAN") reporter = reporter, load_helpers = load_helpers, env = env, } stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning, else if (!new_expectations && skip_on_empty) { load_package = load_package, parallel = parallel, shuffle = shuffle)
skip_empty()51: }test_dir("testthat", package = package, reporter = reporter, }, expectation = handle_expectation, packageNotFoundError = function(e) { if (on_cran()) { ..., load_package = "installed") skip(paste0("{", e$package, "} is not installed."))
}52: }, snapshot_on_cran = function(cnd) { snapshot_skipped <<- TRUEtest_check("missSBM") invokeRestart("muffle_cran_snapshot")
}, skip = handle_skip, warning = handle_warning, message = handle_message, An irrecoverable exception occurred. R is aborting now ...
error = handle_error, interrupt = handle_interrupt), error = handle_fatal)
25: doWithOneRestart(return(expr), restart)
26: withOneRestart(expr, restarts[[1L]])
27: withRestarts(tryCatch(withCallingHandlers({ eval(code, test_env) new_expectations <- the$test_expectations > starting_expectations if (snapshot_skipped) { skip("On CRAN") } else if (!new_expectations && skip_on_empty) { skip_empty() }}, expectation = handle_expectation, packageNotFoundError = function(e) { if (on_cran()) { skip(paste0("{", e$package, "} is not installed.")) }}, snapshot_on_cran = function(cnd) { snapshot_skipped <<- TRUE invokeRestart("muffle_cran_snapshot")}, skip = handle_skip, warning = handle_warning, message = handle_message, error = handle_error, interrupt = handle_interrupt), error = handle_fatal), end_test = function() { })
28: test_code(code, parent.frame())
29: test_that("SimpleSBM_fit 'Bernoulli' model, undirected, no covariate", { sampler_undirected_nocov$rNetwork(store = TRUE) mySBM_sbm <- sbm::SimpleSBM_fit$new(sampler_undirected_nocov$networkData, "bernoulli", FALSE) mySBM_sbm$optimize(estimOptions = list(verbosity = 0, plot = FALSE)) mySBM_sbm$setModel(3) net <- missSBM:::partlyObservedNetwork$new(sampler_undirected_nocov$networkData) cl <- net$clustering(3)[[1]] mySBM_missSBM <- missSBM:::SimpleSBM_fit_noCov$new(net, clusterInit = cl) mySBM_missSBM$doVEM() expect_lt(rmse(mySBM_missSBM$connectParam$mean, mySBM_sbm$connectParam$mean), 0.05) 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_undirected_nocov$connectParam$mean), 0.05) expect_gt(ARI(mySBM_missSBM$memberships, sampler_undirected_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-16.R
*** caught segfault ***
address 0x110, cause 'invalid permissions'
*** caught segfault ***
address 0x110, cause 'invalid permissions'
Traceback:
1: dispatcher(membership_name, membership_init$to_cc(), model_name, .self$network_to_cc(), TRUE)
2: FUN(X[[i]], ...)
3: lapply(X = S, FUN = FUN, ...)
4: doTryCatch(return(expr), name, parentenv, handler)
5: tryCatchOne(expr, names, parentenv, handlers[[1L]])
6: tryCatchList(expr, classes, parentenv, handlers)
7: tryCatch(expr, error = function(e) { call <- conditionCall(e) if (!is.null(call)) { if (identical(call[[1L]], quote(doTryCatch))) call <- sys.call(-4L) dcall <- deparse(call, nlines = 1L) prefix <- paste("Error in", dcall, ": ") LONG <- 75L sm <- strsplit(conditionMessage(e), "\n")[[1L]] w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w") if (is.na(w)) w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L], type = "b") if (w > LONG) prefix <- paste0(prefix, "\n ") } else prefix <- "Error : " msg <- paste0(prefix, conditionMessage(e), "\n") .Internal(seterrmessage(msg[1L])) if (!silent && isTRUE(getOption("show.error.messages"))) { cat(msg, file = outFile) .Internal(printDeferredWarnings()) } invisible(structure(msg, class = "try-error", condition = e))})
8: try(lapply(X = S, FUN = FUN, ...), silent = TRUE)
9: sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE))
10: FUN(X[[i]], ...)
11: lapply(seq_len(cores), inner.do)
12: parallel::mclapply(X, FUN, ..., mc.cores = mc.cores, mc.set.seed = FALSE, mc.silent = TRUE)
13: parallel_lapply(inits, .self$do_one_estim, mc.cores = ncores, verbose = (verbosity > 4))
14: .self$do_with_inits(inits, Q, reinitialization_effort)
15: .self$estim_ascend(reinitialization_effort, changing_effort)
16: private$BMobject$estimate()
17: mySBM_sbm$optimize(estimOptions = list(verbosity = 0, plot = FALSE))
18: eval(code, test_env)
19: eval(code, test_env)
20: withCallingHandlers({ eval(code, test_env) new_expectations <- the$test_expectations > starting_expectations if (snapshot_skipped) { skip("On CRAN") } else if (!new_expectations && skip_on_empty) { skip_empty() }}, expectation = handle_expectation, packageNotFoundError = function(e) { if (on_cran()) { skip(paste0("{", e$package, "} is not installed.")) }}, snapshot_on_cran = function(cnd) { snapshot_skipped <<- TRUE invokeRestart("muffle_cran_snapshot")}, skip = handle_skip, warning = handle_warning, message = handle_message, error = handle_error, interrupt = handle_interrupt)
21: doTryCatch(return(expr), name, parentenv, handler)
22: tryCatchOne(expr, names, parentenv, handlers[[1L]])
23: tryCatchList(expr, classes, parentenv, handlers)
24: tryCatch(withCallingHandlers({ eval(code, test_env) new_expectations <- the$test_expectations > starting_expectations if (snapshot_skipped) { skip("On CRAN") } else if (!new_expectations && skip_on_empty) { skip_empty() }}, expectation = handle_expectation, packageNotFoundError = function(e) { if (on_cran()) { skip(paste0("{", e$package, "} is not installed.")) }}, snapshot_on_cran = function(cnd) { snapshot_skipped <<- TRUE invokeRestart("muffle_cran_snapshot")}, skip = handle_skip, warning = handle_warning, message = handle_message, error = handle_error, interrupt = handle_interrupt), error = handle_fatal)
25: doWithOneRestart(return(expr), restart)
26: withOneRestart(expr, restarts[[1L]])
27: withRestarts(tryCatch(withCallingHandlers({ eval(code, test_env) new_expectations <- the$test_expectations > starting_expectations if (snapshot_skipped) { skip("On CRAN") } else if (!new_expectations && skip_on_empty) { skip_empty() }}, expectation = handle_expectation, packageNotFoundError = function(e) { if (on_cran()) { skip(paste0("{", e$package, "} is not installed.")) }}, snapshot_on_cran = function(cnd) { snapshot_skipped <<- TRUE invokeRestart("muffle_cran_snapshot")}, skip = handle_skip, warning = handle_warning, message = handle_message, error = handle_error, interrupt = handle_interrupt), error = handle_fatal), end_test = function() { })
28: test_code(code, parent.frame())
29: test_that("SimpleSBM_fit 'Bernoulli' model, directed, no covariate", { sampler_directed_nocov$rNetwork(store = TRUE) mySBM_sbm <- sbm::SimpleSBM_fit$new(sampler_directed_nocov$networkData, "bernoulli", TRUE) mySBM_sbm$optimize(estimOptions = list(verbosity = 0, plot = FALSE)) mySBM_sbm$setModel(3) net <- missSBM:::partlyObservedNetwork$new(sampler_directed_nocov$networkData) cl <- net$clustering(3)[[1]] mySBM_missSBM <- missSBM:::SimpleSBM_fit_noCov$new(sampler_directed_nocov$networkData, clusterInit = cl) mySBM_missSBM$doVEM() expect_lt(rmse(mySBM_missSBM$connectParam$mean, mySBM_sbm$connectParam$mean), 0.1) expect_gt(ARI(mySBM_missSBM$memberships, mySBM_sbm$memberships), 0.95) expect_lt(rmse(mySBM_missSBM$loglik, mySBM_sbm$loglik), 0.01) expect_lt(rmse(mySBM_missSBM$connectParam$mean, sampler_directed_nocov$connectParam$mean), 0.1) expect_lt(rmse(mySBM_missSBM$covarParam, sampler_directed_cov$covarParam), 0.2) expect_gt(ARI(mySBM_missSBM$memberships, sampler_directed_nocov$memberships), 0.95) })
Traceback:
30: 1: eval(code, test_env)dispatcher(membership_name, membership_init$to_cc(), model_name,
.self$network_to_cc(), TRUE)31:
eval(code, test_env) 2:
FUN(X[[i]], ...)32:
withCallingHandlers({ 3: eval(code, test_env)lapply(X = S, FUN = FUN, ...) new_expectations <- the$test_expectations > starting_expectations
if (snapshot_skipped) { 4: skip("On CRAN")doTryCatch(return(expr), name, parentenv, handler) }
else if (!new_expectations && skip_on_empty) { 5: skip_empty()tryCatchOne(expr, names, parentenv, handlers[[1L]]) }
}, expectation = handle_expectation, packageNotFoundError = function(e) { 6: if (on_cran()) {tryCatchList(expr, classes, parentenv, handlers) skip(paste0("{", e$package, "} is not installed."))
} 7: }, snapshot_on_cran = function(cnd) {tryCatch(expr, error = function(e) { snapshot_skipped <<- TRUE call <- conditionCall(e) invokeRestart("muffle_cran_snapshot") if (!is.null(call)) {}, skip = handle_skip, warning = handle_warning, message = handle_message, if (identical(call[[1L]], quote(doTryCatch))) error = handle_error, interrupt = handle_interrupt) call <- sys.call(-4L) dcall <- deparse(call, nlines = 1L)
prefix <- paste("Error in", dcall, ": ")33: LONG <- 75LdoTryCatch(return(expr), name, parentenv, handler) sm <- strsplit(conditionMessage(e), "\n")[[1L]] w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w")
if (is.na(w)) 34: w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L], tryCatchOne(expr, names, parentenv, handlers[[1L]]) type = "b")
if (w > LONG) 35: prefix <- paste0(prefix, "\n ")tryCatchList(expr, classes, parentenv, handlers) }
else prefix <- "Error : "36: msg <- paste0(prefix, conditionMessage(e), "\n")tryCatch(withCallingHandlers({ .Internal(seterrmessage(msg[1L])) eval(code, test_env) if (!silent && isTRUE(getOption("show.error.messages"))) { new_expectations <- the$test_expectations > starting_expectations cat(msg, file = outFile) if (snapshot_skipped) { .Internal(printDeferredWarnings()) skip("On CRAN") } } else if (!new_expectations && skip_on_empty) { invisible(structure(msg, class = "try-error", condition = e)) skip_empty()}) }
}, expectation = handle_expectation, packageNotFoundError = function(e) { 8: if (on_cran()) {try(lapply(X = S, FUN = FUN, ...), silent = TRUE) skip(paste0("{", e$package, "} is not installed."))
} 9: }, snapshot_on_cran = function(cnd) {sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE)) snapshot_skipped <<- TRUE
invokeRestart("muffle_cran_snapshot")10: }, skip = handle_skip, warning = handle_warning, message = handle_message, FUN(X[[i]], ...) error = handle_error, interrupt = handle_interrupt), error = handle_fatal)
11: 37: lapply(seq_len(cores), inner.do)doWithOneRestart(return(expr), restart)
12: 38: parallel::mclapply(X, FUN, ..., mc.cores = mc.cores, mc.set.seed = FALSE, withOneRestart(expr, restarts[[1L]]) mc.silent = TRUE)
39: 13: withRestarts(tryCatch(withCallingHandlers({parallel_lapply(inits, .self$do_one_estim, mc.cores = ncores, eval(code, test_env) verbose = (verbosity > 4)) new_expectations <- the$test_expectations > starting_expectations
if (snapshot_skipped) {14: skip("On CRAN").self$do_with_inits(inits, Q, reinitialization_effort) }
else if (!new_expectations && skip_on_empty) {15: skip_empty().self$estim_ascend(reinitialization_effort, changing_effort) }
}, expectation = handle_expectation, packageNotFoundError = function(e) {16: if (on_cran()) {private$BMobject$estimate() skip(paste0("{", e$package, "} is not installed."))
}17: }, snapshot_on_cran = function(cnd) {mySBM_sbm$optimize(estimOptions = list(verbosity = 0, plot = FALSE)) snapshot_skipped <<- TRUE
invokeRestart("muffle_cran_snapshot")18: }, skip = handle_skip, warning = handle_warning, message = handle_message, eval(code, test_env) error = handle_error, interrupt = handle_interrupt), error = handle_fatal),
end_test = function() {19: })eval(code, test_env)
40: 20: test_code(code = exprs, env = env, reporter = get_reporter() %||% withCallingHandlers({ StopReporter$new()) eval(code, test_env)
new_expectations <- the$test_expectations > starting_expectations41: if (snapshot_skipped) {source_file(path, env = env(env), desc = desc, shuffle = shuffle, skip("On CRAN") error_call = error_call) }
else if (!new_expectations && skip_on_empty) {42: skip_empty()FUN(X[[i]], ...) }
}, expectation = handle_expectation, packageNotFoundError = function(e) {43: if (on_cran()) {lapply(test_paths, test_one_file, env = env, desc = desc, shuffle = shuffle, skip(paste0("{", e$package, "} is not installed.")) error_call = error_call) }
}, snapshot_on_cran = function(cnd) {44: snapshot_skipped <<- TRUEdoTryCatch(return(expr), name, parentenv, handler) invokeRestart("muffle_cran_snapshot")
}, skip = handle_skip, warning = handle_warning, message = handle_message, 45: error = handle_error, interrupt = handle_interrupt)tryCatchOne(expr, names, parentenv, handlers[[1L]])
21: 46: doTryCatch(return(expr), name, parentenv, handler)tryCatchList(expr, classes, parentenv, handlers)
22: 47: tryCatchOne(expr, names, parentenv, handlers[[1L]])tryCatch(code, testthat_abort_reporter = function(cnd) {
cat(conditionMessage(cnd), "\n")23: NULLtryCatchList(expr, classes, parentenv, handlers)})
24: 48: tryCatch(withCallingHandlers({with_reporter(reporters$multi, lapply(test_paths, test_one_file, eval(code, test_env) env = env, desc = desc, shuffle = shuffle, error_call = error_call)) new_expectations <- the$test_expectations > starting_expectations
if (snapshot_skipped) {49: skip("On CRAN")test_files_serial(test_dir = test_dir, test_package = test_package, } test_paths = test_paths, load_helpers = load_helpers, reporter = reporter, else if (!new_expectations && skip_on_empty) { env = env, stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning, skip_empty() desc = desc, load_package = load_package, shuffle = shuffle, } error_call = error_call)}, expectation = handle_expectation, packageNotFoundError = function(e) {
if (on_cran()) {50: skip(paste0("{", e$package, "} is not installed."))test_files(test_dir = path, test_paths = test_paths, test_package = package, } reporter = reporter, load_helpers = load_helpers, env = env, }, snapshot_on_cran = function(cnd) { stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning, snapshot_skipped <<- TRUE load_package = load_package, parallel = parallel, shuffle = shuffle) invokeRestart("muffle_cran_snapshot")
}, skip = handle_skip, warning = handle_warning, message = handle_message, 51: error = handle_error, interrupt = handle_interrupt), error = handle_fatal)test_dir("testthat", package = package, reporter = reporter,
..., load_package = "installed")25:
doWithOneRestart(return(expr), restart)52:
test_check("missSBM")26:
withOneRestart(expr, restarts[[1L]])An irrecoverable exception occurred. R is aborting now ...
27: withRestarts(tryCatch(withCallingHandlers({ eval(code, test_env) new_expectations <- the$test_expectations > starting_expectations if (snapshot_skipped) { skip("On CRAN") } else if (!new_expectations && skip_on_empty) { skip_empty() }}, expectation = handle_expectation, packageNotFoundError = function(e) { if (on_cran()) { skip(paste0("{", e$package, "} is not installed.")) }}, snapshot_on_cran = function(cnd) { snapshot_skipped <<- TRUE invokeRestart("muffle_cran_snapshot")}, skip = handle_skip, warning = handle_warning, message = handle_message, error = handle_error, interrupt = handle_interrupt), error = handle_fatal), end_test = function() { })
28: test_code(code, parent.frame())
29: test_that("SimpleSBM_fit 'Bernoulli' model, directed, no covariate", { sampler_directed_nocov$rNetwork(store = TRUE) mySBM_sbm <- sbm::SimpleSBM_fit$new(sampler_directed_nocov$networkData, "bernoulli", TRUE) mySBM_sbm$optimize(estimOptions = list(verbosity = 0, plot = FALSE)) mySBM_sbm$setModel(3) net <- missSBM:::partlyObservedNetwork$new(sampler_directed_nocov$networkData) cl <- net$clustering(3)[[1]] mySBM_missSBM <- missSBM:::SimpleSBM_fit_noCov$new(sampler_directed_nocov$networkData, clusterInit = cl) mySBM_missSBM$doVEM() expect_lt(rmse(mySBM_missSBM$connectParam$mean, mySBM_sbm$connectParam$mean), 0.1) expect_gt(ARI(mySBM_missSBM$memberships, mySBM_sbm$memberships), 0.95) expect_lt(rmse(mySBM_missSBM$loglik, mySBM_sbm$loglik), 0.01) expect_lt(rmse(mySBM_missSBM$connectParam$mean, sampler_directed_nocov$connectParam$mean), 0.1) expect_lt(rmse(mySBM_missSBM$covarParam, sampler_directed_cov$covarParam), 0.2) expect_gt(ARI(mySBM_missSBM$memberships, sampler_directed_nocov$memberships), 0.95) })
30: eval(code, test_env)
31: eval(code, test_env)
32: withCallingHandlers({ eval(code, test_env) new_expectations <- the$test_expectations > starting_expectations if (snapshot_skipped) { skip("On CRAN") } else if (!new_expectations && skip_on_empty) { skip_empty() }}, expectation = handle_expectation, packageNotFoundError = function(e) { if (on_cran()) { skip(paste0("{", e$package, "} is not installed.")) }}, snapshot_on_cran = function(cnd) { snapshot_skipped <<- TRUE invokeRestart("muffle_cran_snapshot")}, skip = handle_skip, warning = handle_warning, message = handle_message, error = handle_error, interrupt = handle_interrupt)
33: doTryCatch(return(expr), name, parentenv, handler)
34: tryCatchOne(expr, names, parentenv, handlers[[1L]])
35: tryCatchList(expr, classes, parentenv, handlers)
36: tryCatch(withCallingHandlers({ eval(code, test_env) new_expectations <- the$test_expectations > starting_expectations if (snapshot_skipped) { skip("On CRAN") } else if (!new_expectations && skip_on_empty) { skip_empty() }}, expectation = handle_expectation, packageNotFoundError = function(e) { if (on_cran()) { skip(paste0("{", e$package, "} is not installed.")) }}, snapshot_on_cran = function(cnd) { snapshot_skipped <<- TRUE invokeRestart("muffle_cran_snapshot")}, skip = handle_skip, warning = handle_warning, message = handle_message, error = handle_error, interrupt = handle_interrupt), error = handle_fatal)
37: doWithOneRestart(return(expr), restart)
38: withOneRestart(expr, restarts[[1L]])
39: withRestarts(tryCatch(withCallingHandlers({ eval(code, test_env) new_expectations <- the$test_expectations > starting_expectations if (snapshot_skipped) { skip("On CRAN") } else if (!new_expectations && skip_on_empty) { skip_empty() }}, expectation = handle_expectation, packageNotFoundError = function(e) { if (on_cran()) { skip(paste0("{", e$package, "} is not installed.")) }}, snapshot_on_cran = function(cnd) { snapshot_skipped <<- TRUE invokeRestart("muffle_cran_snapshot")}, skip = handle_skip, warning = handle_warning, message = handle_message, error = handle_error, interrupt = handle_interrupt), error = handle_fatal), end_test = function() { })
40: test_code(code = exprs, env = env, reporter = get_reporter() %||% StopReporter$new())
41: source_file(path, env = env(env), desc = desc, shuffle = shuffle, error_call = error_call)
42: FUN(X[[i]], ...)
43: lapply(test_paths, test_one_file, env = env, desc = desc, shuffle = shuffle, error_call = error_call)
44: doTryCatch(return(expr), name, parentenv, handler)
45: tryCatchOne(expr, names, parentenv, handlers[[1L]])
46: tryCatchList(expr, classes, parentenv, handlers)
47: tryCatch(code, testthat_abort_reporter = function(cnd) { cat(conditionMessage(cnd), "\n") NULL})
48: with_reporter(reporters$multi, lapply(test_paths, test_one_file, env = env, desc = desc, shuffle = shuffle, error_call = error_call))
49: test_files_serial(test_dir = test_dir, test_package = test_package, test_paths = test_paths, load_helpers = load_helpers, reporter = reporter, env = env, stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning, desc = desc, load_package = load_package, shuffle = shuffle, error_call = error_call)
50: test_files(test_dir = path, test_paths = test_paths, test_package = package, reporter = reporter, load_helpers = load_helpers, env = env, stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning, load_package = load_package, parallel = parallel, shuffle = shuffle)
51: test_dir("testthat", package = package, reporter = reporter, ..., load_package = "installed")
52: test_check("missSBM")
An irrecoverable exception occurred. R is aborting now ...
Saving _problems/test-sbm-bernoulli-without-covariate-44.R
[ FAIL 4 | WARN 4 | SKIP 3 | PASS 531 ]
══ Skipped tests (3) ═══════════════════════════════════════════════════════════
• On CRAN (3): 'test-explore-block-count.R:4:3',
'test-missSBM_collection-degenerate.R:80:3',
'test-missSBM_collection-estimate_chain.R:64:3'
══ Failed tests ════════════════════════════════════════════════════════════════
── Error ('test-sbm-bernoulli-with-covariates.R:16:3'): SimpleSBM_fit 'Bernoulli' model, undirected, one covariate ──
Error: invalid assignment for reference class field 'Z', should be from class "matrix" or a subclass (was class "NULL")
Backtrace:
▆
1. ├─mySBM_sbm$optimize(estimOptions = list(verbosity = 0, plot = FALSE)) at test-sbm-bernoulli-with-covariates.R:16:3
2. │ └─private$BMobject$estimate()
3. │ └─.self$estim_ascend(reinitialization_effort, changing_effort)
4. │ └─.self$do_with_inits(inits, Q, reinitialization_effort)
5. │ └─base::sapply(...)
6. │ └─base::lapply(X = X, FUN = FUN, ...)
7. │ └─blockmodels (local) FUN(X[[i]], ...)
8. │ └─getRefClass(membership_name)(from_cc = r$membership)
9. │ └─methods::new(`<chr>`, ...)
10. │ ├─methods::initialize(value, ...)
11. │ └─methods::initialize(value, ...)
12. │ └─.Object$initialize(...)
13. └─blockmodels (local) `<dfltBndF>`(base::quote(NULL))
14. └─methods:::.setDummyField(...)
── Error ('test-sbm-bernoulli-with-covariates.R:46:3'): SimpleSBM_fit 'Bernoulli' model, directed, one covariate ──
Error: invalid assignment for reference class field 'Z', should be from class "matrix" or a subclass (was class "NULL")
Backtrace:
▆
1. ├─mySBM_sbm$optimize(estimOptions = list(verbosity = 0, plot = FALSE)) at test-sbm-bernoulli-with-covariates.R:46:3
2. │ └─private$BMobject$estimate()
3. │ └─.self$estim_ascend(reinitialization_effort, changing_effort)
4. │ └─.self$do_with_inits(inits, Q, reinitialization_effort)
5. │ └─base::sapply(...)
6. │ └─base::lapply(X = X, FUN = FUN, ...)
7. │ └─blockmodels (local) FUN(X[[i]], ...)
8. │ └─getRefClass(membership_name)(from_cc = r$membership)
9. │ └─methods::new(`<chr>`, ...)
10. │ ├─methods::initialize(value, ...)
11. │ └─methods::initialize(value, ...)
12. │ └─.Object$initialize(...)
13. └─blockmodels (local) `<dfltBndF>`(base::quote(NULL))
14. └─methods:::.setDummyField(...)
── Error ('test-sbm-bernoulli-without-covariate.R:16:3'): SimpleSBM_fit 'Bernoulli' model, undirected, no covariate ──
Error: invalid assignment for reference class field 'Z', should be from class "matrix" or a subclass (was class "NULL")
Backtrace:
▆
1. ├─mySBM_sbm$optimize(estimOptions = list(verbosity = 0, plot = FALSE)) at test-sbm-bernoulli-without-covariate.R:16:3
2. │ └─private$BMobject$estimate()
3. │ └─.self$estim_ascend(reinitialization_effort, changing_effort)
4. │ └─.self$do_with_inits(inits, Q, reinitialization_effort)
5. │ └─base::sapply(...)
6. │ └─base::lapply(X = X, FUN = FUN, ...)
7. │ └─blockmodels (local) FUN(X[[i]], ...)
8. │ └─getRefClass(membership_name)(from_cc = r$membership)
9. │ └─methods::new(`<chr>`, ...)
10. │ ├─methods::initialize(value, ...)
11. │ └─methods::initialize(value, ...)
12. │ └─.Object$initialize(...)
13. └─blockmodels (local) `<dfltBndF>`(base::quote(NULL))
14. └─methods:::.setDummyField(...)
── Error ('test-sbm-bernoulli-without-covariate.R:44:3'): SimpleSBM_fit 'Bernoulli' model, directed, no covariate ──
Error: invalid assignment for reference class field 'Z', should be from class "matrix" or a subclass (was class "NULL")
Backtrace:
▆
1. ├─mySBM_sbm$optimize(estimOptions = list(verbosity = 0, plot = FALSE)) at test-sbm-bernoulli-without-covariate.R:44:3
2. │ └─private$BMobject$estimate()
3. │ └─.self$estim_ascend(reinitialization_effort, changing_effort)
4. │ └─.self$do_with_inits(inits, Q, reinitialization_effort)
5. │ └─base::sapply(...)
6. │ └─base::lapply(X = X, FUN = FUN, ...)
7. │ └─blockmodels (local) FUN(X[[i]], ...)
8. │ └─getRefClass(membership_name)(from_cc = r$membership)
9. │ └─methods::new(`<chr>`, ...)
10. │ ├─methods::initialize(value, ...)
11. │ └─methods::initialize(value, ...)
12. │ └─.Object$initialize(...)
13. └─blockmodels (local) `<dfltBndF>`(base::quote(NULL))
14. └─methods:::.setDummyField(...)
[ FAIL 4 | WARN 4 | SKIP 3 | PASS 531 ]
Error:
! Test failures.
Execution halted
Flavor: r-oldrel-macos-arm64