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