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