Last updated on 2026-10-07 13:58:26 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 | OK | ||||
| r-devel-linux-x86_64-fedora-clang | 1.1.0 | 60.00 | 245.64 | 305.64 | 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 | 78.51 | 347.22 | 425.73 | 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 | 19.00 | 100.00 | 119.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 | 119.00 | 500.00 | 619.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)
Traceback:
24: 1: tryCatch(withCallingHandlers({dispatcher(membership_name, membership_init$to_cc(), model_name, eval(code, test_env) .self$network_to_cc(), TRUE) new_expectations <- the$test_expectations > starting_expectations
if (snapshot_skipped) { 2: skip("On CRAN")FUN(X[[i]], ...) }
else if (!new_expectations && skip_on_empty) { 3: skip_empty()lapply(X = S, FUN = FUN, ...) }
}, expectation = handle_expectation, packageNotFoundError = function(e) { 4: if (on_cran()) {doTryCatch(return(expr), name, parentenv, handler) skip(paste0("{", e$package, "} is not installed."))
} 5: }, snapshot_on_cran = function(cnd) {tryCatchOne(expr, names, parentenv, handlers[[1L]]) snapshot_skipped <<- TRUE
invokeRestart("muffle_cran_snapshot") 6: }, skip = handle_skip, warning = handle_warning, message = handle_message, tryCatchList(expr, classes, parentenv, handlers) error = handle_error, interrupt = handle_interrupt), error = handle_fatal)
7: 25: tryCatch(expr, error = function(e) {doWithOneRestart(return(expr), restart) call <- conditionCall(e)
if (!is.null(call)) {26: if (identical(call[[1L]], quote(doTryCatch))) withOneRestart(expr, restarts[[1L]]) call <- sys.call(-4L) dcall <- deparse(call, nlines = 1L)
prefix <- paste("Error in", dcall, ": ")27: LONG <- 75LwithRestarts(tryCatch(withCallingHandlers({ eval(code, test_env) sm <- strsplit(conditionMessage(e), "\n")[[1L]] new_expectations <- the$test_expectations > starting_expectations w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w") if (snapshot_skipped) { if (is.na(w)) skip("On CRAN") w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L], } type = "b") else if (!new_expectations && skip_on_empty) { if (w > LONG) skip_empty() prefix <- paste0(prefix, "\n ") } }}, expectation = handle_expectation, packageNotFoundError = function(e) { else prefix <- "Error : " if (on_cran()) { msg <- paste0(prefix, conditionMessage(e), "\n") skip(paste0("{", e$package, "} is not installed.")) } .Internal(seterrmessage(msg[1L]))}, snapshot_on_cran = function(cnd) { if (!silent && isTRUE(getOption("show.error.messages"))) { snapshot_skipped <<- TRUE cat(msg, file = outFile) invokeRestart("muffle_cran_snapshot") .Internal(printDeferredWarnings())}, skip = handle_skip, warning = handle_warning, message = handle_message, } error = handle_error, interrupt = handle_interrupt), error = handle_fatal), invisible(structure(msg, class = "try-error", condition = e))}) end_test = function() {
}) 8:
try(lapply(X = S, FUN = FUN, ...), silent = TRUE)28:
test_code(code, parent.frame()) 9:
sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE))29:
10: test_that("SimpleSBM_fit 'Bernoulli' model, undirected, one covariate", FUN(X[[i]], ...) {
sampler_undirected_cov$rNetwork(store = TRUE)11: mySBM_sbm <- sbm::SimpleSBM_fit$new(sampler_undirected_cov$networkData, lapply(seq_len(cores), inner.do)
"bernoulli", FALSE, covarList = covarList_undirected) mySBM_sbm$optimize(estimOptions = list(verbosity = 0, 12: plot = FALSE))parallel::mclapply(X, FUN, ..., mc.cores = mc.cores, mc.set.seed = FALSE, mySBM_sbm$setModel(Q) mc.silent = TRUE) net <- missSBM:::partlyObservedNetwork$new(sampler_undirected_cov$networkData,
covariates = covarList_undirected)13: cls <- net$clustering(1:(2 * Q))parallel_lapply(inits, .self$do_one_estim, mc.cores = ncores, cl <- cls[[Q]] verbose = (verbosity > 4)) mySBM_missSBM <- missSBM:::SimpleSBM_fit_withCov$new(net,
clusterInit = cl, covarList = covarList_undirected)14: mySBM_missSBM$doVEM() expect_lt(rmse(mySBM_missSBM$connectParam$mean, mySBM_sbm$connectParam$mean), .self$do_with_inits(inits, Q, reinitialization_effort) 0.05)
expect_gt(ARI(mySBM_missSBM$memberships, mySBM_sbm$memberships), 15: 0.8).self$estim_ascend(reinitialization_effort, changing_effort) expect_lt(rmse(mySBM_missSBM$loglik, mySBM_sbm$loglik),
0.01)16: expect_lt(rmse(mySBM_missSBM$connectParam$mean, sampler_undirected_cov$connectParam$mean), private$BMobject$estimate() 0.1)
expect_lt(rmse(mySBM_missSBM$covarParam, sampler_undirected_cov$covarParam), 17: 0.1)mySBM_sbm$optimize(estimOptions = list(verbosity = 0, plot = FALSE)) expect_gt(ARI(mySBM_missSBM$memberships, sampler_undirected_cov$memberships),
0.85)18: })
eval(code, test_env)30:
eval(code, test_env)19:
eval(code, test_env)31:
eval(code, test_env)
20: 32: 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") 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)21:
doTryCatch(return(expr), name, parentenv, handler)34:
tryCatchOne(expr, names, parentenv, handlers[[1L]])22:
tryCatchOne(expr, names, parentenv, handlers[[1L]])35:
tryCatchList(expr, classes, parentenv, handlers)23:
tryCatchList(expr, classes, parentenv, handlers)36:
tryCatch(withCallingHandlers({24: eval(code, test_env)tryCatch(withCallingHandlers({ new_expectations <- the$test_expectations > starting_expectations eval(code, test_env) if (snapshot_skipped) { new_expectations <- the$test_expectations > starting_expectations skip("On CRAN") if (snapshot_skipped) { } skip("On CRAN") else if (!new_expectations && skip_on_empty) { } skip_empty() else if (!new_expectations && skip_on_empty) { } skip_empty()}, expectation = handle_expectation, packageNotFoundError = function(e) { if (on_cran()) { } 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 } 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), error = handle_fatal) invokeRestart("muffle_cran_snapshot")
}, skip = handle_skip, warning = handle_warning, message = handle_message, 37: error = handle_error, interrupt = handle_interrupt), error = handle_fatal)doWithOneRestart(return(expr), restart)
25: 38: doWithOneRestart(return(expr), restart)withOneRestart(expr, restarts[[1L]])
26: 39: withOneRestart(expr, restarts[[1L]])withRestarts(tryCatch(withCallingHandlers({
eval(code, test_env)27: new_expectations <- the$test_expectations > starting_expectationswithRestarts(tryCatch(withCallingHandlers({ if (snapshot_skipped) { eval(code, test_env) skip("On CRAN") new_expectations <- the$test_expectations > starting_expectations } if (snapshot_skipped) { else if (!new_expectations && skip_on_empty) { skip("On CRAN") skip_empty() } } else if (!new_expectations && skip_on_empty) {}, expectation = handle_expectation, packageNotFoundError = function(e) { skip_empty() if (on_cran()) { } 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 } 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), error = handle_fatal), invokeRestart("muffle_cran_snapshot") end_test = function() {}, skip = handle_skip, warning = handle_warning, message = handle_message, }) error = handle_error, interrupt = handle_interrupt), error = handle_fatal), end_test = function() {
})
40: 28: test_code(code = exprs, env = env, reporter = get_reporter() %||% test_code(code, parent.frame()) StopReporter$new())
29: 41: test_that("SimpleSBM_fit 'Bernoulli' model, undirected, one covariate", source_file(path, env = env(env), desc = desc, shuffle = shuffle, { error_call = error_call) sampler_undirected_cov$rNetwork(store = TRUE)
mySBM_sbm <- sbm::SimpleSBM_fit$new(sampler_undirected_cov$networkData, 42: "bernoulli", FALSE, covarList = covarList_undirected)FUN(X[[i]], ...) mySBM_sbm$optimize(estimOptions = list(verbosity = 0,
plot = FALSE))43: mySBM_sbm$setModel(Q)lapply(test_paths, test_one_file, env = env, desc = desc, shuffle = shuffle, net <- missSBM:::partlyObservedNetwork$new(sampler_undirected_cov$networkData, error_call = error_call)
covariates = covarList_undirected)44: cls <- net$clustering(1:(2 * Q))doTryCatch(return(expr), name, parentenv, handler) cl <- cls[[Q]]
mySBM_missSBM <- missSBM:::SimpleSBM_fit_withCov$new(net, 45: clusterInit = cl, covarList = covarList_undirected)tryCatchOne(expr, names, parentenv, handlers[[1L]]) mySBM_missSBM$doVEM()
expect_lt(rmse(mySBM_missSBM$connectParam$mean, mySBM_sbm$connectParam$mean), 46: 0.05)tryCatchList(expr, classes, parentenv, handlers) expect_gt(ARI(mySBM_missSBM$memberships, mySBM_sbm$memberships),
0.8)47: expect_lt(rmse(mySBM_missSBM$loglik, mySBM_sbm$loglik), tryCatch(code, testthat_abort_reporter = function(cnd) { 0.01) cat(conditionMessage(cnd), "\n") expect_lt(rmse(mySBM_missSBM$connectParam$mean, sampler_undirected_cov$connectParam$mean), NULL 0.1)}) expect_lt(rmse(mySBM_missSBM$covarParam, sampler_undirected_cov$covarParam),
0.1)48: expect_gt(ARI(mySBM_missSBM$memberships, sampler_undirected_cov$memberships), with_reporter(reporters$multi, lapply(test_paths, test_one_file, 0.85) env = env, desc = desc, shuffle = shuffle, error_call = error_call)) })
49: 30: test_files_serial(test_dir = test_dir, test_package = test_package, eval(code, test_env) test_paths = test_paths, load_helpers = load_helpers, reporter = reporter,
env = env, stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning, 31: desc = desc, load_package = load_package, shuffle = shuffle, eval(code, test_env) error_call = error_call)
32: 50: withCallingHandlers({test_files(test_dir = path, test_paths = test_paths, test_package = package, eval(code, test_env) reporter = reporter, load_helpers = load_helpers, env = env, new_expectations <- the$test_expectations > starting_expectations stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning, if (snapshot_skipped) { load_package = load_package, parallel = parallel, shuffle = shuffle) skip("On CRAN")
51: }test_dir("testthat", package = package, reporter = reporter, else if (!new_expectations && skip_on_empty) { ..., 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-with-covariates-16.R
*** caught segfault ***
*** caught segfault ***
address 0x110, cause 'invalid permissions'
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, ...)
Traceback:
4: 1: doTryCatch(return(expr), name, parentenv, handler)dispatcher(membership_name, membership_init$to_cc(), model_name,
.self$network_to_cc(), TRUE) 5:
tryCatchOne(expr, names, parentenv, handlers[[1L]]) 2:
FUN(X[[i]], ...) 6:
tryCatchList(expr, classes, parentenv, handlers) 3:
lapply(X = S, FUN = FUN, ...) 7:
tryCatch(expr, error = function(e) { 4: call <- conditionCall(e)doTryCatch(return(expr), name, parentenv, handler) if (!is.null(call)) {
if (identical(call[[1L]], quote(doTryCatch))) 5: call <- sys.call(-4L)tryCatchOne(expr, names, parentenv, handlers[[1L]]) dcall <- deparse(call, nlines = 1L)
prefix <- paste("Error in", dcall, ": ") 6: tryCatchList(expr, classes, parentenv, handlers) 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) w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L], if (!is.null(call)) { type = "b") if (identical(call[[1L]], quote(doTryCatch))) if (w > LONG) call <- sys.call(-4L) prefix <- paste0(prefix, "\n ") dcall <- deparse(call, nlines = 1L) } prefix <- paste("Error in", dcall, ": ") else prefix <- "Error : " LONG <- 75L msg <- paste0(prefix, conditionMessage(e), "\n") sm <- strsplit(conditionMessage(e), "\n")[[1L]] .Internal(seterrmessage(msg[1L])) w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w") if (!silent && isTRUE(getOption("show.error.messages"))) { if (is.na(w)) cat(msg, file = outFile) w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L], .Internal(printDeferredWarnings()) type = "b") } if (w > LONG) invisible(structure(msg, class = "try-error", condition = e)) prefix <- paste0(prefix, "\n ")}) }
else prefix <- "Error : " 8: msg <- paste0(prefix, conditionMessage(e), "\n")try(lapply(X = S, FUN = FUN, ...), silent = TRUE) .Internal(seterrmessage(msg[1L]))
if (!silent && isTRUE(getOption("show.error.messages"))) { 9: cat(msg, file = outFile)sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE)) .Internal(printDeferredWarnings())
}10: invisible(structure(msg, class = "try-error", condition = e))FUN(X[[i]], ...)})
11: 8: lapply(seq_len(cores), inner.do)try(lapply(X = S, FUN = FUN, ...), silent = TRUE)
12: 9: parallel::mclapply(X, FUN, ..., mc.cores = mc.cores, mc.set.seed = FALSE, sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE)) mc.silent = TRUE)
10: 13: FUN(X[[i]], ...)parallel_lapply(inits, .self$do_one_estim, mc.cores = ncores,
verbose = (verbosity > 4))11:
lapply(seq_len(cores), inner.do)14:
.self$do_with_inits(inits, Q, reinitialization_effort)12:
parallel::mclapply(X, FUN, ..., mc.cores = mc.cores, mc.set.seed = FALSE, 15: mc.silent = TRUE).self$estim_ascend(reinitialization_effort, changing_effort)
13: 16: parallel_lapply(inits, .self$do_one_estim, mc.cores = ncores, private$BMobject$estimate() verbose = (verbosity > 4))
17: 14: mySBM_sbm$optimize(estimOptions = list(verbosity = 0, plot = FALSE)).self$do_with_inits(inits, Q, reinitialization_effort)
18: 15: eval(code, test_env).self$estim_ascend(reinitialization_effort, changing_effort)
19: 16: eval(code, test_env)private$BMobject$estimate()
20: 17: withCallingHandlers({mySBM_sbm$optimize(estimOptions = list(verbosity = 0, plot = FALSE)) eval(code, test_env)
new_expectations <- the$test_expectations > starting_expectations18: if (snapshot_skipped) {eval(code, test_env) skip("On CRAN")
}19: else if (!new_expectations && skip_on_empty) {eval(code, test_env) skip_empty()
}20: }, 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) { skip("On CRAN") snapshot_skipped <<- TRUE } invokeRestart("muffle_cran_snapshot") else if (!new_expectations && skip_on_empty) {}, skip = handle_skip, warning = handle_warning, message = handle_message, skip_empty() error = handle_error, interrupt = handle_interrupt) }
}, expectation = handle_expectation, packageNotFoundError = function(e) {21: if (on_cran()) {doTryCatch(return(expr), name, parentenv, handler) skip(paste0("{", e$package, "} is not installed."))
}22: }, snapshot_on_cran = function(cnd) {tryCatchOne(expr, names, parentenv, handlers[[1L]]) snapshot_skipped <<- TRUE
invokeRestart("muffle_cran_snapshot")23: }, skip = handle_skip, warning = handle_warning, message = handle_message, tryCatchList(expr, classes, parentenv, handlers)
24: error = handle_error, interrupt = handle_interrupt)
21: tryCatch(withCallingHandlers({doTryCatch(return(expr), name, parentenv, handler) eval(code, test_env)
new_expectations <- the$test_expectations > starting_expectations22: tryCatchOne(expr, names, parentenv, handlers[[1L]]) if (snapshot_skipped) {
skip("On CRAN")23: }tryCatchList(expr, classes, parentenv, handlers) else if (!new_expectations && skip_on_empty) {
skip_empty()24: }tryCatch(withCallingHandlers({}, expectation = handle_expectation, packageNotFoundError = function(e) { eval(code, test_env) if (on_cran()) { new_expectations <- the$test_expectations > starting_expectations skip(paste0("{", e$package, "} is not installed.")) if (snapshot_skipped) { } skip("On CRAN")}, snapshot_on_cran = function(cnd) { } snapshot_skipped <<- TRUE else if (!new_expectations && skip_on_empty) { invokeRestart("muffle_cran_snapshot") skip_empty() }}, expectation = handle_expectation, packageNotFoundError = function(e) {}, skip = handle_skip, warning = handle_warning, message = handle_message, if (on_cran()) { error = handle_error, interrupt = handle_interrupt), error = handle_fatal)
skip(paste0("{", e$package, "} is not installed."))25: }doWithOneRestart(return(expr), restart)}, snapshot_on_cran = function(cnd) {
snapshot_skipped <<- TRUE26: withOneRestart(expr, restarts[[1L]]) invokeRestart("muffle_cran_snapshot")
}, skip = handle_skip, warning = handle_warning, message = handle_message, 27: error = handle_error, interrupt = handle_interrupt), error = handle_fatal)withRestarts(tryCatch(withCallingHandlers({
eval(code, test_env)25: new_expectations <- the$test_expectations > starting_expectationsdoWithOneRestart(return(expr), restart)
if (snapshot_skipped) {26: skip("On CRAN")withOneRestart(expr, restarts[[1L]])
}27: else if (!new_expectations && skip_on_empty) {withRestarts(tryCatch(withCallingHandlers({ skip_empty() eval(code, test_env) } new_expectations <- the$test_expectations > starting_expectations}, expectation = handle_expectation, packageNotFoundError = function(e) { if (snapshot_skipped) { if (on_cran()) { skip("On CRAN") skip(paste0("{", e$package, "} is not installed.")) } } else if (!new_expectations && skip_on_empty) {}, snapshot_on_cran = function(cnd) { skip_empty() snapshot_skipped <<- TRUE } invokeRestart("muffle_cran_snapshot")}, expectation = handle_expectation, packageNotFoundError = function(e) {}, skip = handle_skip, warning = handle_warning, message = handle_message, if (on_cran()) { error = handle_error, interrupt = handle_interrupt), error = handle_fatal), skip(paste0("{", e$package, "} is not installed.")) end_test = function() { } })}, snapshot_on_cran = function(cnd) {
snapshot_skipped <<- TRUE28: invokeRestart("muffle_cran_snapshot")test_code(code, parent.frame())}, skip = handle_skip, warning = handle_warning, message = handle_message,
error = handle_error, interrupt = handle_interrupt), error = handle_fatal), 29: end_test = function() {test_that("SimpleSBM_fit 'Bernoulli' model, directed, one covariate", }) {
sampler_directed_cov$rNetwork(store = TRUE)28: mySBM_sbm <- sbm::SimpleSBM_fit$new(sampler_directed_cov$networkData, test_code(code, parent.frame()) "bernoulli", TRUE, covarList = covarList_directed)
mySBM_sbm$optimize(estimOptions = list(verbosity = 0, 29: plot = FALSE))test_that("SimpleSBM_fit 'Bernoulli' model, directed, one covariate", mySBM_sbm$setModel(Q) { net <- missSBM:::partlyObservedNetwork$new(sampler_directed_cov$networkData, sampler_directed_cov$rNetwork(store = TRUE) covariates = covarList_directed) mySBM_sbm <- sbm::SimpleSBM_fit$new(sampler_directed_cov$networkData, cls <- net$clustering(1:(2 * Q)) "bernoulli", TRUE, covarList = covarList_directed) cl <- cls[[Q]] mySBM_sbm$optimize(estimOptions = list(verbosity = 0, mySBM_missSBM <- missSBM:::SimpleSBM_fit_withCov$new(net, plot = FALSE)) clusterInit = cl, covarList = covarList_directed) mySBM_sbm$setModel(Q) mySBM_missSBM$doVEM(trace = TRUE) net <- missSBM:::partlyObservedNetwork$new(sampler_directed_cov$networkData, expect_lt(rmse(mySBM_missSBM$connectParam$mean, mySBM_sbm$connectParam$mean), covariates = covarList_directed) 0.1) cls <- net$clustering(1:(2 * Q)) expect_gt(ARI(mySBM_missSBM$memberships, mySBM_sbm$memberships), cl <- cls[[Q]] 0.8) mySBM_missSBM <- missSBM:::SimpleSBM_fit_withCov$new(net, expect_lt(rmse(mySBM_missSBM$loglik, mySBM_sbm$loglik), clusterInit = cl, covarList = covarList_directed) 0.05) mySBM_missSBM$doVEM(trace = TRUE) expect_lt(rmse(mySBM_missSBM$connectParam$mean, sampler_directed_cov$connectParam$mean), expect_lt(rmse(mySBM_missSBM$connectParam$mean, mySBM_sbm$connectParam$mean), 0.1) 0.1) expect_gt(ARI(mySBM_missSBM$memberships, sampler_directed_cov$memberships), expect_gt(ARI(mySBM_missSBM$memberships, mySBM_sbm$memberships), 0.85) 0.8) }) expect_lt(rmse(mySBM_missSBM$loglik, mySBM_sbm$loglik),
0.05)30: expect_lt(rmse(mySBM_missSBM$connectParam$mean, sampler_directed_cov$connectParam$mean), eval(code, test_env) 0.1)
expect_gt(ARI(mySBM_missSBM$memberships, sampler_directed_cov$memberships), 31: 0.85) })eval(code, test_env)
30: 32: eval(code, test_env)withCallingHandlers({
eval(code, test_env)31: new_expectations <- the$test_expectations > starting_expectationseval(code, test_env)
if (snapshot_skipped) {32: skip("On CRAN")withCallingHandlers({ } 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()) { skip(paste0("{", e$package, "} is not installed.")) else if (!new_expectations && skip_on_empty) { } skip_empty()}, snapshot_on_cran = function(cnd) { } snapshot_skipped <<- TRUE}, expectation = handle_expectation, packageNotFoundError = function(e) { invokeRestart("muffle_cran_snapshot") if (on_cran()) {}, skip = handle_skip, warning = handle_warning, message = handle_message, skip(paste0("{", e$package, "} is not installed.")) error = handle_error, interrupt = handle_interrupt) }
}, snapshot_on_cran = function(cnd) {33: snapshot_skipped <<- TRUEdoTryCatch(return(expr), name, parentenv, handler) invokeRestart("muffle_cran_snapshot")
}, skip = handle_skip, warning = handle_warning, message = handle_message, 34: error = handle_error, interrupt = handle_interrupt)tryCatchOne(expr, names, parentenv, handlers[[1L]])
33: 35: doTryCatch(return(expr), name, parentenv, handler)
tryCatchList(expr, classes, parentenv, handlers)34:
tryCatchOne(expr, names, parentenv, handlers[[1L]])
36: 35: tryCatch(withCallingHandlers({tryCatchList(expr, classes, parentenv, handlers) eval(code, test_env)
new_expectations <- the$test_expectations > starting_expectations36: if (snapshot_skipped) {tryCatch(withCallingHandlers({ 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 } 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), error = handle_fatal) 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)37: doWithOneRestart(return(expr), restart)
38: 38: withOneRestart(expr, restarts[[1L]])withOneRestart(expr, restarts[[1L]])
39: 39: 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) { 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") error = handle_error, interrupt = handle_interrupt), error = handle_fatal), }, skip = handle_skip, warning = handle_warning, message = handle_message, end_test = function() { error = handle_error, interrupt = handle_interrupt), error = handle_fatal), }) end_test = function() {
})40:
test_code(code = exprs, env = env, reporter = get_reporter() %||% 40: StopReporter$new())test_code(code = exprs, env = env, reporter = get_reporter() %||%
StopReporter$new())41:
source_file(path, env = env(env), desc = desc, shuffle = shuffle, 41: error_call = error_call)source_file(path, env = env(env), desc = desc, shuffle = shuffle,
error_call = error_call)42:
FUN(X[[i]], ...)42:
43: FUN(X[[i]], ...)lapply(test_paths, test_one_file, env = env, desc = desc, shuffle = shuffle, error_call = error_call)
43: 44: lapply(test_paths, test_one_file, env = env, desc = desc, shuffle = shuffle, doTryCatch(return(expr), name, parentenv, handler) error_call = error_call)
45: 44: tryCatchOne(expr, names, parentenv, handlers[[1L]])
doTryCatch(return(expr), name, parentenv, handler)46:
tryCatchList(expr, classes, parentenv, handlers)
45: 47: tryCatch(code, testthat_abort_reporter = function(cnd) {tryCatchOne(expr, names, parentenv, handlers[[1L]])
cat(conditionMessage(cnd), "\n")46: NULLtryCatchList(expr, classes, parentenv, handlers)})
47: 48: tryCatch(code, testthat_abort_reporter = function(cnd) {with_reporter(reporters$multi, lapply(test_paths, test_one_file, cat(conditionMessage(cnd), "\n") env = env, desc = desc, shuffle = shuffle, error_call = error_call)) NULL
})
49: 48: test_files_serial(test_dir = test_dir, test_package = test_package, with_reporter(reporters$multi, lapply(test_paths, test_one_file, test_paths = test_paths, load_helpers = load_helpers, reporter = reporter, env = env, desc = desc, shuffle = shuffle, error_call = error_call)) env = env, stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning,
desc = desc, load_package = load_package, shuffle = shuffle, 49: error_call = error_call)
test_files_serial(test_dir = test_dir, test_package = test_package, 50: test_paths = test_paths, load_helpers = load_helpers, reporter = reporter, test_files(test_dir = path, test_paths = test_paths, test_package = package, reporter = reporter, load_helpers = load_helpers, env = env, env = env, stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning, stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning, desc = desc, load_package = load_package, shuffle = shuffle, load_package = load_package, parallel = parallel, shuffle = shuffle) error_call = error_call)
50: 51: test_files(test_dir = path, test_paths = test_paths, test_package = package, test_dir("testthat", package = package, reporter = reporter, reporter = reporter, load_helpers = load_helpers, env = env, ..., load_package = "installed") stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning,
load_package = load_package, parallel = parallel, shuffle = shuffle)52:
test_check("missSBM")51:
test_dir("testthat", package = package, reporter = reporter, An irrecoverable exception occurred. R is aborting now ...
..., 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) {
Traceback:
skip("On CRAN") 1: } else if (!new_expectations && skip_on_empty) {dispatcher(membership_name, membership_init$to_cc(), model_name, skip_empty() .self$network_to_cc(), TRUE) }
}, expectation = handle_expectation, packageNotFoundError = function(e) { 2: if (on_cran()) {FUN(X[[i]], ...) skip(paste0("{", e$package, "} is not installed."))
} 3: }, snapshot_on_cran = function(cnd) {lapply(X = S, FUN = FUN, ...) snapshot_skipped <<- TRUE
invokeRestart("muffle_cran_snapshot") 4: }, 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() {
}) 5:
tryCatchOne(expr, names, parentenv, handlers[[1L]])28:
test_code(code, parent.frame()) 6:
tryCatchList(expr, classes, parentenv, handlers)29:
test_that("SimpleSBM_fit 'Bernoulli' model, undirected, no covariate", 7: {tryCatch(expr, error = function(e) { sampler_undirected_nocov$rNetwork(store = TRUE) call <- conditionCall(e) mySBM_sbm <- sbm::SimpleSBM_fit$new(sampler_undirected_nocov$networkData, if (!is.null(call)) { "bernoulli", FALSE) if (identical(call[[1L]], quote(doTryCatch))) mySBM_sbm$optimize(estimOptions = list(verbosity = 0, call <- sys.call(-4L) plot = FALSE)) mySBM_sbm$setModel(3) dcall <- deparse(call, nlines = 1L) net <- missSBM:::partlyObservedNetwork$new(sampler_undirected_nocov$networkData) prefix <- paste("Error in", dcall, ": ") cl <- net$clustering(3)[[1]] LONG <- 75L mySBM_missSBM <- missSBM:::SimpleSBM_fit_noCov$new(net, sm <- strsplit(conditionMessage(e), "\n")[[1L]] clusterInit = cl) w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w") mySBM_missSBM$doVEM() if (is.na(w)) expect_lt(rmse(mySBM_missSBM$connectParam$mean, mySBM_sbm$connectParam$mean), w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L], 0.05) type = "b") expect_gt(ARI(mySBM_missSBM$memberships, mySBM_sbm$memberships), if (w > LONG) 0.95) prefix <- paste0(prefix, "\n ") expect_lt(rmse(mySBM_missSBM$loglik, mySBM_sbm$loglik), } 0.01) else prefix <- "Error : " expect_lt(rmse(mySBM_missSBM$connectParam$mean, sampler_undirected_nocov$connectParam$mean), 0.05) msg <- paste0(prefix, conditionMessage(e), "\n") expect_gt(ARI(mySBM_missSBM$memberships, sampler_undirected_nocov$memberships), .Internal(seterrmessage(msg[1L])) 0.95) if (!silent && isTRUE(getOption("show.error.messages"))) { }) cat(msg, file = outFile) .Internal(printDeferredWarnings()) } invisible(structure(msg, class = "try-error", condition = e))
})30:
eval(code, test_env) 8:
try(lapply(X = S, FUN = FUN, ...), silent = TRUE)31:
eval(code, test_env) 9: sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE))
32: 10: withCallingHandlers({FUN(X[[i]], ...)
eval(code, test_env)11: new_expectations <- the$test_expectations > starting_expectationslapply(seq_len(cores), inner.do) if (snapshot_skipped) { skip("On CRAN")
}12: else if (!new_expectations && skip_on_empty) {parallel::mclapply(X, FUN, ..., mc.cores = mc.cores, mc.set.seed = FALSE, skip_empty() mc.silent = TRUE) }
}, expectation = handle_expectation, packageNotFoundError = function(e) {13: if (on_cran()) {parallel_lapply(inits, .self$do_one_estim, mc.cores = ncores, skip(paste0("{", e$package, "} is not installed.")) } verbose = (verbosity > 4))
}, snapshot_on_cran = function(cnd) {14: snapshot_skipped <<- TRUE.self$do_with_inits(inits, Q, reinitialization_effort) invokeRestart("muffle_cran_snapshot")
}, skip = handle_skip, warning = handle_warning, message = handle_message, 15: error = handle_error, interrupt = handle_interrupt).self$estim_ascend(reinitialization_effort, changing_effort)
33: 16: doTryCatch(return(expr), name, parentenv, handler)private$BMobject$estimate()
34: 17: tryCatchOne(expr, names, parentenv, handlers[[1L]])mySBM_sbm$optimize(estimOptions = list(verbosity = 0, plot = FALSE))
35: 18: tryCatchList(expr, classes, parentenv, handlers)eval(code, test_env)
36: 19: tryCatch(withCallingHandlers({eval(code, test_env) eval(code, test_env)
new_expectations <- the$test_expectations > starting_expectations20: if (snapshot_skipped) {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) { 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")}, expectation = handle_expectation, packageNotFoundError = function(e) {}, skip = handle_skip, warning = handle_warning, message = handle_message, if (on_cran()) { error = handle_error, interrupt = handle_interrupt), error = handle_fatal)
skip(paste0("{", e$package, "} is not installed."))37: }doWithOneRestart(return(expr), restart)}, snapshot_on_cran = function(cnd) {
snapshot_skipped <<- TRUE38: invokeRestart("muffle_cran_snapshot")withOneRestart(expr, restarts[[1L]])}, skip = handle_skip, warning = handle_warning, message = handle_message,
error = handle_error, interrupt = handle_interrupt)39:
withRestarts(tryCatch(withCallingHandlers({21: eval(code, test_env)doTryCatch(return(expr), name, parentenv, handler) new_expectations <- the$test_expectations > starting_expectations
if (snapshot_skipped) {22: skip("On CRAN")tryCatchOne(expr, names, parentenv, handlers[[1L]]) }
else if (!new_expectations && skip_on_empty) {23: skip_empty()tryCatchList(expr, classes, parentenv, handlers) }
}, expectation = handle_expectation, packageNotFoundError = function(e) { if (on_cran()) {24: skip(paste0("{", e$package, "} is not installed."))tryCatch(withCallingHandlers({ } eval(code, test_env)}, snapshot_on_cran = function(cnd) { new_expectations <- the$test_expectations > starting_expectations snapshot_skipped <<- TRUE if (snapshot_skipped) { invokeRestart("muffle_cran_snapshot") skip("On CRAN")}, skip = handle_skip, warning = handle_warning, message = handle_message, } error = handle_error, interrupt = handle_interrupt), error = handle_fatal), else if (!new_expectations && skip_on_empty) { 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), error = handle_fatal)42:
FUN(X[[i]], ...)25:
doWithOneRestart(return(expr), restart)43:
lapply(test_paths, test_one_file, env = env, desc = desc, shuffle = shuffle, 26: error_call = error_call)withOneRestart(expr, restarts[[1L]])
44: 27: doTryCatch(return(expr), name, parentenv, handler)withRestarts(tryCatch(withCallingHandlers({
eval(code, test_env)45: new_expectations <- the$test_expectations > starting_expectationstryCatchOne(expr, names, parentenv, handlers[[1L]]) if (snapshot_skipped) {
skip("On CRAN")46: }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."))}) }
48: }, snapshot_on_cran = function(cnd) {with_reporter(reporters$multi, lapply(test_paths, test_one_file, snapshot_skipped <<- TRUE env = env, desc = desc, shuffle = shuffle, error_call = error_call))
invokeRestart("muffle_cran_snapshot")49: }, skip = handle_skip, warning = handle_warning, message = handle_message, test_files_serial(test_dir = test_dir, test_package = test_package, error = handle_error, interrupt = handle_interrupt), error = handle_fatal), test_paths = test_paths, load_helpers = load_helpers, reporter = reporter, end_test = function() { 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)28:
test_code(code, parent.frame())50:
test_files(test_dir = path, test_paths = test_paths, test_package = package, reporter = reporter, load_helpers = load_helpers, env = env, 29: test_that("SimpleSBM_fit 'Bernoulli' model, undirected, no covariate", stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning, { load_package = load_package, parallel = parallel, shuffle = shuffle) sampler_undirected_nocov$rNetwork(store = TRUE)
mySBM_sbm <- sbm::SimpleSBM_fit$new(sampler_undirected_nocov$networkData, 51: "bernoulli", FALSE)test_dir("testthat", package = package, reporter = reporter, mySBM_sbm$optimize(estimOptions = list(verbosity = 0, ..., load_package = "installed") plot = FALSE))
mySBM_sbm$setModel(3)52: net <- missSBM:::partlyObservedNetwork$new(sampler_undirected_nocov$networkData)test_check("missSBM") cl <- net$clustering(3)[[1]]
mySBM_missSBM <- missSBM:::SimpleSBM_fit_noCov$new(net, An irrecoverable exception occurred. R is aborting now ...
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:
Traceback:
dispatcher(membership_name, membership_init$to_cc(), model_name, 1: .self$network_to_cc(), TRUE)dispatcher(membership_name, membership_init$to_cc(), model_name,
.self$network_to_cc(), TRUE)
2: FUN(X[[i]], ...) 2:
FUN(X[[i]], ...) 3:
lapply(X = S, FUN = FUN, ...) 3:
lapply(X = S, FUN = FUN, ...) 4:
doTryCatch(return(expr), name, parentenv, handler)
4: 5: doTryCatch(return(expr), name, parentenv, handler)tryCatchOne(expr, names, parentenv, handlers[[1L]])
5: 6: tryCatchList(expr, classes, parentenv, handlers)tryCatchOne(expr, names, parentenv, handlers[[1L]])
7: 6: tryCatch(expr, error = function(e) {tryCatchList(expr, classes, parentenv, handlers)
call <- conditionCall(e) 7: tryCatch(expr, error = function(e) { if (!is.null(call)) { call <- conditionCall(e) if (identical(call[[1L]], quote(doTryCatch))) if (!is.null(call)) { if (identical(call[[1L]], quote(doTryCatch))) call <- sys.call(-4L) call <- sys.call(-4L) dcall <- deparse(call, nlines = 1L) dcall <- deparse(call, nlines = 1L) prefix <- paste("Error in", dcall, ": ") prefix <- paste("Error in", dcall, ": ") LONG <- 75L LONG <- 75L sm <- strsplit(conditionMessage(e), "\n")[[1L]] sm <- strsplit(conditionMessage(e), "\n")[[1L]] w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w") w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w") if (is.na(w)) w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L], if (is.na(w)) type = "b") if (w > LONG) w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L], prefix <- paste0(prefix, "\n ") type = "b") } if (w > LONG) else prefix <- "Error : " msg <- paste0(prefix, conditionMessage(e), "\n") prefix <- paste0(prefix, "\n ") .Internal(seterrmessage(msg[1L])) if (!silent && isTRUE(getOption("show.error.messages"))) { cat(msg, file = outFile) } .Internal(printDeferredWarnings()) else prefix <- "Error : " msg <- paste0(prefix, conditionMessage(e), "\n") } .Internal(seterrmessage(msg[1L])) invisible(structure(msg, class = "try-error", condition = e)) if (!silent && isTRUE(getOption("show.error.messages"))) {})
cat(msg, file = outFile) .Internal(printDeferredWarnings()) 8: try(lapply(X = S, FUN = FUN, ...), silent = TRUE)
} 9: invisible(structure(msg, class = "try-error", condition = e))sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE))})
10:
FUN(X[[i]], ...)
8: 11: try(lapply(X = S, FUN = FUN, ...), silent = TRUE)lapply(seq_len(cores), inner.do)
9: sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE))12:
parallel::mclapply(X, FUN, ..., mc.cores = mc.cores, mc.set.seed = FALSE, 10: mc.silent = TRUE)FUN(X[[i]], ...)
11: 13: lapply(seq_len(cores), inner.do)parallel_lapply(inits, .self$do_one_estim, mc.cores = ncores,
verbose = (verbosity > 4))12:
parallel::mclapply(X, FUN, ..., mc.cores = mc.cores, mc.set.seed = FALSE, 14: mc.silent = TRUE).self$do_with_inits(inits, Q, reinitialization_effort)
13: 15: parallel_lapply(inits, .self$do_one_estim, mc.cores = ncores, .self$estim_ascend(reinitialization_effort, changing_effort) verbose = (verbosity > 4))
16: 14: private$BMobject$estimate().self$do_with_inits(inits, Q, reinitialization_effort)
17: mySBM_sbm$optimize(estimOptions = list(verbosity = 0, plot = FALSE))15: .self$estim_ascend(reinitialization_effort, changing_effort)
18: 16: eval(code, test_env)private$BMobject$estimate()
19: 17: eval(code, test_env)
mySBM_sbm$optimize(estimOptions = list(verbosity = 0, plot = FALSE))
20: withCallingHandlers({18: eval(code, test_env)eval(code, test_env)
19: new_expectations <- the$test_expectations > starting_expectationseval(code, test_env) if (snapshot_skipped) {
skip("On CRAN")20: } else if (!new_expectations && skip_on_empty) {withCallingHandlers({ skip_empty() eval(code, test_env) new_expectations <- the$test_expectations > starting_expectations } if (snapshot_skipped) {}, expectation = handle_expectation, packageNotFoundError = function(e) { skip("On CRAN") if (on_cran()) { } skip(paste0("{", e$package, "} is not installed.")) else if (!new_expectations && skip_on_empty) { } skip_empty()}, snapshot_on_cran = function(cnd) { } snapshot_skipped <<- TRUE}, expectation = handle_expectation, packageNotFoundError = function(e) { 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) }
21: }, snapshot_on_cran = function(cnd) {doTryCatch(return(expr), name, parentenv, handler)
snapshot_skipped <<- TRUE22: tryCatchOne(expr, names, parentenv, handlers[[1L]]) invokeRestart("muffle_cran_snapshot")
}, skip = handle_skip, warning = handle_warning, message = handle_message, 23: tryCatchList(expr, classes, parentenv, handlers) error = handle_error, interrupt = handle_interrupt)
21: 24: doTryCatch(return(expr), name, parentenv, handler)tryCatch(withCallingHandlers({ eval(code, test_env)
new_expectations <- the$test_expectations > starting_expectations22: tryCatchOne(expr, names, parentenv, handlers[[1L]]) if (snapshot_skipped) {
skip("On CRAN") }23: else if (!new_expectations && skip_on_empty) {tryCatchList(expr, classes, parentenv, handlers) skip_empty()
}24: }, expectation = handle_expectation, packageNotFoundError = function(e) { if (on_cran()) {tryCatch(withCallingHandlers({ skip(paste0("{", e$package, "} is not installed.")) eval(code, test_env) } new_expectations <- the$test_expectations > starting_expectations}, snapshot_on_cran = function(cnd) { if (snapshot_skipped) { skip("On CRAN") snapshot_skipped <<- TRUE } invokeRestart("muffle_cran_snapshot") else if (!new_expectations && skip_on_empty) {}, skip = handle_skip, warning = handle_warning, message = handle_message, skip_empty() error = handle_error, interrupt = handle_interrupt), error = handle_fatal) }
}, expectation = handle_expectation, packageNotFoundError = function(e) {25: if (on_cran()) {doWithOneRestart(return(expr), restart) skip(paste0("{", e$package, "} is not installed.")) }
}, snapshot_on_cran = function(cnd) { snapshot_skipped <<- TRUE invokeRestart("muffle_cran_snapshot")26: }, skip = handle_skip, warning = handle_warning, message = handle_message, withOneRestart(expr, restarts[[1L]]) error = handle_error, interrupt = handle_interrupt), error = handle_fatal)
25: doWithOneRestart(return(expr), restart)27:
withRestarts(tryCatch(withCallingHandlers({26: eval(code, test_env)withOneRestart(expr, restarts[[1L]]) new_expectations <- the$test_expectations > starting_expectations
if (snapshot_skipped) {27: skip("On CRAN")withRestarts(tryCatch(withCallingHandlers({ } eval(code, test_env) else if (!new_expectations && skip_on_empty) { new_expectations <- the$test_expectations > starting_expectations if (snapshot_skipped) { skip_empty() skip("On CRAN") } }}, expectation = handle_expectation, packageNotFoundError = function(e) { if (on_cran()) { else if (!new_expectations && skip_on_empty) { skip_empty() skip(paste0("{", e$package, "} is not installed.")) } }}, snapshot_on_cran = function(cnd) {}, expectation = handle_expectation, packageNotFoundError = function(e) { 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_that("SimpleSBM_fit 'Bernoulli' model, directed, no covariate", test_code(code, parent.frame()) {
sampler_directed_nocov$rNetwork(store = TRUE)29: mySBM_sbm <- sbm::SimpleSBM_fit$new(sampler_directed_nocov$networkData, test_that("SimpleSBM_fit 'Bernoulli' model, directed, no covariate", "bernoulli", TRUE) { mySBM_sbm$optimize(estimOptions = list(verbosity = 0, sampler_directed_nocov$rNetwork(store = TRUE) plot = FALSE)) mySBM_sbm <- sbm::SimpleSBM_fit$new(sampler_directed_nocov$networkData, "bernoulli", TRUE) mySBM_sbm$setModel(3) mySBM_sbm$optimize(estimOptions = list(verbosity = 0, net <- missSBM:::partlyObservedNetwork$new(sampler_directed_nocov$networkData) plot = FALSE)) cl <- net$clustering(3)[[1]] mySBM_missSBM <- missSBM:::SimpleSBM_fit_noCov$new(sampler_directed_nocov$networkData, mySBM_sbm$setModel(3) clusterInit = cl) net <- missSBM:::partlyObservedNetwork$new(sampler_directed_nocov$networkData) mySBM_missSBM$doVEM() cl <- net$clustering(3)[[1]] expect_lt(rmse(mySBM_missSBM$connectParam$mean, mySBM_sbm$connectParam$mean), mySBM_missSBM <- missSBM:::SimpleSBM_fit_noCov$new(sampler_directed_nocov$networkData, 0.1) clusterInit = cl) expect_gt(ARI(mySBM_missSBM$memberships, mySBM_sbm$memberships), mySBM_missSBM$doVEM() 0.95) expect_lt(rmse(mySBM_missSBM$connectParam$mean, mySBM_sbm$connectParam$mean), expect_lt(rmse(mySBM_missSBM$loglik, mySBM_sbm$loglik), 0.1) 0.01) expect_gt(ARI(mySBM_missSBM$memberships, mySBM_sbm$memberships), expect_lt(rmse(mySBM_missSBM$connectParam$mean, sampler_directed_nocov$connectParam$mean), 0.95) 0.1) expect_lt(rmse(mySBM_missSBM$loglik, mySBM_sbm$loglik), expect_lt(rmse(mySBM_missSBM$covarParam, sampler_directed_cov$covarParam), 0.01) 0.2) expect_lt(rmse(mySBM_missSBM$connectParam$mean, sampler_directed_nocov$connectParam$mean), expect_gt(ARI(mySBM_missSBM$memberships, sampler_directed_nocov$memberships), 0.1) 0.95) expect_lt(rmse(mySBM_missSBM$covarParam, sampler_directed_cov$covarParam), }) 0.2)
expect_gt(ARI(mySBM_missSBM$memberships, sampler_directed_nocov$memberships), 30: 0.95)eval(code, test_env) })
31: 30: eval(code, test_env)eval(code, test_env)
32: 31: withCallingHandlers({eval(code, test_env)
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_empty() } 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) {}, expectation = handle_expectation, packageNotFoundError = function(e) { snapshot_skipped <<- TRUE if (on_cran()) { invokeRestart("muffle_cran_snapshot") skip(paste0("{", e$package, "} is not installed."))}, skip = handle_skip, warning = handle_warning, message = handle_message, } error = handle_error, interrupt = handle_interrupt)}, snapshot_on_cran = function(cnd) {
snapshot_skipped <<- TRUE33: invokeRestart("muffle_cran_snapshot")doTryCatch(return(expr), name, parentenv, handler)}, skip = handle_skip, warning = handle_warning, message = handle_message,
error = handle_error, interrupt = handle_interrupt)34:
tryCatchOne(expr, names, parentenv, handlers[[1L]])33:
doTryCatch(return(expr), name, parentenv, handler)35:
tryCatchList(expr, classes, parentenv, handlers)34:
tryCatchOne(expr, names, parentenv, handlers[[1L]])36:
tryCatch(withCallingHandlers({35: eval(code, test_env)tryCatchList(expr, classes, parentenv, handlers) new_expectations <- the$test_expectations > starting_expectations
if (snapshot_skipped) {36: skip("On CRAN")tryCatch(withCallingHandlers({ } 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) {}, 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) {
37: snapshot_skipped <<- TRUEdoWithOneRestart(return(expr), restart)
invokeRestart("muffle_cran_snapshot")38: }, skip = handle_skip, warning = handle_warning, message = handle_message, withOneRestart(expr, restarts[[1L]]) error = handle_error, interrupt = handle_interrupt), error = handle_fatal)
39: withRestarts(tryCatch(withCallingHandlers({
37: eval(code, test_env)doWithOneRestart(return(expr), restart) new_expectations <- the$test_expectations > starting_expectations
if (snapshot_skipped) {38: skip("On CRAN")withOneRestart(expr, restarts[[1L]]) }
39: withRestarts(tryCatch(withCallingHandlers({ 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) { } if (on_cran()) {}, snapshot_on_cran = function(cnd) { snapshot_skipped <<- TRUE invokeRestart("muffle_cran_snapshot") skip(paste0("{", e$package, "} is not installed.")) }}, 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),
end_test = function() {40: })test_code(code = exprs, env = env, reporter = get_reporter() %||%
StopReporter$new())40:
test_code(code = exprs, env = env, reporter = get_reporter() %||% 41: StopReporter$new())source_file(path, env = env(env), desc = desc, shuffle = shuffle,
error_call = error_call)41:
source_file(path, env = env(env), desc = desc, shuffle = shuffle, 42: error_call = error_call)FUN(X[[i]], ...)
42:
FUN(X[[i]], ...)43:
lapply(test_paths, test_one_file, env = env, desc = desc, shuffle = shuffle, error_call = error_call)43:
lapply(test_paths, test_one_file, env = env, desc = desc, shuffle = shuffle, 44: error_call = error_call)doTryCatch(return(expr), name, parentenv, handler)
44: doTryCatch(return(expr), name, parentenv, handler)45:
tryCatchOne(expr, names, parentenv, handlers[[1L]])45:
tryCatchOne(expr, names, parentenv, handlers[[1L]])
46: 46: tryCatchList(expr, classes, parentenv, handlers)
tryCatchList(expr, classes, parentenv, handlers)
47: 47: tryCatch(code, testthat_abort_reporter = function(cnd) { cat(conditionMessage(cnd), "\n")tryCatch(code, testthat_abort_reporter = function(cnd) { NULL cat(conditionMessage(cnd), "\n")}) NULL
})
48: 48: with_reporter(reporters$multi, lapply(test_paths, test_one_file, with_reporter(reporters$multi, lapply(test_paths, test_one_file, env = env, desc = desc, shuffle = shuffle, error_call = error_call))
env = env, desc = desc, shuffle = shuffle, error_call = error_call))49: test_files_serial(test_dir = test_dir, test_package = test_package,
49: test_paths = test_paths, load_helpers = load_helpers, reporter = reporter, test_files_serial(test_dir = test_dir, test_package = test_package, env = env, stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning, test_paths = test_paths, load_helpers = load_helpers, reporter = reporter, desc = desc, load_package = load_package, shuffle = shuffle, 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) error_call = error_call)
50: 50: test_files(test_dir = path, test_paths = test_paths, test_package = package, test_files(test_dir = path, test_paths = test_paths, test_package = package, reporter = reporter, load_helpers = load_helpers, env = env, reporter = reporter, load_helpers = load_helpers, env = env, stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning, stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning, load_package = load_package, parallel = parallel, shuffle = shuffle) load_package = load_package, parallel = parallel, shuffle = shuffle)
51:
51: test_dir("testthat", package = package, reporter = reporter, test_dir("testthat", package = package, reporter = reporter, ..., load_package = "installed") ..., load_package = "installed")
52:
test_check("missSBM")52:
An irrecoverable exception occurred. R is aborting now ...
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