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