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