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