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