Last updated on 2026-10-25 13:51:15 CET.
| Flavor | Version | Tinstall | Tcheck | Ttotal | Status | Flags |
|---|---|---|---|---|---|---|
| r-devel-linux-x86_64-debian-clang | 1.1.0 | 82.72 | 340.58 | 423.30 | OK | |
| r-devel-linux-x86_64-debian-gcc | 1.1.0 | 59.26 | 230.24 | 289.50 | OK | |
| r-devel-linux-x86_64-fedora-clang | 1.1.0 | 59.00 | 271.80 | 330.80 | OK | |
| r-devel-linux-x86_64-fedora-gcc | 1.1.0 | 64.00 | 237.71 | 301.71 | OK | |
| r-devel-windows-x86_64 | 1.1.0 | 91.00 | 420.00 | 511.00 | OK | |
| r-patched-linux-x86_64 | 1.1.0 | 87.75 | 330.28 | 418.03 | OK | |
| r-release-linux-x86_64 | 1.1.0 | 81.31 | 327.81 | 409.12 | 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 | 96.00 | 347.00 | 443.00 | OK | |
| r-oldrel-macos-arm64 | 1.1.0 | 21.00 | 94.00 | 115.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 | 118.00 | 481.00 | 599.00 | OK |
Version: 1.1.0
Check: tests
Result: ERROR
Running ‘spelling.R’ [0s/0s]
Running ‘testthat.R’ [36s/32s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
> library(testthat)
> library(missSBM)
>
> test_check("missSBM")
Adjusting Variational EM for Stochastic Block Model
Dyads are distributed according to a 'undirected' SBM.
Imputation assumes a 'covar-dyad' network-sampling process
iteration #: 2
iteration #: 3
Adjusting Variational EM for Stochastic Block Model
Dyads are distributed according to a 'undirected' SBM.
Imputation assumes a 'dyad' network-sampling process
iteration #: 2
iteration #: 3
Adjusting Variational EM for Stochastic Block Model
Dyads are distributed according to a 'undirected' SBM.
Imputation assumes a 'covar-node' network-sampling process
iteration #: 2
iteration #: 3
iteration #: 4
iteration #: 5
Adjusting Variational EM for Stochastic Block Model
Dyads are distributed according to a 'undirected' SBM.
Imputation assumes a 'node' network-sampling process
iteration #: 2
iteration #: 3
iteration #: 4
Tested sampling:
- dyad
- node
- double-standard
- block-node
- block-dyad
Adjusting Variational EM for Stochastic Block Model
Imputation assumes a 'dyad' network-sampling process
Initialization of 3 model(s).
Tested sampling:
- dyad
- node
- double-standard
- block-node
- block-dyad
- degreeTested sampling:
- dyad
- node
- double-standard
- block-node
- block-dyad
- degree
sampling: dyad new better on connectivity
node
double-standard
block-node new better on mixture
Adjusting Variational EM for Stochastic Block Model
iteration #: 2
iteration #: 3
iteration #: 4
iteration #: 5
iteration #: 6
iteration #: 7
iteration #: 8
iteration #: 9
iteration #: 10
iteration #: 11
iteration #: 12
iteration #: 13
iteration #: 14
iteration #: 15
iteration #: 16
iteration #: 17
iteration #: 18
iteration #: 19
iteration #: 20
iteration #: 21
iteration #: 22
iteration #: 23
iteration #: 24
iteration #: 25
iteration #: 26
iteration #: 27
iteration #: 28
iteration #: 29
iteration #: 30
iteration #: 31
iteration #: 32
iteration #: 33
iteration #: 34
Adjusting Variational EM for Stochastic Block Model
Dyads are distributed according to a 'undirected' SBM.
Imputation assumes a 'node' network-sampling process
iteration #: 2
iteration #: 3
iteration #: 4
iteration #: 5
iteration #: 6
iteration #: 7
iteration #: 8
iteration #: 9
iteration #: 10
iteration #: 11
iteration #: 12
iteration #: 13
iteration #: 14
iteration #: 15
iteration #: 16
iteration #: 17
iteration #: 18
iteration #: 19
iteration #: 20
iteration #: 21
iteration #: 22
iteration #: 23
iteration #: 24
iteration #: 25
iteration #: 26
iteration #: 27
iteration #: 28
iteration #: 29
iteration #: 30
iteration #: 31
iteration #: 32
iteration #: 33
iteration #: 34
Adjusting Variational EM for Stochastic Block Model
Imputation assumes a 'node' network-sampling process
Initialization of 1 model(s).
Performing VEM inference
Model with 3 blocks.
Adjusting Variational EM for Stochastic Block Model
Imputation assumes a 'dyad' network-sampling process
Initialization of 2 model(s).
Performing VEM inference
Model with 2 blocks.
Model with 1 blocks.
Polishing (node-swap)
Looking for better solutions
Pass 1 Going forward +
Pass 1 Going backward +
*** caught segfault ***
address 0x110, cause 'invalid permissions'
*** caught segfault ***
address 0x110, cause 'invalid permissions'
Traceback:
Traceback:
1: 1: dispatcher(membership_name, membership_init$to_cc(), model_name, dispatcher(membership_name, membership_init$to_cc(), model_name, .self$network_to_cc(), TRUE)
.self$network_to_cc(), TRUE) 2:
FUN(X[[i]], ...) 2: 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:
tryCatchOne(expr, names, parentenv, handlers[[1L]]) 5:
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))) call <- sys.call(-4L) if (identical(call[[1L]], quote(doTryCatch))) dcall <- deparse(call, nlines = 1L) call <- sys.call(-4L) prefix <- paste("Error in", dcall, ": ") dcall <- deparse(call, nlines = 1L) LONG <- 75L prefix <- paste("Error in", dcall, ": ") sm <- strsplit(conditionMessage(e), "\n")[[1L]] w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w") LONG <- 75L if (is.na(w)) w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L], sm <- strsplit(conditionMessage(e), "\n")[[1L]] type = "b") w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w") if (w > LONG) if (is.na(w)) prefix <- paste0(prefix, "\n ") } w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L], else prefix <- "Error : " type = "b") msg <- paste0(prefix, conditionMessage(e), "\n") if (w > LONG) prefix <- paste0(prefix, "\n ") .Internal(seterrmessage(msg[1L])) } if (!silent && isTRUE(getOption("show.error.messages"))) { cat(msg, file = outFile) else prefix <- "Error : " .Internal(printDeferredWarnings()) msg <- paste0(prefix, conditionMessage(e), "\n") } .Internal(seterrmessage(msg[1L])) invisible(structure(msg, class = "try-error", condition = e)) if (!silent && isTRUE(getOption("show.error.messages"))) {}) cat(msg, file = outFile)
.Internal(printDeferredWarnings()) 8: try(lapply(X = S, FUN = FUN, ...), silent = TRUE) }
invisible(structure(msg, class = "try-error", condition = e)) 9: sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE))})
8: 10: try(lapply(X = S, FUN = FUN, ...), silent = TRUE)FUN(X[[i]], ...)
9: 11: lapply(seq_len(cores), inner.do)sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE))
12: 10: parallel::mclapply(X, FUN, ..., mc.cores = mc.cores, mc.set.seed = FALSE, FUN(X[[i]], ...) mc.silent = TRUE)
11: 13: lapply(seq_len(cores), inner.do)parallel_lapply(inits, .self$do_one_estim, mc.cores = ncores,
verbose = (verbosity > 4))12:
parallel::mclapply(X, FUN, ..., mc.cores = mc.cores, mc.set.seed = FALSE, 14: mc.silent = TRUE).self$do_with_inits(inits, Q, reinitialization_effort)
13:
15: parallel_lapply(inits, .self$do_one_estim, mc.cores = ncores, .self$estim_ascend(reinitialization_effort, changing_effort) verbose = (verbosity > 4))
14: 16: .self$do_with_inits(inits, Q, reinitialization_effort)private$BMobject$estimate()
15: 17: .self$estim_ascend(reinitialization_effort, changing_effort)mySBM_sbm$optimize(estimOptions = list(verbosity = 0, plot = FALSE))
16: 18: private$BMobject$estimate()eval(code, test_env)
19: 17: eval(code, test_env)mySBM_sbm$optimize(estimOptions = list(verbosity = 0, plot = FALSE))
20:
withCallingHandlers({18: eval(code, test_env)eval(code, test_env) new_expectations <- the$test_expectations > starting_expectations
if (snapshot_skipped) { skip("On CRAN")19: }eval(code, test_env) else if (!new_expectations && skip_on_empty) {
skip_empty()20: }withCallingHandlers({}, expectation = handle_expectation, packageNotFoundError = function(e) { eval(code, test_env) if (on_cran()) { 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 } else if (!new_expectations && skip_on_empty) { invokeRestart("muffle_cran_snapshot") skip_empty()}, skip = handle_skip, warning = handle_warning, message = handle_message, } error = handle_error, interrupt = handle_interrupt)}, expectation = handle_expectation, packageNotFoundError = function(e) {
if (on_cran()) {21: skip(paste0("{", e$package, "} is not installed."))doTryCatch(return(expr), name, parentenv, handler) }
}, snapshot_on_cran = function(cnd) {22: snapshot_skipped <<- TRUEtryCatchOne(expr, names, parentenv, handlers[[1L]])
invokeRestart("muffle_cran_snapshot")23: }, skip = handle_skip, warning = handle_warning, message = handle_message, tryCatchList(expr, classes, parentenv, handlers) error = handle_error, interrupt = handle_interrupt)
24: 21: tryCatch(withCallingHandlers({doTryCatch(return(expr), name, parentenv, handler) eval(code, test_env) new_expectations <- the$test_expectations > starting_expectations
if (snapshot_skipped) {22: skip("On CRAN")tryCatchOne(expr, names, parentenv, handlers[[1L]]) }
else if (!new_expectations && skip_on_empty) { 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) { 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, error = handle_error, interrupt = handle_interrupt), error = handle_fatal) if (snapshot_skipped) {
skip("On CRAN")25: }doWithOneRestart(return(expr), restart)
else if (!new_expectations && skip_on_empty) {26: skip_empty() }withOneRestart(expr, restarts[[1L]])
}, expectation = handle_expectation, packageNotFoundError = function(e) {27: if (on_cran()) {withRestarts(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) { 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()
}25: }, expectation = handle_expectation, packageNotFoundError = function(e) {doWithOneRestart(return(expr), restart) if (on_cran()) {
skip(paste0("{", e$package, "} is not installed."))26: }withOneRestart(expr, restarts[[1L]])}, snapshot_on_cran = function(cnd) {
snapshot_skipped <<- TRUE27: 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), error = handle_fatal), new_expectations <- the$test_expectations > starting_expectations end_test = function() { if (snapshot_skipped) { }) 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()) { skip(paste0("{", e$package, "} is not installed."))test_that("SimpleSBM_fit 'Bernoulli' model, undirected, one covariate", } {}, snapshot_on_cran = function(cnd) { sampler_undirected_cov$rNetwork(store = TRUE) snapshot_skipped <<- TRUE mySBM_sbm <- sbm::SimpleSBM_fit$new(sampler_undirected_cov$networkData, invokeRestart("muffle_cran_snapshot") "bernoulli", FALSE, covarList = covarList_undirected)}, skip = handle_skip, warning = handle_warning, message = handle_message, mySBM_sbm$optimize(estimOptions = list(verbosity = 0, error = handle_error, interrupt = handle_interrupt), error = handle_fatal), plot = FALSE)) end_test = function() { mySBM_sbm$setModel(Q) }) net <- missSBM:::partlyObservedNetwork$new(sampler_undirected_cov$networkData,
covariates = covarList_undirected) cls <- net$clustering(1:(2 * Q))28: cl <- cls[[Q]]test_code(code, parent.frame()) mySBM_missSBM <- missSBM:::SimpleSBM_fit_withCov$new(net,
clusterInit = cl, covarList = covarList_undirected)29: mySBM_missSBM$doVEM()test_that("SimpleSBM_fit 'Bernoulli' model, undirected, one covariate", expect_lt(rmse(mySBM_missSBM$connectParam$mean, mySBM_sbm$connectParam$mean), { 0.05) sampler_undirected_cov$rNetwork(store = TRUE) expect_gt(ARI(mySBM_missSBM$memberships, mySBM_sbm$memberships), mySBM_sbm <- sbm::SimpleSBM_fit$new(sampler_undirected_cov$networkData, 0.8) "bernoulli", FALSE, covarList = covarList_undirected) expect_lt(rmse(mySBM_missSBM$loglik, mySBM_sbm$loglik), mySBM_sbm$optimize(estimOptions = list(verbosity = 0, plot = FALSE)) 0.01) mySBM_sbm$setModel(Q) expect_lt(rmse(mySBM_missSBM$connectParam$mean, sampler_undirected_cov$connectParam$mean), net <- missSBM:::partlyObservedNetwork$new(sampler_undirected_cov$networkData, 0.1) covariates = covarList_undirected) expect_lt(rmse(mySBM_missSBM$covarParam, sampler_undirected_cov$covarParam), cls <- net$clustering(1:(2 * Q)) cl <- cls[[Q]] 0.1) mySBM_missSBM <- missSBM:::SimpleSBM_fit_withCov$new(net, clusterInit = cl, covarList = covarList_undirected) expect_gt(ARI(mySBM_missSBM$memberships, sampler_undirected_cov$memberships), mySBM_missSBM$doVEM() 0.85) expect_lt(rmse(mySBM_missSBM$connectParam$mean, mySBM_sbm$connectParam$mean), }) 0.05)
expect_gt(ARI(mySBM_missSBM$memberships, mySBM_sbm$memberships), 30: 0.8)eval(code, test_env) expect_lt(rmse(mySBM_missSBM$loglik, mySBM_sbm$loglik),
0.01)31: expect_lt(rmse(mySBM_missSBM$connectParam$mean, sampler_undirected_cov$connectParam$mean), eval(code, test_env) 0.1)
expect_lt(rmse(mySBM_missSBM$covarParam, sampler_undirected_cov$covarParam), 32: 0.1) expect_gt(ARI(mySBM_missSBM$memberships, sampler_undirected_cov$memberships), withCallingHandlers({ eval(code, test_env) 0.85) }) 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) {31: skip_empty()eval(code, test_env) }}, expectation = handle_expectation, packageNotFoundError = function(e) {
if (on_cran()) {32: skip(paste0("{", e$package, "} is not installed."))withCallingHandlers({ } eval(code, test_env) new_expectations <- the$test_expectations > starting_expectations}, snapshot_on_cran = function(cnd) { snapshot_skipped <<- TRUE if (snapshot_skipped) { invokeRestart("muffle_cran_snapshot") skip("On CRAN")}, skip = handle_skip, warning = handle_warning, message = handle_message, error = handle_error, interrupt = handle_interrupt)
}33: else if (!new_expectations && skip_on_empty) {doTryCatch(return(expr), name, parentenv, handler) skip_empty()
}34: }, expectation = handle_expectation, packageNotFoundError = function(e) {tryCatchOne(expr, names, parentenv, handlers[[1L]]) if (on_cran()) {
skip(paste0("{", e$package, "} is not installed.")) }35: }, snapshot_on_cran = function(cnd) { snapshot_skipped <<- TRUEtryCatchList(expr, classes, parentenv, handlers)
invokeRestart("muffle_cran_snapshot")36: }, skip = handle_skip, warning = handle_warning, message = handle_message, error = handle_error, interrupt = handle_interrupt)tryCatch(withCallingHandlers({ eval(code, test_env)
new_expectations <- the$test_expectations > starting_expectations33: if (snapshot_skipped) {doTryCatch(return(expr), name, parentenv, handler) skip("On CRAN")
}34: else if (!new_expectations && skip_on_empty) {tryCatchOne(expr, names, parentenv, handlers[[1L]]) skip_empty()
}35: tryCatchList(expr, classes, parentenv, handlers)}, expectation = handle_expectation, packageNotFoundError = function(e) {
if (on_cran()) {36: skip(paste0("{", e$package, "} is not installed."))tryCatch(withCallingHandlers({ } eval(code, test_env)}, snapshot_on_cran = function(cnd) { new_expectations <- the$test_expectations > starting_expectations snapshot_skipped <<- TRUE if (snapshot_skipped) { invokeRestart("muffle_cran_snapshot") skip("On CRAN")}, skip = handle_skip, warning = handle_warning, message = handle_message, } error = handle_error, interrupt = handle_interrupt), error = handle_fatal) else if (!new_expectations && skip_on_empty) {
skip_empty()37: }doWithOneRestart(return(expr), restart)}, expectation = handle_expectation, packageNotFoundError = function(e) {
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), error = handle_fatal) new_expectations <- the$test_expectations > starting_expectations
if (snapshot_skipped) {37: skip("On CRAN")doWithOneRestart(return(expr), restart) } else if (!new_expectations && skip_on_empty) {
skip_empty()38: }withOneRestart(expr, restarts[[1L]])}, expectation = handle_expectation, packageNotFoundError = function(e) {
if (on_cran()) {39: skip(paste0("{", e$package, "} is not installed."))withRestarts(tryCatch(withCallingHandlers({ } eval(code, test_env)}, snapshot_on_cran = function(cnd) { new_expectations <- the$test_expectations > starting_expectations snapshot_skipped <<- TRUE invokeRestart("muffle_cran_snapshot") if (snapshot_skipped) {}, skip = handle_skip, warning = handle_warning, message = handle_message, skip("On CRAN") error = handle_error, interrupt = handle_interrupt), error = handle_fatal), end_test = function() { } }) else if (!new_expectations && skip_on_empty) {
skip_empty()40: }}, expectation = handle_expectation, packageNotFoundError = function(e) { if (on_cran()) {test_code(code = exprs, env = env, reporter = get_reporter() %||% skip(paste0("{", e$package, "} is not installed.")) StopReporter$new()) }
}, snapshot_on_cran = function(cnd) {41: source_file(path, env = env(env), desc = desc, shuffle = shuffle, snapshot_skipped <<- TRUE error_call = error_call) invokeRestart("muffle_cran_snapshot")
}, skip = handle_skip, warning = handle_warning, message = handle_message, error = handle_error, interrupt = handle_interrupt), error = handle_fatal), 42: end_test = function() {FUN(X[[i]], ...)
})43:
40: lapply(test_paths, test_one_file, env = env, desc = desc, shuffle = shuffle, error_call = error_call)test_code(code = exprs, env = env, reporter = get_reporter() %||%
44: StopReporter$new())doTryCatch(return(expr), name, parentenv, handler)
41: 45: source_file(path, env = env(env), desc = desc, shuffle = shuffle, tryCatchOne(expr, names, parentenv, handlers[[1L]]) error_call = error_call)
46: 42: tryCatchList(expr, classes, parentenv, handlers)FUN(X[[i]], ...)
47: 43: tryCatch(code, testthat_abort_reporter = function(cnd) {lapply(test_paths, test_one_file, env = env, desc = desc, shuffle = shuffle, cat(conditionMessage(cnd), "\n") error_call = error_call) NULL
})44:
doTryCatch(return(expr), name, parentenv, handler)
48: 45: with_reporter(reporters$multi, lapply(test_paths, test_one_file, tryCatchOne(expr, names, parentenv, handlers[[1L]]) env = env, desc = desc, shuffle = shuffle, error_call = error_call))
46: tryCatchList(expr, classes, parentenv, handlers)49: test_files_serial(test_dir = test_dir, test_package = test_package,
test_paths = test_paths, load_helpers = load_helpers, reporter = reporter, 47: env = env, stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning, tryCatch(code, testthat_abort_reporter = function(cnd) { desc = desc, load_package = load_package, shuffle = shuffle, cat(conditionMessage(cnd), "\n") error_call = error_call)
NULL50: })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)48:
with_reporter(reporters$multi, lapply(test_paths, test_one_file, 51: env = env, desc = desc, shuffle = shuffle, error_call = error_call))test_dir("testthat", package = package, reporter = reporter,
..., load_package = "installed")49:
test_files_serial(test_dir = test_dir, test_package = test_package, 52: test_paths = test_paths, load_helpers = load_helpers, reporter = reporter, test_check("missSBM")
env = env, stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning, An irrecoverable exception occurred. R is aborting now ...
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:
Traceback:
1: 1: dispatcher(membership_name, membership_init$to_cc(), model_name, dispatcher(membership_name, membership_init$to_cc(), model_name, .self$network_to_cc(), TRUE) .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") if (is.na(w)) w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L], type = "b") w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w") if (w > LONG) if (is.na(w)) prefix <- paste0(prefix, "\n ") w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L], } type = "b") else prefix <- "Error : " if (w > LONG) msg <- paste0(prefix, conditionMessage(e), "\n") .Internal(seterrmessage(msg[1L])) if (!silent && isTRUE(getOption("show.error.messages"))) { prefix <- paste0(prefix, "\n ") cat(msg, file = outFile) } .Internal(printDeferredWarnings()) } else prefix <- "Error : " msg <- paste0(prefix, conditionMessage(e), "\n") invisible(structure(msg, class = "try-error", condition = e)) .Internal(seterrmessage(msg[1L])) if (!silent && isTRUE(getOption("show.error.messages"))) {}) cat(msg, file = outFile)
.Internal(printDeferredWarnings()) } 8: invisible(structure(msg, class = "try-error", condition = e))try(lapply(X = S, FUN = FUN, ...), silent = TRUE)})
9: 8: sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE))try(lapply(X = S, FUN = FUN, ...), silent = TRUE)
10: 9: FUN(X[[i]], ...)sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE))
10: 11: FUN(X[[i]], ...)lapply(seq_len(cores), inner.do)
11:
lapply(seq_len(cores), inner.do)12:
parallel::mclapply(X, FUN, ..., mc.cores = mc.cores, mc.set.seed = FALSE, 12: mc.silent = TRUE)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, 13: verbose = (verbosity > 4))parallel_lapply(inits, .self$do_one_estim, mc.cores = ncores, 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:
private$BMobject$estimate()16:
private$BMobject$estimate()17:
mySBM_sbm$optimize(estimOptions = list(verbosity = 0, plot = FALSE))17:
mySBM_sbm$optimize(estimOptions = list(verbosity = 0, plot = FALSE))18:
18: eval(code, test_env)eval(code, test_env)
19:
eval(code, test_env)
19: eval(code, test_env)20:
withCallingHandlers({ eval(code, test_env)20: new_expectations <- the$test_expectations > starting_expectationswithCallingHandlers({ 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) { else if (!new_expectations && skip_on_empty) { skip_empty() } skip_empty()}, expectation = handle_expectation, packageNotFoundError = function(e) { } if (on_cran()) {}, expectation = handle_expectation, packageNotFoundError = function(e) { skip(paste0("{", e$package, "} is not installed.")) if (on_cran()) { } skip(paste0("{", e$package, "} is not installed."))}, snapshot_on_cran = function(cnd) { } snapshot_skipped <<- TRUE}, snapshot_on_cran = function(cnd) { invokeRestart("muffle_cran_snapshot") snapshot_skipped <<- TRUE 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_error, interrupt = handle_interrupt)
21: 21: doTryCatch(return(expr), name, parentenv, handler)doTryCatch(return(expr), name, parentenv, handler)
22: 22: tryCatchOne(expr, names, parentenv, handlers[[1L]])tryCatchOne(expr, names, parentenv, handlers[[1L]])
23:
tryCatchList(expr, classes, parentenv, handlers)23: tryCatchList(expr, classes, parentenv, handlers)
24:
tryCatch(withCallingHandlers({24: eval(code, test_env) new_expectations <- the$test_expectations > starting_expectationstryCatch(withCallingHandlers({ if (snapshot_skipped) { eval(code, test_env) skip("On CRAN") new_expectations <- the$test_expectations > starting_expectations } if (snapshot_skipped) { else if (!new_expectations && skip_on_empty) { skip_empty() skip("On CRAN") } }}, expectation = handle_expectation, packageNotFoundError = function(e) { else if (!new_expectations && skip_on_empty) { if (on_cran()) { skip_empty() skip(paste0("{", e$package, "} is not installed.")) } }}, expectation = handle_expectation, packageNotFoundError = function(e) { if (on_cran()) {}, snapshot_on_cran = function(cnd) { 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), error = handle_fatal)doWithOneRestart(return(expr), restart)
26: 25: withOneRestart(expr, restarts[[1L]])doWithOneRestart(return(expr), restart)
27: 26: withRestarts(tryCatch(withCallingHandlers({withOneRestart(expr, restarts[[1L]])
eval(code, test_env)27: new_expectations <- the$test_expectations > starting_expectationswithRestarts(tryCatch(withCallingHandlers({ 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) { } 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_skipped <<- TRUE}, snapshot_on_cran = function(cnd) { invokeRestart("muffle_cran_snapshot") snapshot_skipped <<- TRUE}, skip = handle_skip, warning = handle_warning, message = handle_message, invokeRestart("muffle_cran_snapshot") error = handle_error, interrupt = handle_interrupt), error = handle_fatal), }, skip = handle_skip, warning = handle_warning, message = handle_message, end_test = function() { error = handle_error, interrupt = handle_interrupt), error = handle_fatal), }) end_test = function() {
})28:
test_code(code, parent.frame())28: test_code(code, parent.frame())
29: 29: test_that("SimpleSBM_fit 'Bernoulli' model, directed, one covariate", test_that("SimpleSBM_fit 'Bernoulli' model, directed, one covariate", { { sampler_directed_cov$rNetwork(store = TRUE) sampler_directed_cov$rNetwork(store = TRUE) mySBM_sbm <- sbm::SimpleSBM_fit$new(sampler_directed_cov$networkData, mySBM_sbm <- sbm::SimpleSBM_fit$new(sampler_directed_cov$networkData, "bernoulli", TRUE, covarList = covarList_directed) "bernoulli", TRUE, covarList = covarList_directed) mySBM_sbm$optimize(estimOptions = list(verbosity = 0, mySBM_sbm$optimize(estimOptions = list(verbosity = 0, plot = FALSE)) plot = FALSE)) mySBM_sbm$setModel(Q) mySBM_sbm$setModel(Q) net <- missSBM:::partlyObservedNetwork$new(sampler_directed_cov$networkData, net <- missSBM:::partlyObservedNetwork$new(sampler_directed_cov$networkData, covariates = covarList_directed) covariates = covarList_directed) cls <- net$clustering(1:(2 * Q)) cls <- net$clustering(1:(2 * Q)) cl <- cls[[Q]] cl <- cls[[Q]] mySBM_missSBM <- missSBM:::SimpleSBM_fit_withCov$new(net, mySBM_missSBM <- missSBM:::SimpleSBM_fit_withCov$new(net, clusterInit = cl, covarList = covarList_directed) clusterInit = cl, covarList = covarList_directed) mySBM_missSBM$doVEM(trace = TRUE) mySBM_missSBM$doVEM(trace = TRUE) expect_lt(rmse(mySBM_missSBM$connectParam$mean, mySBM_sbm$connectParam$mean), expect_lt(rmse(mySBM_missSBM$connectParam$mean, mySBM_sbm$connectParam$mean), 0.1) 0.1) expect_gt(ARI(mySBM_missSBM$memberships, mySBM_sbm$memberships), expect_gt(ARI(mySBM_missSBM$memberships, mySBM_sbm$memberships), 0.8) 0.8) expect_lt(rmse(mySBM_missSBM$loglik, mySBM_sbm$loglik), expect_lt(rmse(mySBM_missSBM$loglik, mySBM_sbm$loglik), 0.05) 0.05) expect_lt(rmse(mySBM_missSBM$connectParam$mean, sampler_directed_cov$connectParam$mean), expect_lt(rmse(mySBM_missSBM$connectParam$mean, sampler_directed_cov$connectParam$mean), 0.1) 0.1) expect_gt(ARI(mySBM_missSBM$memberships, sampler_directed_cov$memberships), expect_gt(ARI(mySBM_missSBM$memberships, sampler_directed_cov$memberships), 0.85) 0.85) }) })
30: 30: eval(code, test_env)
eval(code, test_env)
31: 31: eval(code, test_env)
eval(code, test_env)32:
withCallingHandlers({32: eval(code, test_env)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) { 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()) { }}, 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_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_error, interrupt = handle_interrupt)
33: 33: doTryCatch(return(expr), name, parentenv, handler)doTryCatch(return(expr), name, parentenv, handler)
34: 34: tryCatchOne(expr, names, parentenv, handlers[[1L]])tryCatchOne(expr, names, parentenv, handlers[[1L]])
35: 35: tryCatchList(expr, classes, parentenv, handlers)tryCatchList(expr, classes, parentenv, handlers)
36: 36: tryCatch(withCallingHandlers({tryCatch(withCallingHandlers({ eval(code, test_env) eval(code, test_env) new_expectations <- the$test_expectations > starting_expectations new_expectations <- the$test_expectations > starting_expectations if (snapshot_skipped) { if (snapshot_skipped) { skip("On CRAN") skip("On CRAN") } } else if (!new_expectations && skip_on_empty) { 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), error = handle_fatal)
37: 37: doWithOneRestart(return(expr), restart)doWithOneRestart(return(expr), restart)
38: 38: withOneRestart(expr, restarts[[1L]])withOneRestart(expr, restarts[[1L]])
39: 39: withRestarts(tryCatch(withCallingHandlers({withRestarts(tryCatch(withCallingHandlers({ eval(code, test_env) new_expectations <- the$test_expectations > starting_expectations eval(code, test_env) if (snapshot_skipped) { new_expectations <- the$test_expectations > starting_expectations skip("On CRAN") if (snapshot_skipped) { } skip("On CRAN") else if (!new_expectations && skip_on_empty) { } skip_empty() else if (!new_expectations && skip_on_empty) { } skip_empty()}, expectation = handle_expectation, packageNotFoundError = function(e) { } if (on_cran()) { skip(paste0("{", e$package, "} is not installed."))}, expectation = handle_expectation, packageNotFoundError = function(e) { } if (on_cran()) {}, snapshot_on_cran = function(cnd) { skip(paste0("{", e$package, "} is not installed.")) snapshot_skipped <<- TRUE } invokeRestart("muffle_cran_snapshot")}, snapshot_on_cran = function(cnd) {}, skip = handle_skip, warning = handle_warning, message = handle_message, 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, 40: test_code(code = exprs, env = env, reporter = get_reporter() %||% error = handle_error, interrupt = handle_interrupt), error = handle_fatal), StopReporter$new()) end_test = function() {
})41:
source_file(path, env = env(env), desc = desc, shuffle = shuffle, 40: error_call = error_call)test_code(code = exprs, env = env, reporter = get_reporter() %||%
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: 43: doTryCatch(return(expr), name, parentenv, handler)lapply(test_paths, test_one_file, env = env, desc = desc, shuffle = shuffle,
error_call = error_call)
45: tryCatchOne(expr, names, parentenv, handlers[[1L]])44:
doTryCatch(return(expr), name, parentenv, handler)46:
tryCatchList(expr, classes, parentenv, handlers)45:
tryCatchOne(expr, names, parentenv, handlers[[1L]])47:
46: tryCatch(code, testthat_abort_reporter = function(cnd) { cat(conditionMessage(cnd), "\n")tryCatchList(expr, classes, parentenv, handlers) NULL
})47:
tryCatch(code, testthat_abort_reporter = function(cnd) {48: 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,
test_paths = test_paths, load_helpers = load_helpers, reporter = reporter, env = env, stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning, 48: with_reporter(reporters$multi, lapply(test_paths, test_one_file, desc = desc, load_package = load_package, shuffle = shuffle, env = env, desc = desc, shuffle = shuffle, error_call = error_call)) error_call = error_call)
49: 50: test_files_serial(test_dir = test_dir, test_package = test_package, test_files(test_dir = path, test_paths = test_paths, test_package = package, test_paths = test_paths, load_helpers = load_helpers, reporter = reporter, reporter = reporter, load_helpers = load_helpers, env = env, env = env, stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning, stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning, desc = desc, load_package = load_package, shuffle = shuffle, load_package = load_package, parallel = parallel, shuffle = shuffle) error_call = error_call)
51: 50: test_dir("testthat", package = package, reporter = reporter, test_files(test_dir = path, test_paths = test_paths, test_package = package, ..., load_package = "installed") reporter = reporter, load_helpers = load_helpers, env = env,
stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning, 52: load_package = load_package, parallel = parallel, shuffle = shuffle)test_check("missSBM")
51: An irrecoverable exception occurred. R is aborting now ...
test_dir("testthat", package = package, reporter = reporter, ..., load_package = "installed")
52: test_check("missSBM")
An irrecoverable exception occurred. R is aborting now ...
Saving _problems/test-sbm-bernoulli-with-covariates-46.R
*** caught segfault ***
address 0x110, cause 'invalid permissions'
*** caught segfault ***
address 0x110, cause 'invalid permissions'
Traceback:
1: dispatcher(membership_name, membership_init$to_cc(), model_name, .self$network_to_cc(), TRUE)
2: FUN(X[[i]], ...)
3: lapply(X = S, FUN = FUN, ...)
4: doTryCatch(return(expr), name, parentenv, handler)
5: tryCatchOne(expr, names, parentenv, handlers[[1L]])
6: tryCatchList(expr, classes, parentenv, handlers)
7: tryCatch(expr, error = function(e) { call <- conditionCall(e) if (!is.null(call)) { if (identical(call[[1L]], quote(doTryCatch))) call <- sys.call(-4L) dcall <- deparse(call, nlines = 1L) prefix <- paste("Error in", dcall, ": ") LONG <- 75L sm <- strsplit(conditionMessage(e), "\n")[[1L]] w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w") if (is.na(w)) w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L], type = "b") if (w > LONG) prefix <- paste0(prefix, "\n ") } else prefix <- "Error : " msg <- paste0(prefix, conditionMessage(e), "\n") .Internal(seterrmessage(msg[1L])) if (!silent && isTRUE(getOption("show.error.messages"))) { cat(msg, file = outFile) .Internal(printDeferredWarnings()) } invisible(structure(msg, class = "try-error", condition = e))})
8: try(lapply(X = S, FUN = FUN, ...), silent = TRUE)
9: sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE))
10: FUN(X[[i]], ...)
11: lapply(seq_len(cores), inner.do)
12: parallel::mclapply(X, FUN, ..., mc.cores = mc.cores, mc.set.seed = FALSE, mc.silent = TRUE)
13: parallel_lapply(inits, .self$do_one_estim, mc.cores = ncores, verbose = (verbosity > 4))
14: .self$do_with_inits(inits, Q, reinitialization_effort)
15: .self$estim_ascend(reinitialization_effort, changing_effort)
16: private$BMobject$estimate()
17: mySBM_sbm$optimize(estimOptions = list(verbosity = 0, plot = FALSE))
18: eval(code, test_env)
19: eval(code, test_env)
20: withCallingHandlers({ eval(code, test_env) new_expectations <- the$test_expectations > starting_expectations if (snapshot_skipped) { skip("On CRAN") } else if (!new_expectations && skip_on_empty) { skip_empty() }}, expectation = handle_expectation, packageNotFoundError = function(e) { if (on_cran()) { skip(paste0("{", e$package, "} is not installed.")) }}, snapshot_on_cran = function(cnd) { snapshot_skipped <<- TRUE invokeRestart("muffle_cran_snapshot")}, skip = handle_skip, warning = handle_warning, message = handle_message, error = handle_error, interrupt = handle_interrupt)
21: doTryCatch(return(expr), name, parentenv, handler)
22: tryCatchOne(expr, names, parentenv, handlers[[1L]])
23: tryCatchList(expr, classes, parentenv, handlers)
24: tryCatch(withCallingHandlers({ eval(code, test_env) new_expectations <- the$test_expectations > starting_expectations if (snapshot_skipped) { skip("On CRAN") } else if (!new_expectations && skip_on_empty) { skip_empty() }}, expectation = handle_expectation, packageNotFoundError = function(e) { if (on_cran()) { skip(paste0("{", e$package, "} is not installed.")) }}, snapshot_on_cran = function(cnd) { snapshot_skipped <<- TRUE invokeRestart("muffle_cran_snapshot")}, skip = handle_skip, warning = handle_warning, message = handle_message, error = handle_error, interrupt = handle_interrupt), error = handle_fatal)
25: doWithOneRestart(return(expr), restart)
26: withOneRestart(expr, restarts[[1L]])
27: withRestarts(tryCatch(withCallingHandlers({ eval(code, test_env) new_expectations <- the$test_expectations > starting_expectations if (snapshot_skipped) { skip("On CRAN") } else if (!new_expectations && skip_on_empty) { skip_empty()
Traceback:
1: dispatcher(membership_name, membership_init$to_cc(), model_name, }}, expectation = handle_expectation, packageNotFoundError = function(e) { .self$network_to_cc(), TRUE) if (on_cran()) {
skip(paste0("{", e$package, "} is not installed.")) 2: }FUN(X[[i]], ...)
}, snapshot_on_cran = function(cnd) { 3: snapshot_skipped <<- TRUE invokeRestart("muffle_cran_snapshot")lapply(X = S, FUN = FUN, ...)}, skip = handle_skip, warning = handle_warning, message = handle_message,
4: error = handle_error, interrupt = handle_interrupt), error = handle_fatal), end_test = function() {doTryCatch(return(expr), name, parentenv, handler) })
5: 28: tryCatchOne(expr, names, parentenv, handlers[[1L]])test_code(code, parent.frame())
6: 29: tryCatchList(expr, classes, parentenv, handlers)test_that("SimpleSBM_fit 'Bernoulli' model, undirected, no covariate",
{ 7: sampler_undirected_nocov$rNetwork(store = TRUE)tryCatch(expr, error = function(e) { mySBM_sbm <- sbm::SimpleSBM_fit$new(sampler_undirected_nocov$networkData, call <- conditionCall(e) "bernoulli", FALSE) if (!is.null(call)) { mySBM_sbm$optimize(estimOptions = list(verbosity = 0, if (identical(call[[1L]], quote(doTryCatch))) plot = FALSE)) call <- sys.call(-4L) mySBM_sbm$setModel(3) dcall <- deparse(call, nlines = 1L) net <- missSBM:::partlyObservedNetwork$new(sampler_undirected_nocov$networkData) prefix <- paste("Error in", dcall, ": ") cl <- net$clustering(3)[[1]] LONG <- 75L mySBM_missSBM <- missSBM:::SimpleSBM_fit_noCov$new(net, sm <- strsplit(conditionMessage(e), "\n")[[1L]] clusterInit = cl) w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w") if (is.na(w)) mySBM_missSBM$doVEM() w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L], expect_lt(rmse(mySBM_missSBM$connectParam$mean, mySBM_sbm$connectParam$mean), type = "b") 0.05) if (w > LONG) expect_gt(ARI(mySBM_missSBM$memberships, mySBM_sbm$memberships), prefix <- paste0(prefix, "\n ") 0.95) } expect_lt(rmse(mySBM_missSBM$loglik, mySBM_sbm$loglik), else prefix <- "Error : " 0.01) msg <- paste0(prefix, conditionMessage(e), "\n") expect_lt(rmse(mySBM_missSBM$connectParam$mean, sampler_undirected_nocov$connectParam$mean), .Internal(seterrmessage(msg[1L])) 0.05) if (!silent && isTRUE(getOption("show.error.messages"))) { expect_gt(ARI(mySBM_missSBM$memberships, sampler_undirected_nocov$memberships), cat(msg, file = outFile) 0.95) .Internal(printDeferredWarnings()) })
}30: invisible(structure(msg, class = "try-error", condition = e))eval(code, test_env)})
31: 8: eval(code, test_env)try(lapply(X = S, FUN = FUN, ...), silent = TRUE)
32: 9: withCallingHandlers({sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE)) eval(code, test_env)
new_expectations <- the$test_expectations > starting_expectations10: if (snapshot_skipped) { skip("On CRAN") }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, }}, snapshot_on_cran = function(cnd) { mc.silent = TRUE) snapshot_skipped <<- TRUE
invokeRestart("muffle_cran_snapshot")13: }, skip = handle_skip, warning = handle_warning, message = handle_message, error = handle_error, interrupt = handle_interrupt)parallel_lapply(inits, .self$do_one_estim, mc.cores = ncores,
verbose = (verbosity > 4))33:
doTryCatch(return(expr), name, parentenv, handler)14:
.self$do_with_inits(inits, Q, reinitialization_effort)34: tryCatchOne(expr, names, parentenv, handlers[[1L]])
15:
.self$estim_ascend(reinitialization_effort, changing_effort)35:
tryCatchList(expr, classes, parentenv, handlers)16:
private$BMobject$estimate()
36: 17: mySBM_sbm$optimize(estimOptions = list(verbosity = 0, plot = FALSE))tryCatch(withCallingHandlers({
eval(code, test_env)18: eval(code, test_env) new_expectations <- the$test_expectations > starting_expectations if (snapshot_skipped) {
19: skip("On CRAN")eval(code, test_env) }
else if (!new_expectations && skip_on_empty) { skip_empty()20: }withCallingHandlers({}, expectation = handle_expectation, packageNotFoundError = function(e) { if (on_cran()) { eval(code, test_env) skip(paste0("{", e$package, "} is not installed.")) } new_expectations <- the$test_expectations > starting_expectations}, snapshot_on_cran = function(cnd) { snapshot_skipped <<- TRUE 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)
}37: else if (!new_expectations && skip_on_empty) {doWithOneRestart(return(expr), restart) skip_empty()
}38: }, expectation = handle_expectation, packageNotFoundError = function(e) {withOneRestart(expr, restarts[[1L]]) if (on_cran()) { skip(paste0("{", e$package, "} is not installed."))
}39: }, snapshot_on_cran = function(cnd) {withRestarts(tryCatch(withCallingHandlers({ snapshot_skipped <<- TRUE eval(code, test_env) 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) }
else if (!new_expectations && skip_on_empty) {21: skip_empty()doTryCatch(return(expr), name, parentenv, handler) }
}, expectation = handle_expectation, packageNotFoundError = function(e) { if (on_cran()) {22: skip(paste0("{", e$package, "} is not installed.")) }tryCatchOne(expr, names, parentenv, handlers[[1L]])}, snapshot_on_cran = function(cnd) {
23: tryCatchList(expr, classes, parentenv, handlers) snapshot_skipped <<- TRUE
invokeRestart("muffle_cran_snapshot")24: }, skip = handle_skip, warning = handle_warning, message = handle_message, tryCatch(withCallingHandlers({ error = handle_error, interrupt = handle_interrupt), error = handle_fatal), eval(code, test_env) end_test = function() { new_expectations <- the$test_expectations > starting_expectations }) if (snapshot_skipped) { skip("On CRAN")
}40: else if (!new_expectations && skip_on_empty) { 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) {42: FUN(X[[i]], ...) snapshot_skipped <<- TRUE
invokeRestart("muffle_cran_snapshot")43: }, skip = handle_skip, warning = handle_warning, message = handle_message, lapply(test_paths, test_one_file, env = env, desc = desc, shuffle = shuffle, error = handle_error, interrupt = handle_interrupt), error = handle_fatal) error_call = error_call)
44: 25: doTryCatch(return(expr), name, parentenv, handler)doWithOneRestart(return(expr), restart)
45: 26: tryCatchOne(expr, names, parentenv, handlers[[1L]])withOneRestart(expr, restarts[[1L]])
46: 27: tryCatchList(expr, classes, parentenv, handlers)withRestarts(tryCatch(withCallingHandlers({
eval(code, test_env)47: new_expectations <- the$test_expectations > starting_expectationstryCatch(code, testthat_abort_reporter = function(cnd) { if (snapshot_skipped) { skip("On CRAN") cat(conditionMessage(cnd), "\n") NULL }}) else if (!new_expectations && skip_on_empty) { skip_empty()
}48: }, expectation = handle_expectation, packageNotFoundError = function(e) {with_reporter(reporters$multi, lapply(test_paths, test_one_file, if (on_cran()) { env = env, desc = desc, shuffle = shuffle, error_call = error_call)) skip(paste0("{", e$package, "} is not installed."))
}49: }, snapshot_on_cran = function(cnd) {test_files_serial(test_dir = test_dir, test_package = test_package, snapshot_skipped <<- TRUE test_paths = test_paths, load_helpers = load_helpers, reporter = reporter, invokeRestart("muffle_cran_snapshot") env = env, stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning, }, skip = handle_skip, warning = handle_warning, message = handle_message, error = handle_error, interrupt = handle_interrupt), error = handle_fatal), desc = desc, load_package = load_package, shuffle = shuffle, end_test = function() { error_call = error_call) })
50: 28: test_files(test_dir = path, test_paths = test_paths, test_package = package, test_code(code, parent.frame()) reporter = reporter, load_helpers = load_helpers, env = env,
stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning, 29: load_package = load_package, parallel = parallel, shuffle = shuffle)test_that("SimpleSBM_fit 'Bernoulli' model, undirected, no covariate",
{51: sampler_undirected_nocov$rNetwork(store = TRUE)test_dir("testthat", package = package, reporter = reporter, mySBM_sbm <- sbm::SimpleSBM_fit$new(sampler_undirected_nocov$networkData, ..., load_package = "installed")
"bernoulli", FALSE)52: mySBM_sbm$optimize(estimOptions = list(verbosity = 0, test_check("missSBM") plot = FALSE))
mySBM_sbm$setModel(3)An irrecoverable exception occurred. R is aborting now ...
net <- missSBM:::partlyObservedNetwork$new(sampler_undirected_nocov$networkData) cl <- net$clustering(3)[[1]] mySBM_missSBM <- missSBM:::SimpleSBM_fit_noCov$new(net, clusterInit = cl) mySBM_missSBM$doVEM() expect_lt(rmse(mySBM_missSBM$connectParam$mean, mySBM_sbm$connectParam$mean), 0.05) expect_gt(ARI(mySBM_missSBM$memberships, mySBM_sbm$memberships), 0.95) expect_lt(rmse(mySBM_missSBM$loglik, mySBM_sbm$loglik), 0.01) expect_lt(rmse(mySBM_missSBM$connectParam$mean, sampler_undirected_nocov$connectParam$mean), 0.05) expect_gt(ARI(mySBM_missSBM$memberships, sampler_undirected_nocov$memberships), 0.95) })
30: eval(code, test_env)
31: eval(code, test_env)
32: withCallingHandlers({ eval(code, test_env) new_expectations <- the$test_expectations > starting_expectations if (snapshot_skipped) { skip("On CRAN") } else if (!new_expectations && skip_on_empty) { skip_empty() }}, expectation = handle_expectation, packageNotFoundError = function(e) { if (on_cran()) { skip(paste0("{", e$package, "} is not installed.")) }}, snapshot_on_cran = function(cnd) { snapshot_skipped <<- TRUE invokeRestart("muffle_cran_snapshot")}, skip = handle_skip, warning = handle_warning, message = handle_message, error = handle_error, interrupt = handle_interrupt)
33: doTryCatch(return(expr), name, parentenv, handler)
34: tryCatchOne(expr, names, parentenv, handlers[[1L]])
35: tryCatchList(expr, classes, parentenv, handlers)
36: tryCatch(withCallingHandlers({ eval(code, test_env) new_expectations <- the$test_expectations > starting_expectations if (snapshot_skipped) { skip("On CRAN") } else if (!new_expectations && skip_on_empty) { skip_empty() }}, expectation = handle_expectation, packageNotFoundError = function(e) { if (on_cran()) { skip(paste0("{", e$package, "} is not installed.")) }}, snapshot_on_cran = function(cnd) { snapshot_skipped <<- TRUE invokeRestart("muffle_cran_snapshot")}, skip = handle_skip, warning = handle_warning, message = handle_message, error = handle_error, interrupt = handle_interrupt), error = handle_fatal)
37: doWithOneRestart(return(expr), restart)
38: withOneRestart(expr, restarts[[1L]])
39: withRestarts(tryCatch(withCallingHandlers({ eval(code, test_env) new_expectations <- the$test_expectations > starting_expectations if (snapshot_skipped) { skip("On CRAN") } else if (!new_expectations && skip_on_empty) { skip_empty() }}, expectation = handle_expectation, packageNotFoundError = function(e) { if (on_cran()) { skip(paste0("{", e$package, "} is not installed.")) }}, snapshot_on_cran = function(cnd) { snapshot_skipped <<- TRUE invokeRestart("muffle_cran_snapshot")}, skip = handle_skip, warning = handle_warning, message = handle_message, error = handle_error, interrupt = handle_interrupt), error = handle_fatal), end_test = function() { })
40: test_code(code = exprs, env = env, reporter = get_reporter() %||% StopReporter$new())
41: source_file(path, env = env(env), desc = desc, shuffle = shuffle, error_call = error_call)
42: FUN(X[[i]], ...)
43: lapply(test_paths, test_one_file, env = env, desc = desc, shuffle = shuffle, error_call = error_call)
44: doTryCatch(return(expr), name, parentenv, handler)
45: tryCatchOne(expr, names, parentenv, handlers[[1L]])
46: tryCatchList(expr, classes, parentenv, handlers)
47: tryCatch(code, testthat_abort_reporter = function(cnd) { cat(conditionMessage(cnd), "\n") NULL})
48: with_reporter(reporters$multi, lapply(test_paths, test_one_file, env = env, desc = desc, shuffle = shuffle, error_call = error_call))
49: test_files_serial(test_dir = test_dir, test_package = test_package, test_paths = test_paths, load_helpers = load_helpers, reporter = reporter, env = env, stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning, desc = desc, load_package = load_package, shuffle = shuffle, error_call = error_call)
50: test_files(test_dir = path, test_paths = test_paths, test_package = package, reporter = reporter, load_helpers = load_helpers, env = env, stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning, load_package = load_package, parallel = parallel, shuffle = shuffle)
51: test_dir("testthat", package = package, reporter = reporter, ..., load_package = "installed")
52: test_check("missSBM")
An irrecoverable exception occurred. R is aborting now ...
Saving _problems/test-sbm-bernoulli-without-covariate-16.R
*** caught segfault ***
address 0x110, cause 'invalid permissions'
*** caught segfault ***
address 0x110, cause 'invalid permissions'
Traceback:
1: dispatcher(membership_name, membership_init$to_cc(), model_name, .self$network_to_cc(), TRUE)
2: FUN(X[[i]], ...)
3: lapply(X = S, FUN = FUN, ...)
4: doTryCatch(return(expr), name, parentenv, handler)
5: tryCatchOne(expr, names, parentenv, handlers[[1L]])
6: tryCatchList(expr, classes, parentenv, handlers)
7: tryCatch(expr, error = function(e) { call <- conditionCall(e) if (!is.null(call)) { if (identical(call[[1L]], quote(doTryCatch))) call <- sys.call(-4L) dcall <- deparse(call, nlines = 1L) prefix <- paste("Error in", dcall, ": ") LONG <- 75L sm <- strsplit(conditionMessage(e), "\n")[[1L]] w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w") if (is.na(w)) w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L], type = "b") if (w > LONG) prefix <- paste0(prefix, "\n ") } else prefix <- "Error : " msg <- paste0(prefix, conditionMessage(e), "\n") .Internal(seterrmessage(msg[1L])) if (!silent && isTRUE(getOption("show.error.messages"))) { cat(msg, file = outFile) .Internal(printDeferredWarnings()) } invisible(structure(msg, class = "try-error", condition = e))})
8: try(lapply(X = S, FUN = FUN, ...), silent = TRUE)
9: sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE))
10: FUN(X[[i]], ...)
11: lapply(seq_len(cores), inner.do)
12: parallel::mclapply(X, FUN, ..., mc.cores = mc.cores, mc.set.seed = FALSE, mc.silent = TRUE)
13: parallel_lapply(inits, .self$do_one_estim, mc.cores = ncores, verbose = (verbosity > 4))
Traceback:
1: 14: dispatcher(membership_name, membership_init$to_cc(), model_name, .self$network_to_cc(), TRUE).self$do_with_inits(inits, Q, reinitialization_effort)
15: 2: .self$estim_ascend(reinitialization_effort, changing_effort)
FUN(X[[i]], ...)16:
3: private$BMobject$estimate()lapply(X = S, FUN = FUN, ...)
17: mySBM_sbm$optimize(estimOptions = list(verbosity = 0, plot = FALSE)) 4:
doTryCatch(return(expr), name, parentenv, handler)18:
eval(code, test_env) 5:
19: tryCatchOne(expr, names, parentenv, handlers[[1L]])eval(code, test_env)
6: 20: withCallingHandlers({tryCatchList(expr, classes, parentenv, handlers) eval(code, test_env)
7: new_expectations <- the$test_expectations > starting_expectationstryCatch(expr, error = function(e) { if (snapshot_skipped) { skip("On CRAN") call <- conditionCall(e) if (!is.null(call)) { } else if (!new_expectations && skip_on_empty) { skip_empty() if (identical(call[[1L]], quote(doTryCatch))) call <- sys.call(-4L) } dcall <- deparse(call, nlines = 1L)}, expectation = handle_expectation, packageNotFoundError = function(e) { prefix <- paste("Error in", dcall, ": ") if (on_cran()) { LONG <- 75L skip(paste0("{", e$package, "} is not installed.")) 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], }, snapshot_on_cran = function(cnd) { type = "b") snapshot_skipped <<- TRUE if (w > LONG) invokeRestart("muffle_cran_snapshot") prefix <- paste0(prefix, "\n ") }}, skip = handle_skip, warning = handle_warning, message = handle_message, else prefix <- "Error : " error = handle_error, interrupt = handle_interrupt) msg <- paste0(prefix, conditionMessage(e), "\n") .Internal(seterrmessage(msg[1L]))
if (!silent && isTRUE(getOption("show.error.messages"))) {21: cat(msg, file = outFile)doTryCatch(return(expr), name, parentenv, handler) .Internal(printDeferredWarnings())
}22: invisible(structure(msg, class = "try-error", condition = e))tryCatchOne(expr, names, parentenv, handlers[[1L]])})
23: 8: tryCatchList(expr, classes, parentenv, handlers)try(lapply(X = S, FUN = FUN, ...), silent = TRUE)
24: 9: tryCatch(withCallingHandlers({sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE)) eval(code, test_env)
new_expectations <- the$test_expectations > starting_expectations10: if (snapshot_skipped) {FUN(X[[i]], ...) skip("On CRAN")
}11: else if (!new_expectations && skip_on_empty) {lapply(seq_len(cores), inner.do)
skip_empty()12: }parallel::mclapply(X, FUN, ..., mc.cores = mc.cores, mc.set.seed = FALSE, }, expectation = handle_expectation, packageNotFoundError = function(e) { mc.silent = TRUE) if (on_cran()) {
skip(paste0("{", e$package, "} is not installed.")) }13: parallel_lapply(inits, .self$do_one_estim, mc.cores = ncores, }, snapshot_on_cran = function(cnd) { verbose = (verbosity > 4)) snapshot_skipped <<- TRUE
14: invokeRestart("muffle_cran_snapshot").self$do_with_inits(inits, Q, reinitialization_effort)}, skip = handle_skip, warning = handle_warning, message = handle_message,
error = handle_error, interrupt = handle_interrupt), error = handle_fatal)15:
25: .self$estim_ascend(reinitialization_effort, changing_effort)doWithOneRestart(return(expr), restart)
26: 16: private$BMobject$estimate()
withOneRestart(expr, restarts[[1L]])17:
mySBM_sbm$optimize(estimOptions = list(verbosity = 0, plot = FALSE))
27: 18: withRestarts(tryCatch(withCallingHandlers({eval(code, test_env) eval(code, test_env)
new_expectations <- the$test_expectations > starting_expectations19: if (snapshot_skipped) {eval(code, test_env) skip("On CRAN")
}20: else if (!new_expectations && skip_on_empty) {withCallingHandlers({ skip_empty() eval(code, test_env) } new_expectations <- the$test_expectations > starting_expectations}, expectation = handle_expectation, packageNotFoundError = function(e) { 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 invokeRestart("muffle_cran_snapshot") skip_empty()}, skip = handle_skip, warning = handle_warning, message = handle_message, } error = handle_error, interrupt = handle_interrupt), error = handle_fatal), }, expectation = handle_expectation, packageNotFoundError = function(e) { end_test = function() { if (on_cran()) { }) skip(paste0("{", e$package, "} is not installed."))
}28: }, snapshot_on_cran = function(cnd) {test_code(code, parent.frame()) snapshot_skipped <<- TRUE
invokeRestart("muffle_cran_snapshot")29: }, skip = handle_skip, warning = handle_warning, message = handle_message, test_that("SimpleSBM_fit 'Bernoulli' model, directed, no covariate", error = handle_error, interrupt = handle_interrupt) {
sampler_directed_nocov$rNetwork(store = TRUE)21: mySBM_sbm <- sbm::SimpleSBM_fit$new(sampler_directed_nocov$networkData, doTryCatch(return(expr), name, parentenv, handler) "bernoulli", TRUE) mySBM_sbm$optimize(estimOptions = list(verbosity = 0,
22: plot = FALSE))tryCatchOne(expr, names, parentenv, handlers[[1L]]) mySBM_sbm$setModel(3)
net <- missSBM:::partlyObservedNetwork$new(sampler_directed_nocov$networkData) cl <- net$clustering(3)[[1]]23: mySBM_missSBM <- missSBM:::SimpleSBM_fit_noCov$new(sampler_directed_nocov$networkData, tryCatchList(expr, classes, parentenv, handlers) clusterInit = cl)
mySBM_missSBM$doVEM()24: expect_lt(rmse(mySBM_missSBM$connectParam$mean, mySBM_sbm$connectParam$mean), tryCatch(withCallingHandlers({ 0.1) eval(code, test_env) expect_gt(ARI(mySBM_missSBM$memberships, mySBM_sbm$memberships), new_expectations <- the$test_expectations > starting_expectations 0.95) if (snapshot_skipped) { expect_lt(rmse(mySBM_missSBM$loglik, mySBM_sbm$loglik), skip("On CRAN") 0.01) } else if (!new_expectations && skip_on_empty) { expect_lt(rmse(mySBM_missSBM$connectParam$mean, sampler_directed_nocov$connectParam$mean), skip_empty() 0.1) } expect_lt(rmse(mySBM_missSBM$covarParam, sampler_directed_cov$covarParam), 0.2)}, expectation = handle_expectation, packageNotFoundError = function(e) { expect_gt(ARI(mySBM_missSBM$memberships, sampler_directed_nocov$memberships), if (on_cran()) { 0.95) skip(paste0("{", e$package, "} is not installed.")) } })}, snapshot_on_cran = function(cnd) {
snapshot_skipped <<- TRUE30: invokeRestart("muffle_cran_snapshot")eval(code, test_env)}, skip = handle_skip, warning = handle_warning, message = handle_message,
error = handle_error, interrupt = handle_interrupt), error = handle_fatal)31:
eval(code, test_env)25:
doWithOneRestart(return(expr), restart)32:
withCallingHandlers({26: eval(code, test_env)withOneRestart(expr, restarts[[1L]]) new_expectations <- the$test_expectations > starting_expectations if (snapshot_skipped) {
skip("On CRAN")27: }withRestarts(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) {}, 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") if (on_cran()) {}, skip = handle_skip, warning = handle_warning, message = handle_message, skip(paste0("{", e$package, "} is not installed.")) error = handle_error, interrupt = handle_interrupt) }
}, snapshot_on_cran = function(cnd) {33: snapshot_skipped <<- TRUEdoTryCatch(return(expr), name, parentenv, handler) invokeRestart("muffle_cran_snapshot")
}, skip = handle_skip, warning = handle_warning, message = handle_message, 34: error = handle_error, interrupt = handle_interrupt), error = handle_fatal), tryCatchOne(expr, names, parentenv, handlers[[1L]]) end_test = function() {
})35:
tryCatchList(expr, classes, parentenv, handlers)28:
test_code(code, parent.frame())36:
tryCatch(withCallingHandlers({29: eval(code, test_env)test_that("SimpleSBM_fit 'Bernoulli' model, directed, no covariate", new_expectations <- the$test_expectations > starting_expectations { if (snapshot_skipped) { sampler_directed_nocov$rNetwork(store = TRUE) skip("On CRAN") mySBM_sbm <- sbm::SimpleSBM_fit$new(sampler_directed_nocov$networkData, "bernoulli", TRUE) } mySBM_sbm$optimize(estimOptions = list(verbosity = 0, else if (!new_expectations && skip_on_empty) { plot = FALSE)) skip_empty() mySBM_sbm$setModel(3) } net <- missSBM:::partlyObservedNetwork$new(sampler_directed_nocov$networkData)}, expectation = handle_expectation, packageNotFoundError = function(e) { cl <- net$clustering(3)[[1]] if (on_cran()) { mySBM_missSBM <- missSBM:::SimpleSBM_fit_noCov$new(sampler_directed_nocov$networkData, skip(paste0("{", e$package, "} is not installed.")) clusterInit = cl) } mySBM_missSBM$doVEM()}, snapshot_on_cran = function(cnd) { snapshot_skipped <<- TRUE expect_lt(rmse(mySBM_missSBM$connectParam$mean, mySBM_sbm$connectParam$mean), invokeRestart("muffle_cran_snapshot") 0.1)}, skip = handle_skip, warning = handle_warning, message = handle_message, expect_gt(ARI(mySBM_missSBM$memberships, mySBM_sbm$memberships), error = handle_error, interrupt = handle_interrupt), error = handle_fatal) 0.95)
expect_lt(rmse(mySBM_missSBM$loglik, mySBM_sbm$loglik), 37: 0.01) expect_lt(rmse(mySBM_missSBM$connectParam$mean, sampler_directed_nocov$connectParam$mean), doWithOneRestart(return(expr), restart) 0.1)
expect_lt(rmse(mySBM_missSBM$covarParam, sampler_directed_cov$covarParam), 38: 0.2)withOneRestart(expr, restarts[[1L]]) expect_gt(ARI(mySBM_missSBM$memberships, sampler_directed_nocov$memberships), 0.95)
})39:
withRestarts(tryCatch(withCallingHandlers({30: eval(code, test_env)eval(code, test_env) new_expectations <- the$test_expectations > starting_expectations
31: if (snapshot_skipped) { skip("On CRAN")eval(code, test_env) }
32: else if (!new_expectations && skip_on_empty) {withCallingHandlers({ skip_empty() eval(code, test_env) }}, expectation = handle_expectation, packageNotFoundError = function(e) { new_expectations <- the$test_expectations > starting_expectations if (on_cran()) { if (snapshot_skipped) { skip("On CRAN") skip(paste0("{", e$package, "} is not installed.")) } } else if (!new_expectations && skip_on_empty) {}, snapshot_on_cran = function(cnd) { skip_empty() snapshot_skipped <<- TRUE } invokeRestart("muffle_cran_snapshot")}, expectation = handle_expectation, packageNotFoundError = function(e) {}, skip = handle_skip, warning = handle_warning, message = handle_message, if (on_cran()) { error = handle_error, interrupt = handle_interrupt), error = handle_fatal), skip(paste0("{", e$package, "} is not installed.")) end_test = function() { } })}, snapshot_on_cran = function(cnd) {
snapshot_skipped <<- TRUE40: test_code(code = exprs, env = env, reporter = get_reporter() %||% invokeRestart("muffle_cran_snapshot") StopReporter$new())}, skip = handle_skip, warning = handle_warning, message = handle_message,
error = handle_error, interrupt = handle_interrupt)41:
source_file(path, env = env(env), desc = desc, shuffle = shuffle, 33: error_call = error_call)doTryCatch(return(expr), name, parentenv, handler)
42: 34: FUN(X[[i]], ...)tryCatchOne(expr, names, parentenv, handlers[[1L]])
43: 35: lapply(test_paths, test_one_file, env = env, desc = desc, shuffle = shuffle, tryCatchList(expr, classes, parentenv, handlers) error_call = error_call)
36: 44: doTryCatch(return(expr), name, parentenv, handler)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, env = env, desc = desc, shuffle = shuffle, error_call = error_call)) invokeRestart("muffle_cran_snapshot")
}, skip = handle_skip, warning = handle_warning, message = handle_message, 49: error = handle_error, interrupt = handle_interrupt), error = handle_fatal)test_files_serial(test_dir = test_dir, test_package = test_package,
test_paths = test_paths, load_helpers = load_helpers, reporter = reporter, env = env, stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning, 37: desc = desc, load_package = load_package, shuffle = shuffle, doWithOneRestart(return(expr), restart) error_call = error_call)
38: 50: withOneRestart(expr, restarts[[1L]])test_files(test_dir = path, test_paths = test_paths, test_package = package,
reporter = reporter, load_helpers = load_helpers, env = env, 39: stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning, withRestarts(tryCatch(withCallingHandlers({ load_package = load_package, parallel = parallel, shuffle = shuffle) eval(code, test_env)
new_expectations <- the$test_expectations > starting_expectations51: if (snapshot_skipped) {test_dir("testthat", package = package, reporter = reporter, ..., load_package = "installed") skip("On CRAN")
}52: else if (!new_expectations && skip_on_empty) {test_check("missSBM") skip_empty()
}An irrecoverable exception occurred. R is aborting now ...
}, expectation = handle_expectation, packageNotFoundError = function(e) { if (on_cran()) { skip(paste0("{", e$package, "} is not installed.")) }}, snapshot_on_cran = function(cnd) { snapshot_skipped <<- TRUE invokeRestart("muffle_cran_snapshot")}, skip = handle_skip, warning = handle_warning, message = handle_message, error = handle_error, interrupt = handle_interrupt), error = handle_fatal), 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