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