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