Last updated on 2026-10-11 20:51:52 CEST.
| Flavor | Version | Tinstall | Tcheck | Ttotal | Status | Flags |
|---|---|---|---|---|---|---|
| r-devel-linux-x86_64-debian-clang | 1.1.0 | 86.78 | 353.63 | 440.41 | OK | |
| r-devel-linux-x86_64-debian-gcc | 1.1.0 | 56.73 | 254.44 | 311.17 | OK | |
| r-devel-linux-x86_64-fedora-clang | 1.1.0 | 58.00 | 243.36 | 301.36 | OK | |
| r-devel-linux-x86_64-fedora-gcc | 1.1.0 | 62.00 | 246.59 | 308.59 | OK | |
| r-devel-windows-x86_64 | 1.1.0 | 91.00 | 450.00 | 541.00 | OK | |
| r-patched-linux-x86_64 | 1.1.0 | 82.95 | 348.35 | 431.30 | OK | |
| r-release-linux-x86_64 | 1.1.0 | 74.39 | 345.64 | 420.03 | 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 | 91.00 | 364.00 | 455.00 | OK | |
| r-oldrel-macos-arm64 | 1.1.0 | 20.00 | 104.00 | 124.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 | 111.00 | 500.00 | 611.00 | OK |
Version: 1.1.0
Check: tests
Result: ERROR
Running ‘spelling.R’ [0s/0s]
Running ‘testthat.R’ [37s/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 ***
*** 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)
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) {
Traceback:
call <- conditionCall(e) 1: if (!is.null(call)) {dispatcher(membership_name, membership_init$to_cc(), model_name, if (identical(call[[1L]], quote(doTryCatch))) .self$network_to_cc(), TRUE) call <- sys.call(-4L)
dcall <- deparse(call, nlines = 1L) 2: prefix <- paste("Error in", dcall, ": ")FUN(X[[i]], ...) LONG <- 75L
sm <- strsplit(conditionMessage(e), "\n")[[1L]] 3: w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w")lapply(X = S, FUN = FUN, ...) if (is.na(w))
w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L], 4: type = "b")doTryCatch(return(expr), name, parentenv, handler) if (w > LONG)
prefix <- paste0(prefix, "\n ") 5: }tryCatchOne(expr, names, parentenv, handlers[[1L]]) else prefix <- "Error : "
msg <- paste0(prefix, conditionMessage(e), "\n") 6: .Internal(seterrmessage(msg[1L]))tryCatchList(expr, classes, parentenv, handlers) if (!silent && isTRUE(getOption("show.error.messages"))) {
cat(msg, file = outFile) 7: .Internal(printDeferredWarnings())tryCatch(expr, error = function(e) { } call <- conditionCall(e) invisible(structure(msg, class = "try-error", condition = e)) if (!is.null(call)) { if (identical(call[[1L]], quote(doTryCatch))) }) call <- sys.call(-4L)
dcall <- deparse(call, nlines = 1L) 8: prefix <- paste("Error in", dcall, ": ")try(lapply(X = S, FUN = FUN, ...), silent = TRUE) LONG <- 75L
sm <- strsplit(conditionMessage(e), "\n")[[1L]] 9: w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w")sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE)) if (is.na(w))
w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L], 10: type = "b")FUN(X[[i]], ...) if (w > LONG)
prefix <- paste0(prefix, "\n ")11: }lapply(seq_len(cores), inner.do) else prefix <- "Error : "
msg <- paste0(prefix, conditionMessage(e), "\n")12: .Internal(seterrmessage(msg[1L]))parallel::mclapply(X, FUN, ..., mc.cores = mc.cores, mc.set.seed = FALSE, if (!silent && isTRUE(getOption("show.error.messages"))) { mc.silent = TRUE) cat(msg, file = outFile)
.Internal(printDeferredWarnings())13: }parallel_lapply(inits, .self$do_one_estim, mc.cores = ncores, invisible(structure(msg, class = "try-error", condition = e)) verbose = (verbosity > 4))})
14: 8: .self$do_with_inits(inits, Q, reinitialization_effort)try(lapply(X = S, FUN = FUN, ...), silent = TRUE)
15: 9: .self$estim_ascend(reinitialization_effort, changing_effort)sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE))
16: 10: private$BMobject$estimate()FUN(X[[i]], ...)
17: 11: mySBM_sbm$optimize(estimOptions = list(verbosity = 0, plot = FALSE))lapply(seq_len(cores), inner.do)
18: eval(code, test_env)12:
19: parallel::mclapply(X, FUN, ..., mc.cores = mc.cores, mc.set.seed = FALSE, eval(code, test_env)
mc.silent = TRUE)20:
withCallingHandlers({ eval(code, test_env)13: new_expectations <- the$test_expectations > starting_expectationsparallel_lapply(inits, .self$do_one_estim, mc.cores = ncores, if (snapshot_skipped) { verbose = (verbosity > 4)) skip("On CRAN")
}14: else if (!new_expectations && skip_on_empty) {.self$do_with_inits(inits, Q, reinitialization_effort) skip_empty()
}15: }, expectation = handle_expectation, packageNotFoundError = function(e) {.self$estim_ascend(reinitialization_effort, changing_effort) if (on_cran()) {
skip(paste0("{", e$package, "} is not installed."))16: }private$BMobject$estimate()
}, snapshot_on_cran = function(cnd) {17: snapshot_skipped <<- TRUEmySBM_sbm$optimize(estimOptions = list(verbosity = 0, plot = FALSE)) invokeRestart("muffle_cran_snapshot")
}, skip = handle_skip, warning = handle_warning, message = handle_message, 18: error = handle_error, interrupt = handle_interrupt)eval(code, test_env)
21: doTryCatch(return(expr), name, parentenv, handler)19:
eval(code, test_env)22:
tryCatchOne(expr, names, parentenv, handlers[[1L]])20:
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) } 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")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)
22: 25: tryCatchOne(expr, names, parentenv, handlers[[1L]])
doWithOneRestart(return(expr), restart)23:
tryCatchList(expr, classes, parentenv, handlers)26:
withOneRestart(expr, restarts[[1L]])24:
tryCatch(withCallingHandlers({ eval(code, test_env)27: new_expectations <- the$test_expectations > starting_expectationswithRestarts(tryCatch(withCallingHandlers({ if (snapshot_skipped) { 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]])
28: 27: test_code(code, parent.frame())withRestarts(tryCatch(withCallingHandlers({
eval(code, test_env)29: new_expectations <- the$test_expectations > starting_expectationstest_that("SimpleSBM_fit 'Bernoulli' model, undirected, one covariate", if (snapshot_skipped) { { skip("On CRAN") sampler_undirected_cov$rNetwork(store = TRUE) } mySBM_sbm <- sbm::SimpleSBM_fit$new(sampler_undirected_cov$networkData, else if (!new_expectations && skip_on_empty) { "bernoulli", FALSE, covarList = covarList_undirected) skip_empty() mySBM_sbm$optimize(estimOptions = list(verbosity = 0, } plot = FALSE))}, expectation = handle_expectation, packageNotFoundError = function(e) { 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) } cls <- net$clustering(1:(2 * Q))}, snapshot_on_cran = function(cnd) { 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() error = handle_error, interrupt = handle_interrupt), error = handle_fatal), expect_lt(rmse(mySBM_missSBM$connectParam$mean, mySBM_sbm$connectParam$mean), end_test = function() { 0.05) }) 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) new_expectations <- the$test_expectations > starting_expectations35: if (snapshot_skipped) { skip("On CRAN")tryCatchList(expr, classes, parentenv, handlers) }
else if (!new_expectations && skip_on_empty) {36: skip_empty()tryCatch(withCallingHandlers({ } eval(code, test_env)}, expectation = handle_expectation, packageNotFoundError = function(e) { new_expectations <- the$test_expectations > starting_expectations if (on_cran()) { if (snapshot_skipped) { skip(paste0("{", e$package, "} is not installed.")) skip("On CRAN") } }}, snapshot_on_cran = function(cnd) { snapshot_skipped <<- TRUE else if (!new_expectations && skip_on_empty) { invokeRestart("muffle_cran_snapshot") skip_empty()}, skip = handle_skip, warning = handle_warning, message = handle_message, } error = handle_error, interrupt = handle_interrupt)}, expectation = handle_expectation, packageNotFoundError = function(e) {
if (on_cran()) {33: skip(paste0("{", e$package, "} is not installed."))doTryCatch(return(expr), name, parentenv, handler) }
}, snapshot_on_cran = function(cnd) {34: snapshot_skipped <<- TRUEtryCatchOne(expr, names, parentenv, handlers[[1L]]) invokeRestart("muffle_cran_snapshot")}, skip = handle_skip, warning = handle_warning, message = handle_message,
error = handle_error, interrupt = handle_interrupt), error = handle_fatal)35:
tryCatchList(expr, classes, parentenv, handlers)37:
doWithOneRestart(return(expr), restart)36:
tryCatch(withCallingHandlers({38: eval(code, test_env)withOneRestart(expr, restarts[[1L]]) new_expectations <- the$test_expectations > starting_expectations
if (snapshot_skipped) {39: 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) {
snapshot_skipped <<- TRUE37: 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), 38: end_test = function() {withOneRestart(expr, restarts[[1L]]) })
39: 40: withRestarts(tryCatch(withCallingHandlers({test_code(code = exprs, env = env, reporter = get_reporter() %||% eval(code, test_env) StopReporter$new()) new_expectations <- the$test_expectations > starting_expectations
if (snapshot_skipped) {41: skip("On CRAN")source_file(path, env = env(env), desc = desc, shuffle = shuffle, } error_call = error_call) 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 ") } 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,
Traceback:
verbose = (verbosity > 4)) 1:
dispatcher(membership_name, membership_init$to_cc(), model_name, 14: .self$network_to_cc(), TRUE).self$do_with_inits(inits, Q, reinitialization_effort)
2: 15: FUN(X[[i]], ...).self$estim_ascend(reinitialization_effort, changing_effort)
3: 16: lapply(X = S, FUN = FUN, ...)private$BMobject$estimate()
4: 17: doTryCatch(return(expr), name, parentenv, handler)mySBM_sbm$optimize(estimOptions = list(verbosity = 0, plot = FALSE))
5: 18: tryCatchOne(expr, names, parentenv, handlers[[1L]])eval(code, test_env)
6: 19: tryCatchList(expr, classes, parentenv, handlers)eval(code, test_env)
7: 20: tryCatch(expr, error = function(e) {withCallingHandlers({ call <- conditionCall(e) eval(code, test_env) if (!is.null(call)) { new_expectations <- the$test_expectations > starting_expectations if (identical(call[[1L]], quote(doTryCatch))) if (snapshot_skipped) { call <- sys.call(-4L) skip("On CRAN") dcall <- deparse(call, nlines = 1L) } prefix <- paste("Error in", dcall, ": ") else if (!new_expectations && skip_on_empty) { LONG <- 75L sm <- strsplit(conditionMessage(e), "\n")[[1L]] skip_empty() w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w") } if (is.na(w)) }, expectation = handle_expectation, packageNotFoundError = function(e) { w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L], if (on_cran()) { type = "b") skip(paste0("{", e$package, "} is not installed.")) if (w > LONG) } prefix <- paste0(prefix, "\n ")}, snapshot_on_cran = function(cnd) { } snapshot_skipped <<- TRUE else prefix <- "Error : " invokeRestart("muffle_cran_snapshot") msg <- paste0(prefix, conditionMessage(e), "\n")}, skip = handle_skip, warning = handle_warning, message = handle_message, error = handle_error, interrupt = handle_interrupt) .Internal(seterrmessage(msg[1L]))
if (!silent && isTRUE(getOption("show.error.messages"))) {21: cat(msg, file = outFile)doTryCatch(return(expr), name, parentenv, handler) .Internal(printDeferredWarnings())
}22: invisible(structure(msg, class = "try-error", condition = e))tryCatchOne(expr, names, parentenv, handlers[[1L]])})
23: 8: tryCatchList(expr, classes, parentenv, handlers)try(lapply(X = S, FUN = FUN, ...), silent = TRUE)
24: 9: tryCatch(withCallingHandlers({sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE)) eval(code, test_env)
new_expectations <- the$test_expectations > starting_expectations10: if (snapshot_skipped) {FUN(X[[i]], ...) skip("On CRAN")
}11: else if (!new_expectations && skip_on_empty) {lapply(seq_len(cores), inner.do) skip_empty()
}12: }, expectation = handle_expectation, packageNotFoundError = function(e) {parallel::mclapply(X, FUN, ..., mc.cores = mc.cores, mc.set.seed = FALSE, if (on_cran()) { mc.silent = TRUE) skip(paste0("{", e$package, "} is not installed."))
}13: }, snapshot_on_cran = function(cnd) {parallel_lapply(inits, .self$do_one_estim, mc.cores = ncores, snapshot_skipped <<- TRUE verbose = (verbosity > 4)) invokeRestart("muffle_cran_snapshot")
}, skip = handle_skip, warning = handle_warning, message = handle_message, 14: error = handle_error, interrupt = handle_interrupt), error = handle_fatal).self$do_with_inits(inits, Q, reinitialization_effort)
25: doWithOneRestart(return(expr), restart)15:
26: .self$estim_ascend(reinitialization_effort, changing_effort)
withOneRestart(expr, restarts[[1L]])16:
private$BMobject$estimate()
27: 17: withRestarts(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) { skip("On CRAN")eval(code, test_env) }
else if (!new_expectations && skip_on_empty) {19: eval(code, test_env) skip_empty()
20: }withCallingHandlers({}, expectation = handle_expectation, packageNotFoundError = function(e) { eval(code, test_env) if (on_cran()) { new_expectations <- the$test_expectations > starting_expectations 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")}, skip = handle_skip, warning = handle_warning, message = handle_message, }, expectation = handle_expectation, packageNotFoundError = function(e) { error = handle_error, interrupt = handle_interrupt), error = handle_fatal), if (on_cran()) { skip(paste0("{", e$package, "} is not installed.")) end_test = function() { }}, snapshot_on_cran = function(cnd) { }) snapshot_skipped <<- TRUE
invokeRestart("muffle_cran_snapshot")28: }, skip = handle_skip, warning = handle_warning, message = handle_message, test_code(code, parent.frame()) error = handle_error, interrupt = handle_interrupt)
29: 21: test_that("SimpleSBM_fit 'Bernoulli' model, directed, one covariate", doTryCatch(return(expr), name, parentenv, handler)
{ sampler_directed_cov$rNetwork(store = TRUE)22: mySBM_sbm <- sbm::SimpleSBM_fit$new(sampler_directed_cov$networkData, tryCatchOne(expr, names, parentenv, handlers[[1L]]) "bernoulli", TRUE, covarList = covarList_directed)
mySBM_sbm$optimize(estimOptions = list(verbosity = 0, plot = FALSE))23: tryCatchList(expr, classes, parentenv, handlers) mySBM_sbm$setModel(Q)
net <- missSBM:::partlyObservedNetwork$new(sampler_directed_cov$networkData, 24: covariates = covarList_directed)tryCatch(withCallingHandlers({ eval(code, test_env) cls <- net$clustering(1:(2 * Q)) new_expectations <- the$test_expectations > starting_expectations if (snapshot_skipped) { cl <- cls[[Q]] skip("On CRAN") } mySBM_missSBM <- missSBM:::SimpleSBM_fit_withCov$new(net, else if (!new_expectations && skip_on_empty) { clusterInit = cl, covarList = covarList_directed) skip_empty() mySBM_missSBM$doVEM(trace = TRUE) }}, expectation = handle_expectation, packageNotFoundError = function(e) { expect_lt(rmse(mySBM_missSBM$connectParam$mean, mySBM_sbm$connectParam$mean), 0.1) if (on_cran()) { skip(paste0("{", e$package, "} is not installed.")) expect_gt(ARI(mySBM_missSBM$memberships, mySBM_sbm$memberships), }}, snapshot_on_cran = function(cnd) { 0.8) snapshot_skipped <<- TRUE invokeRestart("muffle_cran_snapshot") expect_lt(rmse(mySBM_missSBM$loglik, mySBM_sbm$loglik), }, skip = handle_skip, warning = handle_warning, message = handle_message, error = handle_error, interrupt = handle_interrupt), error = handle_fatal) 0.05)
25: 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), 26: 0.85)withOneRestart(expr, restarts[[1L]])
})27:
withRestarts(tryCatch(withCallingHandlers({30: eval(code, test_env) new_expectations <- the$test_expectations > starting_expectationseval(code, test_env) if (snapshot_skipped) { skip("On CRAN")
}31: else if (!new_expectations && skip_on_empty) {eval(code, test_env) skip_empty()
32: }withCallingHandlers({ eval(code, test_env)}, expectation = handle_expectation, packageNotFoundError = function(e) { if (on_cran()) { new_expectations <- the$test_expectations > starting_expectations skip(paste0("{", e$package, "} is not installed.")) } if (snapshot_skipped) {}, snapshot_on_cran = function(cnd) { skip("On CRAN") snapshot_skipped <<- TRUE } invokeRestart("muffle_cran_snapshot") else if (!new_expectations && skip_on_empty) {}, skip = handle_skip, warning = handle_warning, message = handle_message, skip_empty() error = handle_error, interrupt = handle_interrupt), error = handle_fatal), } end_test = function() { })}, expectation = handle_expectation, packageNotFoundError = function(e) {
if (on_cran()) { skip(paste0("{", e$package, "} is not installed."))28: }test_code(code, parent.frame())}, snapshot_on_cran = function(cnd) {
29: snapshot_skipped <<- TRUEtest_that("SimpleSBM_fit 'Bernoulli' model, directed, one covariate", invokeRestart("muffle_cran_snapshot") {}, skip = handle_skip, warning = handle_warning, message = handle_message, sampler_directed_cov$rNetwork(store = TRUE) error = handle_error, interrupt = handle_interrupt) mySBM_sbm <- sbm::SimpleSBM_fit$new(sampler_directed_cov$networkData, "bernoulli", TRUE, covarList = covarList_directed)
mySBM_sbm$optimize(estimOptions = list(verbosity = 0, plot = FALSE))33: doTryCatch(return(expr), name, parentenv, handler) mySBM_sbm$setModel(Q) net <- missSBM:::partlyObservedNetwork$new(sampler_directed_cov$networkData,
covariates = covarList_directed) cls <- net$clustering(1:(2 * Q))34: cl <- cls[[Q]] mySBM_missSBM <- missSBM:::SimpleSBM_fit_withCov$new(net, tryCatchOne(expr, names, parentenv, handlers[[1L]])
clusterInit = cl, covarList = covarList_directed)35: mySBM_missSBM$doVEM(trace = TRUE) expect_lt(rmse(mySBM_missSBM$connectParam$mean, mySBM_sbm$connectParam$mean), tryCatchList(expr, classes, parentenv, handlers) 0.1) expect_gt(ARI(mySBM_missSBM$memberships, mySBM_sbm$memberships),
0.8)36: tryCatch(withCallingHandlers({ expect_lt(rmse(mySBM_missSBM$loglik, mySBM_sbm$loglik), 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 0.1) if (snapshot_skipped) { expect_gt(ARI(mySBM_missSBM$memberships, sampler_directed_cov$memberships), 0.85) skip("On CRAN") })
}30: else if (!new_expectations && skip_on_empty) {eval(code, test_env) skip_empty()
}31: }, expectation = handle_expectation, packageNotFoundError = function(e) {eval(code, test_env) if (on_cran()) {
skip(paste0("{", e$package, "} is not installed."))32: }withCallingHandlers({ eval(code, test_env)}, snapshot_on_cran = function(cnd) { new_expectations <- the$test_expectations > starting_expectations if (snapshot_skipped) { snapshot_skipped <<- TRUE skip("On CRAN") } 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) {
snapshot_skipped <<- TRUE38: invokeRestart("muffle_cran_snapshot")withOneRestart(expr, restarts[[1L]])
}, skip = handle_skip, warning = handle_warning, message = handle_message, error = handle_error, interrupt = handle_interrupt)39:
withRestarts(tryCatch(withCallingHandlers({33: doTryCatch(return(expr), name, parentenv, handler) eval(code, test_env)
new_expectations <- the$test_expectations > starting_expectations34: if (snapshot_skipped) {tryCatchOne(expr, names, parentenv, handlers[[1L]]) skip("On CRAN")
} else if (!new_expectations && skip_on_empty) {35: skip_empty()tryCatchList(expr, classes, parentenv, handlers) }
36: }, 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 } 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() end_test = function() { }}, expectation = handle_expectation, packageNotFoundError = function(e) { }) 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")41: }, skip = handle_skip, warning = handle_warning, message = handle_message, source_file(path, env = env(env), desc = desc, shuffle = shuffle, error = handle_error, interrupt = handle_interrupt), error = handle_fatal)
error_call = error_call)37: doWithOneRestart(return(expr), restart)
42: 38: FUN(X[[i]], ...)withOneRestart(expr, restarts[[1L]])
43:
39: lapply(test_paths, test_one_file, env = env, desc = desc, shuffle = shuffle, withRestarts(tryCatch(withCallingHandlers({ error_call = error_call) eval(code, test_env) new_expectations <- the$test_expectations > starting_expectations
if (snapshot_skipped) {44: skip("On CRAN")doTryCatch(return(expr), name, parentenv, handler) }
else if (!new_expectations && skip_on_empty) {45: skip_empty()tryCatchOne(expr, names, parentenv, handlers[[1L]]) }
}, expectation = handle_expectation, packageNotFoundError = function(e) {46: if (on_cran()) {tryCatchList(expr, classes, parentenv, handlers) skip(paste0("{", e$package, "} is not installed."))
47: }}, snapshot_on_cran = function(cnd) {tryCatch(code, testthat_abort_reporter = function(cnd) { snapshot_skipped <<- TRUE cat(conditionMessage(cnd), "\n") NULL invokeRestart("muffle_cran_snapshot")})}, skip = handle_skip, warning = handle_warning, message = handle_message,
error = handle_error, interrupt = handle_interrupt), error = handle_fatal), 48: with_reporter(reporters$multi, lapply(test_paths, test_one_file, end_test = function() { env = env, desc = desc, shuffle = shuffle, error_call = error_call)) })
40: 49: test_code(code = exprs, env = env, reporter = get_reporter() %||% test_files_serial(test_dir = test_dir, test_package = test_package, StopReporter$new())
test_paths = test_paths, load_helpers = load_helpers, reporter = reporter, env = env, stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning, 41: source_file(path, env = env(env), desc = desc, shuffle = shuffle, desc = desc, load_package = load_package, shuffle = shuffle, error_call = error_call) error_call = error_call)
42: 50: FUN(X[[i]], ...)test_files(test_dir = path, test_paths = test_paths, test_package = package,
reporter = reporter, load_helpers = load_helpers, env = env, 43: stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning, lapply(test_paths, test_one_file, env = env, desc = desc, shuffle = shuffle, load_package = load_package, parallel = parallel, shuffle = shuffle) error_call = error_call)
51: test_dir("testthat", package = package, reporter = reporter, 44: ..., load_package = "installed")doTryCatch(return(expr), name, parentenv, handler)
52: 45: tryCatchOne(expr, names, parentenv, handlers[[1L]])test_check("missSBM")
46: An irrecoverable exception occurred. R is aborting now ...
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() }
Traceback:
}, expectation = handle_expectation, packageNotFoundError = function(e) { 1: if (on_cran()) { skip(paste0("{", e$package, "} is not installed."))dispatcher(membership_name, membership_init$to_cc(), model_name, } .self$network_to_cc(), TRUE)}, snapshot_on_cran = function(cnd) {
snapshot_skipped <<- TRUE 2: invokeRestart("muffle_cran_snapshot")}, skip = handle_skip, warning = handle_warning, message = handle_message, FUN(X[[i]], ...)
error = handle_error, interrupt = handle_interrupt), error = handle_fatal), 3: end_test = function() {lapply(X = S, FUN = FUN, ...) })
28: 4: test_code(code, parent.frame())doTryCatch(return(expr), name, parentenv, handler)
29:
test_that("SimpleSBM_fit 'Bernoulli' model, undirected, no covariate", 5: {tryCatchOne(expr, names, parentenv, handlers[[1L]]) sampler_undirected_nocov$rNetwork(store = TRUE)
mySBM_sbm <- sbm::SimpleSBM_fit$new(sampler_undirected_nocov$networkData, 6: "bernoulli", FALSE)tryCatchList(expr, classes, parentenv, handlers) mySBM_sbm$optimize(estimOptions = list(verbosity = 0,
plot = FALSE)) 7: mySBM_sbm$setModel(3)tryCatch(expr, error = function(e) { net <- missSBM:::partlyObservedNetwork$new(sampler_undirected_nocov$networkData) call <- conditionCall(e) cl <- net$clustering(3)[[1]] if (!is.null(call)) { mySBM_missSBM <- missSBM:::SimpleSBM_fit_noCov$new(net, if (identical(call[[1L]], quote(doTryCatch))) clusterInit = cl) mySBM_missSBM$doVEM() expect_lt(rmse(mySBM_missSBM$connectParam$mean, mySBM_sbm$connectParam$mean), call <- sys.call(-4L) 0.05) dcall <- deparse(call, nlines = 1L) expect_gt(ARI(mySBM_missSBM$memberships, mySBM_sbm$memberships), 0.95) prefix <- paste("Error in", dcall, ": ") expect_lt(rmse(mySBM_missSBM$loglik, mySBM_sbm$loglik), LONG <- 75L 0.01) sm <- strsplit(conditionMessage(e), "\n")[[1L]] expect_lt(rmse(mySBM_missSBM$connectParam$mean, sampler_undirected_nocov$connectParam$mean), w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w") 0.05) if (is.na(w)) expect_gt(ARI(mySBM_missSBM$memberships, sampler_undirected_nocov$memberships), w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L], 0.95) type = "b") }) if (w > LONG)
prefix <- paste0(prefix, "\n ")30: }eval(code, test_env) else prefix <- "Error : "
msg <- paste0(prefix, conditionMessage(e), "\n")31: .Internal(seterrmessage(msg[1L]))eval(code, test_env) if (!silent && isTRUE(getOption("show.error.messages"))) {
cat(msg, file = outFile)32: .Internal(printDeferredWarnings())withCallingHandlers({ } eval(code, test_env) new_expectations <- the$test_expectations > starting_expectations invisible(structure(msg, class = "try-error", condition = e)) if (snapshot_skipped) {}) skip("On CRAN")
} else if (!new_expectations && skip_on_empty) { 8: skip_empty()try(lapply(X = S, FUN = FUN, ...), silent = TRUE) }
9: }, expectation = handle_expectation, packageNotFoundError = function(e) { if (on_cran()) {sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE)) skip(paste0("{", e$package, "} is not installed."))
}10: }, snapshot_on_cran = function(cnd) {FUN(X[[i]], ...) snapshot_skipped <<- TRUE
invokeRestart("muffle_cran_snapshot")11: }, skip = handle_skip, warning = handle_warning, message = handle_message, error = handle_error, interrupt = handle_interrupt)
33: doTryCatch(return(expr), name, parentenv, handler)lapply(seq_len(cores), inner.do)
34: 12: tryCatchOne(expr, names, parentenv, handlers[[1L]])parallel::mclapply(X, FUN, ..., mc.cores = mc.cores, mc.set.seed = FALSE,
mc.silent = TRUE)35:
tryCatchList(expr, classes, parentenv, handlers)13:
parallel_lapply(inits, .self$do_one_estim, mc.cores = ncores, 36: verbose = (verbosity > 4))tryCatch(withCallingHandlers({
eval(code, test_env)14: new_expectations <- the$test_expectations > starting_expectations.self$do_with_inits(inits, Q, reinitialization_effort) if (snapshot_skipped) {
skip("On CRAN")15: .self$estim_ascend(reinitialization_effort, changing_effort) }
else if (!new_expectations && skip_on_empty) {16: skip_empty()private$BMobject$estimate() }
}, expectation = handle_expectation, packageNotFoundError = function(e) {17: if (on_cran()) {mySBM_sbm$optimize(estimOptions = list(verbosity = 0, plot = FALSE)) skip(paste0("{", e$package, "} is not installed."))
}18: }, snapshot_on_cran = function(cnd) {eval(code, test_env) snapshot_skipped <<- TRUE
invokeRestart("muffle_cran_snapshot")19: }, skip = handle_skip, warning = handle_warning, message = handle_message, eval(code, test_env) error = handle_error, interrupt = handle_interrupt), error = handle_fatal)
20: 37: withCallingHandlers({doWithOneRestart(return(expr), restart) eval(code, test_env)
new_expectations <- the$test_expectations > starting_expectations38: if (snapshot_skipped) {withOneRestart(expr, restarts[[1L]]) skip("On CRAN")
}39: else if (!new_expectations && skip_on_empty) {withRestarts(tryCatch(withCallingHandlers({ skip_empty() eval(code, test_env) } new_expectations <- the$test_expectations > starting_expectations}, expectation = handle_expectation, packageNotFoundError = function(e) { if (snapshot_skipped) { if (on_cran()) { skip("On CRAN") skip(paste0("{", e$package, "} is not installed.")) } } else if (!new_expectations && skip_on_empty) {}, snapshot_on_cran = function(cnd) { skip_empty() snapshot_skipped <<- TRUE } invokeRestart("muffle_cran_snapshot")}, expectation = handle_expectation, packageNotFoundError = function(e) {}, skip = handle_skip, warning = handle_warning, message = handle_message, if (on_cran()) { error = handle_error, interrupt = handle_interrupt) skip(paste0("{", e$package, "} is not installed."))
}21: }, snapshot_on_cran = function(cnd) {doTryCatch(return(expr), name, parentenv, handler) snapshot_skipped <<- TRUE
invokeRestart("muffle_cran_snapshot")22: }, skip = handle_skip, warning = handle_warning, message = handle_message, tryCatchOne(expr, names, parentenv, handlers[[1L]])
error = handle_error, interrupt = handle_interrupt), error = handle_fatal), 23: end_test = function() {tryCatchList(expr, classes, parentenv, handlers) })
24: 40: tryCatch(withCallingHandlers({test_code(code = exprs, env = env, reporter = get_reporter() %||% eval(code, test_env) StopReporter$new()) new_expectations <- the$test_expectations > starting_expectations
41: if (snapshot_skipped) { skip("On CRAN") } else if (!new_expectations && skip_on_empty) {source_file(path, env = env(env), desc = desc, shuffle = shuffle, skip_empty() error_call = error_call) }
}, expectation = handle_expectation, packageNotFoundError = function(e) {42: if (on_cran()) {FUN(X[[i]], ...) skip(paste0("{", e$package, "} is not installed."))
}43: }, snapshot_on_cran = function(cnd) { snapshot_skipped <<- TRUElapply(test_paths, test_one_file, env = env, desc = desc, shuffle = shuffle, invokeRestart("muffle_cran_snapshot") error_call = error_call)}, skip = handle_skip, warning = handle_warning, message = handle_message,
error = handle_error, interrupt = handle_interrupt), error = handle_fatal)44:
doTryCatch(return(expr), name, parentenv, handler)25:
doWithOneRestart(return(expr), restart)45:
tryCatchOne(expr, names, parentenv, handlers[[1L]])26:
withOneRestart(expr, restarts[[1L]])46:
tryCatchList(expr, classes, parentenv, handlers)27:
withRestarts(tryCatch(withCallingHandlers({47: eval(code, test_env)tryCatch(code, testthat_abort_reporter = function(cnd) { new_expectations <- the$test_expectations > starting_expectations if (snapshot_skipped) { cat(conditionMessage(cnd), "\n") skip("On CRAN") NULL}) }
48: else if (!new_expectations && skip_on_empty) {with_reporter(reporters$multi, lapply(test_paths, test_one_file, skip_empty() env = env, desc = desc, shuffle = shuffle, error_call = error_call)) }
}, expectation = handle_expectation, packageNotFoundError = function(e) { if (on_cran()) {49: skip(paste0("{", e$package, "} is not installed."))test_files_serial(test_dir = test_dir, test_package = test_package, } test_paths = test_paths, load_helpers = load_helpers, reporter = reporter, }, snapshot_on_cran = function(cnd) { env = env, stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning, snapshot_skipped <<- TRUE desc = desc, load_package = load_package, shuffle = shuffle, invokeRestart("muffle_cran_snapshot") error_call = error_call)}, skip = handle_skip, warning = handle_warning, message = handle_message, error = handle_error, interrupt = handle_interrupt), error = handle_fatal),
end_test = function() {50: })
test_files(test_dir = path, test_paths = test_paths, test_package = package, reporter = reporter, load_helpers = load_helpers, env = env, 28: test_code(code, parent.frame()) stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning,
29: load_package = load_package, parallel = parallel, shuffle = shuffle)test_that("SimpleSBM_fit 'Bernoulli' model, undirected, no covariate",
{51: sampler_undirected_nocov$rNetwork(store = TRUE)test_dir("testthat", package = package, reporter = reporter, mySBM_sbm <- sbm::SimpleSBM_fit$new(sampler_undirected_nocov$networkData, ..., load_package = "installed") "bernoulli", FALSE)
mySBM_sbm$optimize(estimOptions = list(verbosity = 0, 52: plot = FALSE))test_check("missSBM") mySBM_sbm$setModel(3)
net <- missSBM:::partlyObservedNetwork$new(sampler_undirected_nocov$networkData)An irrecoverable exception occurred. R is aborting now ...
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:
Traceback:
1: 1: dispatcher(membership_name, membership_init$to_cc(), model_name, dispatcher(membership_name, membership_init$to_cc(), model_name, .self$network_to_cc(), TRUE) .self$network_to_cc(), TRUE)
2: FUN(X[[i]], ...)
2:
FUN(X[[i]], ...) 3:
lapply(X = S, FUN = FUN, ...) 3:
lapply(X = S, FUN = FUN, ...) 4:
doTryCatch(return(expr), name, parentenv, handler)
4: 5: doTryCatch(return(expr), name, parentenv, handler)tryCatchOne(expr, names, parentenv, handlers[[1L]])
5: 6: tryCatchOne(expr, names, parentenv, handlers[[1L]])
tryCatchList(expr, classes, parentenv, handlers) 6:
tryCatchList(expr, classes, parentenv, handlers) 7:
tryCatch(expr, error = function(e) { 7: call <- conditionCall(e)tryCatch(expr, error = function(e) { if (!is.null(call)) { call <- conditionCall(e) if (identical(call[[1L]], quote(doTryCatch))) call <- sys.call(-4L) if (!is.null(call)) { dcall <- deparse(call, nlines = 1L) if (identical(call[[1L]], quote(doTryCatch))) prefix <- paste("Error in", dcall, ": ") call <- sys.call(-4L) LONG <- 75L dcall <- deparse(call, nlines = 1L) sm <- strsplit(conditionMessage(e), "\n")[[1L]] prefix <- paste("Error in", dcall, ": ") LONG <- 75L w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w") sm <- strsplit(conditionMessage(e), "\n")[[1L]] if (is.na(w)) w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w") w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L], if (is.na(w)) type = "b") w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L], if (w > LONG) type = "b") prefix <- paste0(prefix, "\n ") if (w > LONG) } prefix <- paste0(prefix, "\n ") else prefix <- "Error : " } msg <- paste0(prefix, conditionMessage(e), "\n") else prefix <- "Error : " .Internal(seterrmessage(msg[1L])) msg <- paste0(prefix, conditionMessage(e), "\n") if (!silent && isTRUE(getOption("show.error.messages"))) { .Internal(seterrmessage(msg[1L])) cat(msg, file = outFile) if (!silent && isTRUE(getOption("show.error.messages"))) { .Internal(printDeferredWarnings()) cat(msg, file = outFile) } invisible(structure(msg, class = "try-error", condition = e)) .Internal(printDeferredWarnings())}) }
invisible(structure(msg, class = "try-error", condition = e)) 8: })try(lapply(X = S, FUN = FUN, ...), silent = TRUE)
8: 9: try(lapply(X = S, FUN = FUN, ...), silent = TRUE)sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE))
9: 10: sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE))FUN(X[[i]], ...)
10: 11: FUN(X[[i]], ...)lapply(seq_len(cores), inner.do)
11: 12: lapply(seq_len(cores), inner.do)parallel::mclapply(X, FUN, ..., mc.cores = mc.cores, mc.set.seed = FALSE,
12: mc.silent = TRUE)
parallel::mclapply(X, FUN, ..., mc.cores = mc.cores, mc.set.seed = FALSE, 13: mc.silent = TRUE)parallel_lapply(inits, .self$do_one_estim, mc.cores = ncores,
13: verbose = (verbosity > 4))
parallel_lapply(inits, .self$do_one_estim, mc.cores = ncores, 14: verbose = (verbosity > 4)).self$do_with_inits(inits, Q, reinitialization_effort)
14: 15: .self$estim_ascend(reinitialization_effort, changing_effort).self$do_with_inits(inits, Q, reinitialization_effort)
15: 16: .self$estim_ascend(reinitialization_effort, changing_effort)private$BMobject$estimate()
16: 17: private$BMobject$estimate()mySBM_sbm$optimize(estimOptions = list(verbosity = 0, plot = FALSE))
17:
mySBM_sbm$optimize(estimOptions = list(verbosity = 0, plot = FALSE))18:
eval(code, test_env)18: eval(code, test_env)
19: 19: eval(code, test_env)eval(code, test_env)
20: 20: withCallingHandlers({withCallingHandlers({ eval(code, test_env) eval(code, test_env) new_expectations <- the$test_expectations > starting_expectations new_expectations <- the$test_expectations > starting_expectations if (snapshot_skipped) { if (snapshot_skipped) { skip("On CRAN") skip("On CRAN") } } else if (!new_expectations && skip_on_empty) { else if (!new_expectations && skip_on_empty) { skip_empty() } skip_empty()}, expectation = handle_expectation, packageNotFoundError = function(e) { if (on_cran()) { } skip(paste0("{", e$package, "} is not installed."))}, expectation = handle_expectation, packageNotFoundError = function(e) { } if (on_cran()) {}, snapshot_on_cran = function(cnd) { skip(paste0("{", e$package, "} is not installed.")) snapshot_skipped <<- TRUE } invokeRestart("muffle_cran_snapshot")}, snapshot_on_cran = function(cnd) {}, skip = handle_skip, warning = handle_warning, message = handle_message, snapshot_skipped <<- TRUE error = handle_error, interrupt = handle_interrupt) invokeRestart("muffle_cran_snapshot")
}, skip = handle_skip, warning = handle_warning, message = handle_message, 21: error = handle_error, interrupt = handle_interrupt)doTryCatch(return(expr), name, parentenv, handler)
21: 22: doTryCatch(return(expr), name, parentenv, handler)tryCatchOne(expr, names, parentenv, handlers[[1L]])
23: 22: tryCatchList(expr, classes, parentenv, handlers)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) { }}, expectation = handle_expectation, packageNotFoundError = function(e) { if (on_cran()) { skip("On CRAN") skip(paste0("{", e$package, "} is not installed.")) } } else if (!new_expectations && skip_on_empty) {}, snapshot_on_cran = function(cnd) { skip_empty() snapshot_skipped <<- TRUE invokeRestart("muffle_cran_snapshot") }}, skip = handle_skip, warning = handle_warning, message = handle_message, }, expectation = handle_expectation, packageNotFoundError = function(e) { error = handle_error, interrupt = handle_interrupt), error = handle_fatal) if (on_cran()) {
skip(paste0("{", e$package, "} is not installed."))25: }doWithOneRestart(return(expr), restart)}, snapshot_on_cran = function(cnd) {
snapshot_skipped <<- TRUE26: invokeRestart("muffle_cran_snapshot")withOneRestart(expr, restarts[[1L]])}, skip = handle_skip, warning = handle_warning, message = handle_message,
error = handle_error, interrupt = handle_interrupt), error = handle_fatal)27:
withRestarts(tryCatch(withCallingHandlers({ eval(code, test_env)25: doWithOneRestart(return(expr), restart) new_expectations <- the$test_expectations > starting_expectations if (snapshot_skipped) { skip("On CRAN")
}26: else if (!new_expectations && skip_on_empty) {withOneRestart(expr, restarts[[1L]]) skip_empty() }
}, expectation = handle_expectation, packageNotFoundError = function(e) { if (on_cran()) {27: skip(paste0("{", e$package, "} is not installed."))withRestarts(tryCatch(withCallingHandlers({ } eval(code, test_env)}, snapshot_on_cran = function(cnd) { new_expectations <- the$test_expectations > starting_expectations if (snapshot_skipped) { snapshot_skipped <<- TRUE skip("On CRAN") invokeRestart("muffle_cran_snapshot") }}, skip = handle_skip, warning = handle_warning, message = handle_message, else if (!new_expectations && skip_on_empty) { skip_empty() error = handle_error, interrupt = handle_interrupt), error = handle_fatal), } end_test = function() {}, expectation = handle_expectation, packageNotFoundError = function(e) { }) if (on_cran()) {
skip(paste0("{", e$package, "} is not installed."))28: }test_code(code, parent.frame())
}, snapshot_on_cran = function(cnd) {29: snapshot_skipped <<- TRUEtest_that("SimpleSBM_fit 'Bernoulli' model, directed, no covariate", invokeRestart("muffle_cran_snapshot") {}, skip = handle_skip, warning = handle_warning, message = handle_message, sampler_directed_nocov$rNetwork(store = TRUE) error = handle_error, interrupt = handle_interrupt), error = handle_fatal), mySBM_sbm <- sbm::SimpleSBM_fit$new(sampler_directed_nocov$networkData, end_test = function() { "bernoulli", TRUE) })
mySBM_sbm$optimize(estimOptions = list(verbosity = 0, 28: plot = FALSE))test_code(code, parent.frame())
mySBM_sbm$setModel(3)29: net <- missSBM:::partlyObservedNetwork$new(sampler_directed_nocov$networkData)test_that("SimpleSBM_fit 'Bernoulli' model, directed, no covariate", { cl <- net$clustering(3)[[1]] sampler_directed_nocov$rNetwork(store = TRUE) mySBM_missSBM <- missSBM:::SimpleSBM_fit_noCov$new(sampler_directed_nocov$networkData, mySBM_sbm <- sbm::SimpleSBM_fit$new(sampler_directed_nocov$networkData, clusterInit = cl) "bernoulli", TRUE) mySBM_missSBM$doVEM() mySBM_sbm$optimize(estimOptions = list(verbosity = 0, expect_lt(rmse(mySBM_missSBM$connectParam$mean, mySBM_sbm$connectParam$mean), plot = FALSE)) 0.1) mySBM_sbm$setModel(3) net <- missSBM:::partlyObservedNetwork$new(sampler_directed_nocov$networkData) expect_gt(ARI(mySBM_missSBM$memberships, mySBM_sbm$memberships), cl <- net$clustering(3)[[1]] 0.95) mySBM_missSBM <- missSBM:::SimpleSBM_fit_noCov$new(sampler_directed_nocov$networkData, expect_lt(rmse(mySBM_missSBM$loglik, mySBM_sbm$loglik), clusterInit = cl) 0.01) mySBM_missSBM$doVEM() expect_lt(rmse(mySBM_missSBM$connectParam$mean, sampler_directed_nocov$connectParam$mean), expect_lt(rmse(mySBM_missSBM$connectParam$mean, mySBM_sbm$connectParam$mean), 0.1) 0.1) expect_lt(rmse(mySBM_missSBM$covarParam, sampler_directed_cov$covarParam), expect_gt(ARI(mySBM_missSBM$memberships, mySBM_sbm$memberships), 0.95) 0.2) expect_lt(rmse(mySBM_missSBM$loglik, mySBM_sbm$loglik), expect_gt(ARI(mySBM_missSBM$memberships, sampler_directed_nocov$memberships), 0.01) 0.95) expect_lt(rmse(mySBM_missSBM$connectParam$mean, sampler_directed_nocov$connectParam$mean), }) 0.1)
expect_lt(rmse(mySBM_missSBM$covarParam, sampler_directed_cov$covarParam), 30: 0.2)eval(code, test_env) expect_gt(ARI(mySBM_missSBM$memberships, sampler_directed_nocov$memberships), 0.95)
})31:
eval(code, test_env)30:
32: withCallingHandlers({eval(code, test_env) eval(code, test_env)
new_expectations <- the$test_expectations > starting_expectations31: if (snapshot_skipped) {eval(code, test_env) skip("On CRAN")
}32: else if (!new_expectations && skip_on_empty) {withCallingHandlers({ skip_empty() eval(code, test_env) } new_expectations <- the$test_expectations > starting_expectations}, expectation = handle_expectation, packageNotFoundError = function(e) { if (snapshot_skipped) { 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) { if (on_cran()) { invokeRestart("muffle_cran_snapshot") 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
33: 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)34:
tryCatchOne(expr, names, parentenv, handlers[[1L]])33:
doTryCatch(return(expr), name, parentenv, handler)35:
tryCatchList(expr, classes, parentenv, handlers)34:
tryCatchOne(expr, names, parentenv, handlers[[1L]])36:
tryCatch(withCallingHandlers({ eval(code, test_env)35: new_expectations <- the$test_expectations > starting_expectations if (snapshot_skipped) {tryCatchList(expr, classes, parentenv, handlers) skip("On CRAN") }
else if (!new_expectations && skip_on_empty) {36: tryCatch(withCallingHandlers({ skip_empty() } eval(code, test_env) new_expectations <- the$test_expectations > starting_expectations}, expectation = handle_expectation, packageNotFoundError = function(e) { if (snapshot_skipped) { if (on_cran()) { skip("On CRAN") skip(paste0("{", e$package, "} is not installed.")) } } else if (!new_expectations && skip_on_empty) {}, snapshot_on_cran = function(cnd) { skip_empty() snapshot_skipped <<- TRUE } invokeRestart("muffle_cran_snapshot")}, expectation = handle_expectation, packageNotFoundError = function(e) {}, skip = handle_skip, warning = handle_warning, message = handle_message, if (on_cran()) { error = handle_error, interrupt = handle_interrupt), error = handle_fatal) skip(paste0("{", e$package, "} is not installed.")) }
}, snapshot_on_cran = function(cnd) { snapshot_skipped <<- TRUE37: 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)38:
withOneRestart(expr, restarts[[1L]])37:
doWithOneRestart(return(expr), restart)39:
38: withRestarts(tryCatch(withCallingHandlers({withOneRestart(expr, restarts[[1L]]) eval(code, test_env)
new_expectations <- the$test_expectations > starting_expectations39: withRestarts(tryCatch(withCallingHandlers({ 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()) { 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, } 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, 40: error = handle_error, interrupt = handle_interrupt), error = handle_fatal), end_test = function() {test_code(code = exprs, env = env, reporter = get_reporter() %||% }) StopReporter$new())
40: 41: test_code(code = exprs, env = env, reporter = get_reporter() %||% source_file(path, env = env(env), desc = desc, shuffle = shuffle, StopReporter$new()) error_call = error_call)
41: 42: source_file(path, env = env(env), desc = desc, shuffle = shuffle, FUN(X[[i]], ...) error_call = error_call)
43: lapply(test_paths, test_one_file, env = env, desc = desc, shuffle = shuffle, error_call = error_call)42: FUN(X[[i]], ...)
44: 43: doTryCatch(return(expr), name, parentenv, handler)lapply(test_paths, test_one_file, env = env, desc = desc, shuffle = shuffle,
error_call = error_call)45: 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") NULL46: })tryCatchList(expr, classes, parentenv, handlers)
48: 47: with_reporter(reporters$multi, lapply(test_paths, test_one_file, tryCatch(code, testthat_abort_reporter = function(cnd) { env = env, desc = desc, shuffle = shuffle, error_call = error_call)) cat(conditionMessage(cnd), "\n")
NULL49: })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, 48: desc = desc, load_package = load_package, shuffle = shuffle, with_reporter(reporters$multi, lapply(test_paths, test_one_file, error_call = error_call)
env = env, desc = desc, shuffle = shuffle, error_call = error_call))50:
test_files(test_dir = path, test_paths = test_paths, test_package = package, 49: reporter = reporter, load_helpers = load_helpers, env = env, test_files_serial(test_dir = test_dir, test_package = test_package, stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning, test_paths = test_paths, load_helpers = load_helpers, reporter = reporter, env = env, stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning, load_package = load_package, parallel = parallel, shuffle = shuffle) desc = desc, load_package = load_package, shuffle = shuffle,
error_call = error_call)51:
test_dir("testthat", package = package, reporter = reporter, 50: ..., load_package = "installed")
test_files(test_dir = path, test_paths = test_paths, test_package = package, reporter = reporter, load_helpers = load_helpers, env = env, 52: stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning, test_check("missSBM") load_package = load_package, parallel = parallel, shuffle = shuffle)
An irrecoverable exception occurred. R is aborting now ...
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