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