Last updated on 2026-10-05 06:53:03 CEST.
| Flavor | Version | Tinstall | Tcheck | Ttotal | Status | Flags |
|---|---|---|---|---|---|---|
| r-devel-linux-x86_64-debian-clang | 1.1.0 | 81.00 | 357.11 | 438.11 | OK | |
| r-devel-linux-x86_64-debian-gcc | 1.1.0 | 57.25 | 259.50 | 316.75 | OK | |
| r-devel-linux-x86_64-fedora-clang | 1.1.0 | 60.00 | 245.64 | 305.64 | OK | |
| r-devel-linux-x86_64-fedora-gcc | 1.1.0 | 63.00 | 247.50 | 310.50 | OK | |
| r-devel-windows-x86_64 | 1.1.0 | 91.00 | 450.00 | 541.00 | OK | |
| r-patched-linux-x86_64 | 1.1.0 | 78.51 | 347.22 | 425.73 | OK | |
| r-release-linux-x86_64 | 1.1.0 | OK | ||||
| r-release-macos-arm64 | 1.1.0 | 17.00 | 92.00 | 109.00 | OK | |
| r-release-macos-x86_64 | 1.1.0 | 59.00 | 456.00 | 515.00 | OK | |
| r-release-windows-x86_64 | 1.1.0 | 91.00 | 364.00 | 455.00 | OK | |
| r-oldrel-macos-arm64 | 1.1.0 | 20.00 | 105.00 | 125.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 | 116.00 | 494.00 | 610.00 | OK |
Version: 1.1.0
Check: tests
Result: ERROR
Running ‘spelling.R’ [0s/0s]
Running ‘testthat.R’ [39s/31s]
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)
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, undirected, one covariate", { sampler_undirected_cov$rNetwork(store = TRUE) mySBM_sbm <- sbm::SimpleSBM_fit$new(sampler_undirected_cov$networkData, "bernoulli", FALSE, covarList = covarList_undirected) mySBM_sbm$optimize(estimOptions = list(verbosity = 0, plot = FALSE)) mySBM_sbm$setModel(Q) net <- missSBM:::partlyObservedNetwork$new(sampler_undirected_cov$networkData, covariates = covarList_undirected) cls <- net$clustering(1:(2 * Q)) cl <- cls[[Q]] mySBM_missSBM <- missSBM:::SimpleSBM_fit_withCov$new(net, clusterInit = cl, covarList = covarList_undirected) 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.8) expect_lt(rmse(mySBM_missSBM$loglik, mySBM_sbm$loglik), 0.01) expect_lt(rmse(mySBM_missSBM$connectParam$mean, sampler_undirected_cov$connectParam$mean), 0.1) expect_lt(rmse(mySBM_missSBM$covarParam, sampler_undirected_cov$covarParam), 0.1) expect_gt(ARI(mySBM_missSBM$memberships, sampler_undirected_cov$memberships), 0.85) })
30: eval(code, test_env)
31: eval(code, test_env)
32: withCallingHandlers({ eval(code, test_env) new_expectations <- the$test_expectations > starting_expectations if (snapshot_skipped) { skip("On CRAN") } else if (!new_expectations && skip_on_empty) { skip_empty() }}, expectation = handle_expectation, packageNotFoundError = function(e) { if (on_cran()) { skip(paste0("{", e$package, "} is not installed.")) }
Traceback:
}, snapshot_on_cran = function(cnd) { 1: snapshot_skipped <<- TRUEdispatcher(membership_name, membership_init$to_cc(), model_name, invokeRestart("muffle_cran_snapshot") .self$network_to_cc(), TRUE)}, skip = handle_skip, warning = handle_warning, message = handle_message, error = handle_error, interrupt = handle_interrupt)
2: 33: FUN(X[[i]], ...)doTryCatch(return(expr), name, parentenv, handler)
3: 34: lapply(X = S, FUN = FUN, ...)tryCatchOne(expr, names, parentenv, handlers[[1L]])
4: 35: doTryCatch(return(expr), name, parentenv, handler)tryCatchList(expr, classes, parentenv, handlers)
5: 36: tryCatchOne(expr, names, parentenv, handlers[[1L]])tryCatch(withCallingHandlers({
eval(code, test_env) 6: new_expectations <- the$test_expectations > starting_expectationstryCatchList(expr, classes, parentenv, handlers) if (snapshot_skipped) {
skip("On CRAN") 7: }tryCatch(expr, error = function(e) { else if (!new_expectations && skip_on_empty) { 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}, snapshot_on_cran = function(cnd) { sm <- strsplit(conditionMessage(e), "\n")[[1L]] snapshot_skipped <<- TRUE w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w") 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), error = handle_fatal) type = "b") if (w > LONG)
prefix <- paste0(prefix, "\n ")37: }doWithOneRestart(return(expr), restart) else prefix <- "Error : "
msg <- paste0(prefix, conditionMessage(e), "\n")38: .Internal(seterrmessage(msg[1L]))withOneRestart(expr, restarts[[1L]]) if (!silent && isTRUE(getOption("show.error.messages"))) {
cat(msg, file = outFile)39: .Internal(printDeferredWarnings())withRestarts(tryCatch(withCallingHandlers({ } eval(code, test_env) new_expectations <- the$test_expectations > starting_expectations invisible(structure(msg, class = "try-error", condition = e)) if (snapshot_skipped) {}) skip("On CRAN")
} 8: else if (!new_expectations && skip_on_empty) { skip_empty()try(lapply(X = S, FUN = FUN, ...), silent = TRUE) }
}, expectation = handle_expectation, packageNotFoundError = function(e) { if (on_cran()) { skip(paste0("{", e$package, "} is not installed.")) 9: }sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE))}, snapshot_on_cran = function(cnd) {
snapshot_skipped <<- TRUE10: invokeRestart("muffle_cran_snapshot")FUN(X[[i]], ...)}, skip = handle_skip, warning = handle_warning, message = handle_message,
error = handle_error, interrupt = handle_interrupt), error = handle_fatal), 11: end_test = function() {lapply(seq_len(cores), inner.do) })
12: 40: parallel::mclapply(X, FUN, ..., mc.cores = mc.cores, mc.set.seed = FALSE, test_code(code = exprs, env = env, reporter = get_reporter() %||% StopReporter$new()) mc.silent = TRUE)
41: 13: source_file(path, env = env(env), desc = desc, shuffle = shuffle, error_call = error_call)parallel_lapply(inits, .self$do_one_estim, mc.cores = ncores,
verbose = (verbosity > 4))42: FUN(X[[i]], ...)
14: 43: .self$do_with_inits(inits, Q, reinitialization_effort)lapply(test_paths, test_one_file, env = env, desc = desc, shuffle = shuffle,
error_call = error_call)15:
.self$estim_ascend(reinitialization_effort, changing_effort)44:
doTryCatch(return(expr), name, parentenv, handler)16:
private$BMobject$estimate()45:
17: tryCatchOne(expr, names, parentenv, handlers[[1L]])mySBM_sbm$optimize(estimOptions = list(verbosity = 0, plot = FALSE))
46: 18: tryCatchList(expr, classes, parentenv, handlers)eval(code, test_env)
47: 19: tryCatch(code, testthat_abort_reporter = function(cnd) {eval(code, test_env) cat(conditionMessage(cnd), "\n")
NULL20: withCallingHandlers({}) eval(code, test_env)
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)
21: 51: doTryCatch(return(expr), name, parentenv, handler)test_dir("testthat", package = package, reporter = reporter,
..., load_package = "installed")22:
tryCatchOne(expr, names, parentenv, handlers[[1L]])52:
23: test_check("missSBM")tryCatchList(expr, classes, parentenv, handlers)
An irrecoverable exception occurred. R is aborting now ...
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, undirected, one covariate", { sampler_undirected_cov$rNetwork(store = TRUE) mySBM_sbm <- sbm::SimpleSBM_fit$new(sampler_undirected_cov$networkData, "bernoulli", FALSE, covarList = covarList_undirected) mySBM_sbm$optimize(estimOptions = list(verbosity = 0, plot = FALSE)) mySBM_sbm$setModel(Q) net <- missSBM:::partlyObservedNetwork$new(sampler_undirected_cov$networkData, covariates = covarList_undirected) cls <- net$clustering(1:(2 * Q)) cl <- cls[[Q]] mySBM_missSBM <- missSBM:::SimpleSBM_fit_withCov$new(net, clusterInit = cl, covarList = covarList_undirected) 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.8) expect_lt(rmse(mySBM_missSBM$loglik, mySBM_sbm$loglik), 0.01) expect_lt(rmse(mySBM_missSBM$connectParam$mean, sampler_undirected_cov$connectParam$mean), 0.1) expect_lt(rmse(mySBM_missSBM$covarParam, sampler_undirected_cov$covarParam), 0.1) expect_gt(ARI(mySBM_missSBM$memberships, sampler_undirected_cov$memberships), 0.85) })
30: eval(code, test_env)
31: eval(code, test_env)
32: withCallingHandlers({ eval(code, test_env) new_expectations <- the$test_expectations > starting_expectations if (snapshot_skipped) { skip("On CRAN") } else if (!new_expectations && skip_on_empty) { skip_empty() }}, expectation = handle_expectation, packageNotFoundError = function(e) { if (on_cran()) { skip(paste0("{", e$package, "} is not installed.")) }}, snapshot_on_cran = function(cnd) { snapshot_skipped <<- TRUE invokeRestart("muffle_cran_snapshot")}, skip = handle_skip, warning = handle_warning, message = handle_message, error = handle_error, interrupt = handle_interrupt)
33: doTryCatch(return(expr), name, parentenv, handler)
34: tryCatchOne(expr, names, parentenv, handlers[[1L]])
35: tryCatchList(expr, classes, parentenv, handlers)
36: tryCatch(withCallingHandlers({ eval(code, test_env) new_expectations <- the$test_expectations > starting_expectations if (snapshot_skipped) { skip("On CRAN") } else if (!new_expectations && skip_on_empty) { skip_empty() }}, expectation = handle_expectation, packageNotFoundError = function(e) { if (on_cran()) { skip(paste0("{", e$package, "} is not installed.")) }}, snapshot_on_cran = function(cnd) { snapshot_skipped <<- TRUE invokeRestart("muffle_cran_snapshot")}, skip = handle_skip, warning = handle_warning, message = handle_message, error = handle_error, interrupt = handle_interrupt), error = handle_fatal)
37: doWithOneRestart(return(expr), restart)
38: withOneRestart(expr, restarts[[1L]])
39: withRestarts(tryCatch(withCallingHandlers({ eval(code, test_env) new_expectations <- the$test_expectations > starting_expectations if (snapshot_skipped) { skip("On CRAN") } else if (!new_expectations && skip_on_empty) { skip_empty() }}, expectation = handle_expectation, packageNotFoundError = function(e) { if (on_cran()) { skip(paste0("{", e$package, "} is not installed.")) }}, snapshot_on_cran = function(cnd) { snapshot_skipped <<- TRUE invokeRestart("muffle_cran_snapshot")}, skip = handle_skip, warning = handle_warning, message = handle_message, error = handle_error, interrupt = handle_interrupt), error = handle_fatal), end_test = function() { })
40: test_code(code = exprs, env = env, reporter = get_reporter() %||% StopReporter$new())
41: source_file(path, env = env(env), desc = desc, shuffle = shuffle, error_call = error_call)
42: FUN(X[[i]], ...)
43: lapply(test_paths, test_one_file, env = env, desc = desc, shuffle = shuffle, error_call = error_call)
44: doTryCatch(return(expr), name, parentenv, handler)
45: tryCatchOne(expr, names, parentenv, handlers[[1L]])
46: tryCatchList(expr, classes, parentenv, handlers)
47: tryCatch(code, testthat_abort_reporter = function(cnd) { cat(conditionMessage(cnd), "\n") NULL})
48: with_reporter(reporters$multi, lapply(test_paths, test_one_file, env = env, desc = desc, shuffle = shuffle, error_call = error_call))
49: test_files_serial(test_dir = test_dir, test_package = test_package, test_paths = test_paths, load_helpers = load_helpers, reporter = reporter, env = env, stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning, desc = desc, load_package = load_package, shuffle = shuffle, error_call = error_call)
50: test_files(test_dir = path, test_paths = test_paths, test_package = package, reporter = reporter, load_helpers = load_helpers, env = env, stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning, load_package = load_package, parallel = parallel, shuffle = shuffle)
51: test_dir("testthat", package = package, reporter = reporter, ..., load_package = "installed")
52: test_check("missSBM")
An irrecoverable exception occurred. R is aborting now ...
Saving _problems/test-sbm-bernoulli-with-covariates-16.R
*** caught segfault ***
address 0x110, cause 'invalid permissions'
*** caught segfault ***
address 0x110, cause 'invalid permissions'
Traceback:
1: dispatcher(membership_name, membership_init$to_cc(), model_name, .self$network_to_cc(), TRUE)
2: FUN(X[[i]], ...)
3: lapply(X = S, FUN = FUN, ...)
4: doTryCatch(return(expr), name, parentenv, handler)
5: tryCatchOne(expr, names, parentenv, handlers[[1L]])
6: tryCatchList(expr, classes, parentenv, handlers)
7: tryCatch(expr, error = function(e) { call <- conditionCall(e) if (!is.null(call)) { if (identical(call[[1L]], quote(doTryCatch))) call <- sys.call(-4L) dcall <- deparse(call, nlines = 1L) prefix <- paste("Error in", dcall, ": ") LONG <- 75L sm <- strsplit(conditionMessage(e), "\n")[[1L]] w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w") if (is.na(w)) w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L], type = "b") if (w > LONG) prefix <- paste0(prefix, "\n ") } else prefix <- "Error : " msg <- paste0(prefix, conditionMessage(e), "\n") .Internal(seterrmessage(msg[1L])) if (!silent && isTRUE(getOption("show.error.messages"))) { cat(msg, file = outFile) .Internal(printDeferredWarnings()) } invisible(structure(msg, class = "try-error", condition = e))})
8: try(lapply(X = S, FUN = FUN, ...), silent = TRUE)
9: sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE))
10: FUN(X[[i]], ...)
11: lapply(seq_len(cores), inner.do)
12: parallel::mclapply(X, FUN, ..., mc.cores = mc.cores, mc.set.seed = FALSE, mc.silent = TRUE)
13: parallel_lapply(inits, .self$do_one_estim, mc.cores = ncores, verbose = (verbosity > 4))
14: .self$do_with_inits(inits, Q, reinitialization_effort)
15: .self$estim_ascend(reinitialization_effort, changing_effort)
16: private$BMobject$estimate()
17: mySBM_sbm$optimize(estimOptions = list(verbosity = 0, plot = FALSE))
18: eval(code, test_env)
19: eval(code, test_env)
20: withCallingHandlers({ eval(code, test_env) new_expectations <- the$test_expectations > starting_expectations if (snapshot_skipped) { skip("On CRAN") } else if (!new_expectations && skip_on_empty) { skip_empty() }}, expectation = handle_expectation, packageNotFoundError = function(e) { if (on_cran()) { skip(paste0("{", e$package, "} is not installed.")) }}, snapshot_on_cran = function(cnd) { snapshot_skipped <<- TRUE invokeRestart("muffle_cran_snapshot")}, skip = handle_skip, warning = handle_warning, message = handle_message, error = handle_error, interrupt = handle_interrupt)
21: doTryCatch(return(expr), name, parentenv, handler)
22: tryCatchOne(expr, names, parentenv, handlers[[1L]])
23: tryCatchList(expr, classes, parentenv, handlers)
24: tryCatch(withCallingHandlers({ eval(code, test_env) new_expectations <- the$test_expectations > starting_expectations if (snapshot_skipped) { skip("On CRAN") } else if (!new_expectations && skip_on_empty) { skip_empty() }}, expectation = handle_expectation, packageNotFoundError = function(e) { if (on_cran()) { skip(paste0("{", e$package, "} is not installed.")) }}, snapshot_on_cran = function(cnd) { snapshot_skipped <<- TRUE invokeRestart("muffle_cran_snapshot")}, skip = handle_skip, warning = handle_warning, message = handle_message, error = handle_error, interrupt = handle_interrupt), error = handle_fatal)
25: doWithOneRestart(return(expr), restart)
26: withOneRestart(expr, restarts[[1L]])
27: withRestarts(tryCatch(withCallingHandlers({ eval(code, test_env) new_expectations <- the$test_expectations > starting_expectations if (snapshot_skipped) { skip("On CRAN") } else if (!new_expectations && skip_on_empty) { skip_empty() }}, expectation = handle_expectation, packageNotFoundError = function(e) { if (on_cran()) { skip(paste0("{", e$package, "} is not installed.")) }}, snapshot_on_cran = function(cnd) { snapshot_skipped <<- TRUE invokeRestart("muffle_cran_snapshot")}, skip = handle_skip, warning = handle_warning, message = handle_message, error = handle_error, interrupt = handle_interrupt), error = handle_fatal), end_test = function() { })
28: test_code(code, parent.frame())
29: test_that("SimpleSBM_fit 'Bernoulli' model, directed, one covariate", { sampler_directed_cov$rNetwork(store = TRUE) mySBM_sbm <- sbm::SimpleSBM_fit$new(sampler_directed_cov$networkData, "bernoulli", TRUE, covarList = covarList_directed) mySBM_sbm$optimize(estimOptions = list(verbosity = 0, plot = FALSE)) mySBM_sbm$setModel(Q) net <- missSBM:::partlyObservedNetwork$new(sampler_directed_cov$networkData, covariates = covarList_directed) cls <- net$clustering(1:(2 * Q)) cl <- cls[[Q]] mySBM_missSBM <- missSBM:::SimpleSBM_fit_withCov$new(net, clusterInit = cl, covarList = covarList_directed) mySBM_missSBM$doVEM(trace = TRUE) expect_lt(rmse(mySBM_missSBM$connectParam$mean, mySBM_sbm$connectParam$mean), 0.1) expect_gt(ARI(mySBM_missSBM$memberships, mySBM_sbm$memberships), 0.8) expect_lt(rmse(mySBM_missSBM$loglik, mySBM_sbm$loglik), 0.05) expect_lt(rmse(mySBM_missSBM$connectParam$mean, sampler_directed_cov$connectParam$mean), 0.1) expect_gt(ARI(mySBM_missSBM$memberships, sampler_directed_cov$memberships), 0.85) })
30: eval(code, test_env)
31: eval(code, test_env)
32: withCallingHandlers({ eval(code, test_env) new_expectations <- the$test_expectations > starting_expectations if (snapshot_skipped) { skip("On CRAN") } else if (!new_expectations && skip_on_empty) { skip_empty() }}, expectation = handle_expectation, packageNotFoundError = function(e) { if (on_cran()) { skip(paste0("{", e$package, "} is not installed.")) }}, snapshot_on_cran = function(cnd) { snapshot_skipped <<- TRUE invokeRestart("muffle_cran_snapshot")}, skip = handle_skip, warning = handle_warning, message = handle_message, error = handle_error, interrupt = handle_interrupt)
33: 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)
Traceback:
47: 1: tryCatch(code, testthat_abort_reporter = function(cnd) { cat(conditionMessage(cnd), "\n")dispatcher(membership_name, membership_init$to_cc(), model_name, NULL .self$network_to_cc(), TRUE)})
2: 48: FUN(X[[i]], ...)with_reporter(reporters$multi, lapply(test_paths, test_one_file,
env = env, desc = desc, shuffle = shuffle, error_call = error_call)) 3:
lapply(X = S, FUN = FUN, ...)49:
test_files_serial(test_dir = test_dir, test_package = test_package, 4: test_paths = test_paths, load_helpers = load_helpers, reporter = reporter, doTryCatch(return(expr), name, parentenv, handler) env = env, stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning,
desc = desc, load_package = load_package, shuffle = shuffle, 5: error_call = error_call)tryCatchOne(expr, names, parentenv, handlers[[1L]])
6: 50: tryCatchList(expr, classes, parentenv, handlers)test_files(test_dir = path, test_paths = test_paths, test_package = package,
reporter = reporter, load_helpers = load_helpers, env = env, 7: stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning, load_package = load_package, parallel = parallel, shuffle = shuffle)
tryCatch(expr, error = function(e) {51: call <- conditionCall(e) if (!is.null(call)) {test_dir("testthat", package = package, reporter = reporter, if (identical(call[[1L]], quote(doTryCatch))) ..., load_package = "installed") call <- sys.call(-4L)
dcall <- deparse(call, nlines = 1L)52: test_check("missSBM") prefix <- paste("Error in", dcall, ": ")
LONG <- 75LAn irrecoverable exception occurred. R is aborting now ...
sm <- strsplit(conditionMessage(e), "\n")[[1L]] w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w") if (is.na(w)) w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L], type = "b") if (w > LONG) prefix <- paste0(prefix, "\n ") } else prefix <- "Error : " msg <- paste0(prefix, conditionMessage(e), "\n") .Internal(seterrmessage(msg[1L])) if (!silent && isTRUE(getOption("show.error.messages"))) { cat(msg, file = outFile) .Internal(printDeferredWarnings()) } invisible(structure(msg, class = "try-error", condition = e))})
8: try(lapply(X = S, FUN = FUN, ...), silent = TRUE)
9: sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE))
10: FUN(X[[i]], ...)
11: lapply(seq_len(cores), inner.do)
12: parallel::mclapply(X, FUN, ..., mc.cores = mc.cores, mc.set.seed = FALSE, mc.silent = TRUE)
13: parallel_lapply(inits, .self$do_one_estim, mc.cores = ncores, verbose = (verbosity > 4))
14: .self$do_with_inits(inits, Q, reinitialization_effort)
15: .self$estim_ascend(reinitialization_effort, changing_effort)
16: private$BMobject$estimate()
17: mySBM_sbm$optimize(estimOptions = list(verbosity = 0, plot = FALSE))
18: eval(code, test_env)
19: eval(code, test_env)
20: withCallingHandlers({ eval(code, test_env) new_expectations <- the$test_expectations > starting_expectations if (snapshot_skipped) { skip("On CRAN") } else if (!new_expectations && skip_on_empty) { skip_empty() }}, expectation = handle_expectation, packageNotFoundError = function(e) { if (on_cran()) { skip(paste0("{", e$package, "} is not installed.")) }}, snapshot_on_cran = function(cnd) { snapshot_skipped <<- TRUE invokeRestart("muffle_cran_snapshot")}, skip = handle_skip, warning = handle_warning, message = handle_message, error = handle_error, interrupt = handle_interrupt)
21: doTryCatch(return(expr), name, parentenv, handler)
22: tryCatchOne(expr, names, parentenv, handlers[[1L]])
23: tryCatchList(expr, classes, parentenv, handlers)
24: tryCatch(withCallingHandlers({ eval(code, test_env) new_expectations <- the$test_expectations > starting_expectations if (snapshot_skipped) { skip("On CRAN") } else if (!new_expectations && skip_on_empty) { skip_empty() }}, expectation = handle_expectation, packageNotFoundError = function(e) { if (on_cran()) { skip(paste0("{", e$package, "} is not installed.")) }}, snapshot_on_cran = function(cnd) { snapshot_skipped <<- TRUE invokeRestart("muffle_cran_snapshot")}, skip = handle_skip, warning = handle_warning, message = handle_message, error = handle_error, interrupt = handle_interrupt), error = handle_fatal)
25: doWithOneRestart(return(expr), restart)
26: withOneRestart(expr, restarts[[1L]])
27: withRestarts(tryCatch(withCallingHandlers({ eval(code, test_env) new_expectations <- the$test_expectations > starting_expectations if (snapshot_skipped) { skip("On CRAN") } else if (!new_expectations && skip_on_empty) { skip_empty() }}, expectation = handle_expectation, packageNotFoundError = function(e) { if (on_cran()) { skip(paste0("{", e$package, "} is not installed.")) }}, snapshot_on_cran = function(cnd) { snapshot_skipped <<- TRUE invokeRestart("muffle_cran_snapshot")}, skip = handle_skip, warning = handle_warning, message = handle_message, error = handle_error, interrupt = handle_interrupt), error = handle_fatal), end_test = function() { })
28: test_code(code, parent.frame())
29: test_that("SimpleSBM_fit 'Bernoulli' model, directed, one covariate", { sampler_directed_cov$rNetwork(store = TRUE) mySBM_sbm <- sbm::SimpleSBM_fit$new(sampler_directed_cov$networkData, "bernoulli", TRUE, covarList = covarList_directed) mySBM_sbm$optimize(estimOptions = list(verbosity = 0, plot = FALSE)) mySBM_sbm$setModel(Q) net <- missSBM:::partlyObservedNetwork$new(sampler_directed_cov$networkData, covariates = covarList_directed) cls <- net$clustering(1:(2 * Q)) cl <- cls[[Q]] mySBM_missSBM <- missSBM:::SimpleSBM_fit_withCov$new(net, clusterInit = cl, covarList = covarList_directed) mySBM_missSBM$doVEM(trace = TRUE) expect_lt(rmse(mySBM_missSBM$connectParam$mean, mySBM_sbm$connectParam$mean), 0.1) expect_gt(ARI(mySBM_missSBM$memberships, mySBM_sbm$memberships), 0.8) expect_lt(rmse(mySBM_missSBM$loglik, mySBM_sbm$loglik), 0.05) expect_lt(rmse(mySBM_missSBM$connectParam$mean, sampler_directed_cov$connectParam$mean), 0.1) expect_gt(ARI(mySBM_missSBM$memberships, sampler_directed_cov$memberships), 0.85) })
30: eval(code, test_env)
31: eval(code, test_env)
32: withCallingHandlers({ eval(code, test_env) new_expectations <- the$test_expectations > starting_expectations if (snapshot_skipped) { skip("On CRAN") } else if (!new_expectations && skip_on_empty) { skip_empty() }}, expectation = handle_expectation, packageNotFoundError = function(e) { if (on_cran()) { skip(paste0("{", e$package, "} is not installed.")) }}, snapshot_on_cran = function(cnd) { snapshot_skipped <<- TRUE invokeRestart("muffle_cran_snapshot")}, skip = handle_skip, warning = handle_warning, message = handle_message, error = handle_error, interrupt = handle_interrupt)
33: doTryCatch(return(expr), name, parentenv, handler)
34: tryCatchOne(expr, names, parentenv, handlers[[1L]])
35: tryCatchList(expr, classes, parentenv, handlers)
36: tryCatch(withCallingHandlers({ eval(code, test_env) new_expectations <- the$test_expectations > starting_expectations if (snapshot_skipped) { skip("On CRAN") } else if (!new_expectations && skip_on_empty) { skip_empty() }}, expectation = handle_expectation, packageNotFoundError = function(e) { if (on_cran()) { skip(paste0("{", e$package, "} is not installed.")) }}, snapshot_on_cran = function(cnd) { snapshot_skipped <<- TRUE invokeRestart("muffle_cran_snapshot")}, skip = handle_skip, warning = handle_warning, message = handle_message, error = handle_error, interrupt = handle_interrupt), error = handle_fatal)
37: doWithOneRestart(return(expr), restart)
38: withOneRestart(expr, restarts[[1L]])
39: withRestarts(tryCatch(withCallingHandlers({ eval(code, test_env) new_expectations <- the$test_expectations > starting_expectations if (snapshot_skipped) { skip("On CRAN") } else if (!new_expectations && skip_on_empty) { skip_empty() }}, expectation = handle_expectation, packageNotFoundError = function(e) { if (on_cran()) { skip(paste0("{", e$package, "} is not installed.")) }}, snapshot_on_cran = function(cnd) { snapshot_skipped <<- TRUE invokeRestart("muffle_cran_snapshot")}, skip = handle_skip, warning = handle_warning, message = handle_message, error = handle_error, interrupt = handle_interrupt), error = handle_fatal), end_test = function() { })
40: test_code(code = exprs, env = env, reporter = get_reporter() %||% StopReporter$new())
41: source_file(path, env = env(env), desc = desc, shuffle = shuffle, error_call = error_call)
42: FUN(X[[i]], ...)
43: lapply(test_paths, test_one_file, env = env, desc = desc, shuffle = shuffle, error_call = error_call)
44: doTryCatch(return(expr), name, parentenv, handler)
45: tryCatchOne(expr, names, parentenv, handlers[[1L]])
46: tryCatchList(expr, classes, parentenv, handlers)
47: tryCatch(code, testthat_abort_reporter = function(cnd) { cat(conditionMessage(cnd), "\n") NULL})
48: with_reporter(reporters$multi, lapply(test_paths, test_one_file, env = env, desc = desc, shuffle = shuffle, error_call = error_call))
49: test_files_serial(test_dir = test_dir, test_package = test_package, test_paths = test_paths, load_helpers = load_helpers, reporter = reporter, env = env, stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning, desc = desc, load_package = load_package, shuffle = shuffle, error_call = error_call)
50: test_files(test_dir = path, test_paths = test_paths, test_package = package, reporter = reporter, load_helpers = load_helpers, env = env, stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning, load_package = load_package, parallel = parallel, shuffle = shuffle)
51: test_dir("testthat", package = package, reporter = reporter, ..., load_package = "installed")
52: test_check("missSBM")
An irrecoverable exception occurred. R is aborting now ...
Saving _problems/test-sbm-bernoulli-with-covariates-46.R
*** caught segfault ***
address 0x110, cause 'invalid permissions'
*** caught segfault ***
address 0x110, cause 'invalid permissions'
Traceback:
1: dispatcher(membership_name, membership_init$to_cc(), model_name, .self$network_to_cc(), TRUE)
2: FUN(X[[i]], ...)
3: lapply(X = S, FUN = FUN, ...)
4: doTryCatch(return(expr), name, parentenv, handler)
5: tryCatchOne(expr, names, parentenv, handlers[[1L]])
6: tryCatchList(expr, classes, parentenv, handlers)
7: tryCatch(expr, error = function(e) { call <- conditionCall(e) if (!is.null(call)) { if (identical(call[[1L]], quote(doTryCatch))) call <- sys.call(-4L) dcall <- deparse(call, nlines = 1L) prefix <- paste("Error in", dcall, ": ") LONG <- 75L sm <- strsplit(conditionMessage(e), "\n")[[1L]] w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w") if (is.na(w)) w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L], type = "b") if (w > LONG) prefix <- paste0(prefix, "\n ") } else prefix <- "Error : " msg <- paste0(prefix, conditionMessage(e), "\n") .Internal(seterrmessage(msg[1L])) if (!silent && isTRUE(getOption("show.error.messages"))) { cat(msg, file = outFile) .Internal(printDeferredWarnings()) } invisible(structure(msg, class = "try-error", condition = e))})
8: try(lapply(X = S, FUN = FUN, ...), silent = TRUE)
9: sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE))
10: FUN(X[[i]], ...)
11: lapply(seq_len(cores), inner.do)
12: parallel::mclapply(X, FUN, ..., mc.cores = mc.cores, mc.set.seed = FALSE,
Traceback:
mc.silent = TRUE) 1:
dispatcher(membership_name, membership_init$to_cc(), model_name, 13: .self$network_to_cc(), TRUE)parallel_lapply(inits, .self$do_one_estim, mc.cores = ncores,
verbose = (verbosity > 4)) 2:
14: FUN(X[[i]], ...).self$do_with_inits(inits, Q, reinitialization_effort)
3: 15: lapply(X = S, FUN = FUN, ...).self$estim_ascend(reinitialization_effort, changing_effort)
4: doTryCatch(return(expr), name, parentenv, handler)
16: 5: private$BMobject$estimate()tryCatchOne(expr, names, parentenv, handlers[[1L]])
17: 6: mySBM_sbm$optimize(estimOptions = list(verbosity = 0, plot = FALSE))
tryCatchList(expr, classes, parentenv, handlers)18: eval(code, test_env)
7: 19: tryCatch(expr, error = function(e) {eval(code, test_env) call <- conditionCall(e)
if (!is.null(call)) { if (identical(call[[1L]], quote(doTryCatch))) 20: call <- sys.call(-4L) dcall <- deparse(call, nlines = 1L)withCallingHandlers({ prefix <- paste("Error in", dcall, ": ") LONG <- 75L sm <- strsplit(conditionMessage(e), "\n")[[1L]] eval(code, test_env) w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w") 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 : " } msg <- paste0(prefix, conditionMessage(e), "\n") .Internal(seterrmessage(msg[1L]))}, expectation = handle_expectation, packageNotFoundError = function(e) { if (!silent && isTRUE(getOption("show.error.messages"))) { if (on_cran()) { cat(msg, file = outFile) skip(paste0("{", e$package, "} is not installed.")) .Internal(printDeferredWarnings()) }}, snapshot_on_cran = function(cnd) { } snapshot_skipped <<- TRUE invisible(structure(msg, class = "try-error", condition = e)) invokeRestart("muffle_cran_snapshot")})
8: }, skip = handle_skip, warning = handle_warning, message = handle_message, try(lapply(X = S, FUN = FUN, ...), silent = TRUE)
error = handle_error, interrupt = handle_interrupt) 9: sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE))
21:
doTryCatch(return(expr), name, parentenv, handler)10:
FUN(X[[i]], ...)22:
tryCatchOne(expr, names, parentenv, handlers[[1L]])11:
lapply(seq_len(cores), inner.do)23:
tryCatchList(expr, classes, parentenv, handlers)
24: 12: tryCatch(withCallingHandlers({ eval(code, test_env)parallel::mclapply(X, FUN, ..., mc.cores = mc.cores, mc.set.seed = FALSE, new_expectations <- the$test_expectations > starting_expectations mc.silent = TRUE) if (snapshot_skipped) {
skip("On CRAN")13: }parallel_lapply(inits, .self$do_one_estim, mc.cores = ncores, verbose = (verbosity > 4)) else if (!new_expectations && skip_on_empty) {
skip_empty()14: }.self$do_with_inits(inits, Q, reinitialization_effort)}, expectation = handle_expectation, packageNotFoundError = function(e) {
if (on_cran()) {15: skip(paste0("{", e$package, "} is not installed.")).self$estim_ascend(reinitialization_effort, changing_effort) }
}, snapshot_on_cran = function(cnd) {16: private$BMobject$estimate()
17: snapshot_skipped <<- TRUEmySBM_sbm$optimize(estimOptions = list(verbosity = 0, plot = FALSE)) invokeRestart("muffle_cran_snapshot")
18: eval(code, test_env)}, skip = handle_skip, warning = handle_warning, message = handle_message,
error = handle_error, interrupt = handle_interrupt), error = handle_fatal)
19: 25: eval(code, test_env)doWithOneRestart(return(expr), restart)
20: 26: withOneRestart(expr, restarts[[1L]])withCallingHandlers({
eval(code, test_env)27: new_expectations <- the$test_expectations > starting_expectationswithRestarts(tryCatch(withCallingHandlers({ if (snapshot_skipped) { eval(code, test_env) new_expectations <- the$test_expectations > starting_expectations skip("On CRAN") 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) {}, snapshot_on_cran = function(cnd) { if (on_cran()) { snapshot_skipped <<- TRUE skip(paste0("{", e$package, "} is not installed.")) invokeRestart("muffle_cran_snapshot") }}, skip = handle_skip, warning = handle_warning, message = handle_message, }, snapshot_on_cran = function(cnd) { error = handle_error, interrupt = handle_interrupt) snapshot_skipped <<- TRUE
invokeRestart("muffle_cran_snapshot")21: doTryCatch(return(expr), name, parentenv, handler)}, skip = handle_skip, warning = handle_warning, message = handle_message,
error = handle_error, interrupt = handle_interrupt), error = handle_fatal), 22: tryCatchOne(expr, names, parentenv, handlers[[1L]]) end_test = function() {
})23:
tryCatchList(expr, classes, parentenv, handlers)28:
24: test_code(code, parent.frame())tryCatch(withCallingHandlers({
eval(code, test_env)29: new_expectations <- the$test_expectations > starting_expectationstest_that("SimpleSBM_fit 'Bernoulli' model, undirected, no covariate", if (snapshot_skipped) { { skip("On CRAN") sampler_undirected_nocov$rNetwork(store = TRUE) } else if (!new_expectations && skip_on_empty) { mySBM_sbm <- sbm::SimpleSBM_fit$new(sampler_undirected_nocov$networkData, skip_empty() "bernoulli", FALSE) mySBM_sbm$optimize(estimOptions = list(verbosity = 0, } plot = FALSE))}, expectation = handle_expectation, packageNotFoundError = function(e) { mySBM_sbm$setModel(3) if (on_cran()) { net <- missSBM:::partlyObservedNetwork$new(sampler_undirected_nocov$networkData) 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 invokeRestart("muffle_cran_snapshot") expect_lt(rmse(mySBM_missSBM$connectParam$mean, mySBM_sbm$connectParam$mean), }, skip = handle_skip, warning = handle_warning, message = handle_message, 0.05) expect_gt(ARI(mySBM_missSBM$memberships, mySBM_sbm$memberships), 0.95) error = handle_error, interrupt = handle_interrupt), error = handle_fatal) expect_lt(rmse(mySBM_missSBM$loglik, mySBM_sbm$loglik),
0.01)25: expect_lt(rmse(mySBM_missSBM$connectParam$mean, sampler_undirected_nocov$connectParam$mean), doWithOneRestart(return(expr), restart) 0.05)
26: expect_gt(ARI(mySBM_missSBM$memberships, sampler_undirected_nocov$memberships), withOneRestart(expr, restarts[[1L]]) 0.95)
27: })withRestarts(tryCatch(withCallingHandlers({ eval(code, test_env)
new_expectations <- the$test_expectations > starting_expectations30: if (snapshot_skipped) {eval(code, test_env) skip("On CRAN")
}31: else if (!new_expectations && skip_on_empty) {eval(code, test_env) skip_empty()
}}, expectation = handle_expectation, packageNotFoundError = function(e) {32: withCallingHandlers({ if (on_cran()) { eval(code, test_env) skip(paste0("{", e$package, "} is not installed.")) new_expectations <- the$test_expectations > starting_expectations } if (snapshot_skipped) {}, snapshot_on_cran = function(cnd) { skip("On CRAN") snapshot_skipped <<- TRUE } invokeRestart("muffle_cran_snapshot") else if (!new_expectations && skip_on_empty) {}, skip = handle_skip, warning = handle_warning, message = handle_message, skip_empty() error = handle_error, interrupt = handle_interrupt), error = handle_fatal), }}, expectation = handle_expectation, packageNotFoundError = function(e) { end_test = function() { if (on_cran()) { })
skip(paste0("{", e$package, "} is not installed.")) }28: test_code(code, parent.frame())}, snapshot_on_cran = function(cnd) {
snapshot_skipped <<- TRUE29: test_that("SimpleSBM_fit 'Bernoulli' model, undirected, no covariate", invokeRestart("muffle_cran_snapshot") {}, skip = handle_skip, warning = handle_warning, message = handle_message, sampler_undirected_nocov$rNetwork(store = TRUE) error = handle_error, interrupt = handle_interrupt) mySBM_sbm <- sbm::SimpleSBM_fit$new(sampler_undirected_nocov$networkData, "bernoulli", FALSE)
mySBM_sbm$optimize(estimOptions = list(verbosity = 0, 33: plot = FALSE))doTryCatch(return(expr), name, parentenv, handler) mySBM_sbm$setModel(3)
net <- missSBM:::partlyObservedNetwork$new(sampler_undirected_nocov$networkData)34: cl <- net$clustering(3)[[1]]tryCatchOne(expr, names, parentenv, handlers[[1L]]) mySBM_missSBM <- missSBM:::SimpleSBM_fit_noCov$new(net,
clusterInit = cl)35: mySBM_missSBM$doVEM()tryCatchList(expr, classes, parentenv, handlers) expect_lt(rmse(mySBM_missSBM$connectParam$mean, mySBM_sbm$connectParam$mean),
0.05) expect_gt(ARI(mySBM_missSBM$memberships, mySBM_sbm$memberships), 36: 0.95)tryCatch(withCallingHandlers({ expect_lt(rmse(mySBM_missSBM$loglik, mySBM_sbm$loglik), eval(code, test_env) 0.01) new_expectations <- the$test_expectations > starting_expectations expect_lt(rmse(mySBM_missSBM$connectParam$mean, sampler_undirected_nocov$connectParam$mean), if (snapshot_skipped) { 0.05) skip("On CRAN") expect_gt(ARI(mySBM_missSBM$memberships, sampler_undirected_nocov$memberships), } 0.95) else if (!new_expectations && skip_on_empty) { }) skip_empty()
}30: }, expectation = handle_expectation, packageNotFoundError = function(e) {eval(code, test_env) if (on_cran()) {
skip(paste0("{", e$package, "} is not installed.")) }31: }, snapshot_on_cran = function(cnd) { snapshot_skipped <<- TRUEeval(code, test_env) invokeRestart("muffle_cran_snapshot")
}, skip = handle_skip, warning = handle_warning, message = handle_message, 32: error = handle_error, interrupt = handle_interrupt), error = handle_fatal)withCallingHandlers({
eval(code, test_env)37: new_expectations <- the$test_expectations > starting_expectationsdoWithOneRestart(return(expr), restart) if (snapshot_skipped) {
skip("On CRAN")38: withOneRestart(expr, restarts[[1L]])
}39: else if (!new_expectations && skip_on_empty) {withRestarts(tryCatch(withCallingHandlers({ skip_empty() eval(code, test_env) } new_expectations <- the$test_expectations > starting_expectations}, expectation = handle_expectation, packageNotFoundError = function(e) { if (snapshot_skipped) { if (on_cran()) { skip("On CRAN") skip(paste0("{", e$package, "} is not installed.")) } } else if (!new_expectations && skip_on_empty) { 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) {
snapshot_skipped <<- TRUE33: invokeRestart("muffle_cran_snapshot")doTryCatch(return(expr), name, parentenv, handler)}, skip = handle_skip, warning = handle_warning, message = handle_message,
error = handle_error, interrupt = handle_interrupt), error = handle_fatal), 34: end_test = function() {tryCatchOne(expr, names, parentenv, handlers[[1L]]) })
40: 35: test_code(code = exprs, env = env, reporter = get_reporter() %||% tryCatchList(expr, classes, parentenv, handlers) StopReporter$new())
36: 41: tryCatch(withCallingHandlers({source_file(path, env = env(env), desc = desc, shuffle = shuffle, eval(code, test_env) error_call = error_call) new_expectations <- the$test_expectations > starting_expectations
if (snapshot_skipped) {42: skip("On CRAN")FUN(X[[i]], ...) }
else if (!new_expectations && skip_on_empty) {43: skip_empty()lapply(test_paths, test_one_file, env = env, desc = desc, shuffle = shuffle, error_call = error_call)
}44: }, expectation = handle_expectation, packageNotFoundError = function(e) {doTryCatch(return(expr), name, parentenv, handler) if (on_cran()) {
skip(paste0("{", e$package, "} is not installed."))45: }tryCatchOne(expr, names, parentenv, handlers[[1L]])}, snapshot_on_cran = function(cnd) {
snapshot_skipped <<- TRUE46: invokeRestart("muffle_cran_snapshot")tryCatchList(expr, classes, parentenv, handlers)}, skip = handle_skip, warning = handle_warning, message = handle_message,
error = handle_error, interrupt = handle_interrupt), error = handle_fatal)47:
tryCatch(code, testthat_abort_reporter = function(cnd) {37: cat(conditionMessage(cnd), "\n")doWithOneRestart(return(expr), restart) NULL})
38: 48: withOneRestart(expr, restarts[[1L]])with_reporter(reporters$multi, lapply(test_paths, test_one_file, env = env, desc = desc, shuffle = shuffle, error_call = error_call))
39: 49: withRestarts(tryCatch(withCallingHandlers({test_files_serial(test_dir = test_dir, test_package = test_package, eval(code, test_env) test_paths = test_paths, load_helpers = load_helpers, reporter = reporter, new_expectations <- the$test_expectations > starting_expectations env = env, stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning, if (snapshot_skipped) { desc = desc, load_package = load_package, shuffle = shuffle, skip("On CRAN") error_call = error_call) }
else if (!new_expectations && skip_on_empty) {50: skip_empty()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, }, expectation = handle_expectation, packageNotFoundError = function(e) { if (on_cran()) { load_package = load_package, parallel = parallel, shuffle = shuffle) skip(paste0("{", e$package, "} is not installed."))
}51: }, snapshot_on_cran = function(cnd) {test_dir("testthat", package = package, reporter = reporter, snapshot_skipped <<- TRUE ..., load_package = "installed") invokeRestart("muffle_cran_snapshot")
}, skip = handle_skip, warning = handle_warning, message = handle_message, 52: error = handle_error, interrupt = handle_interrupt), error = handle_fatal), test_check("missSBM") end_test = function() {
})An irrecoverable exception occurred. R is aborting now ...
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)
Traceback:
15: 1: .self$estim_ascend(reinitialization_effort, changing_effort)
dispatcher(membership_name, membership_init$to_cc(), model_name, 16: private$BMobject$estimate() .self$network_to_cc(), TRUE)
17: mySBM_sbm$optimize(estimOptions = list(verbosity = 0, plot = FALSE))
2: FUN(X[[i]], ...)18:
eval(code, test_env)
3: 19: lapply(X = S, FUN = FUN, ...)eval(code, test_env)
4:
20: doTryCatch(return(expr), name, parentenv, handler)withCallingHandlers({
5: eval(code, test_env)tryCatchOne(expr, names, parentenv, handlers[[1L]])
new_expectations <- the$test_expectations > starting_expectations 6: if (snapshot_skipped) {tryCatchList(expr, classes, parentenv, handlers) skip("On CRAN")
7: } else if (!new_expectations && skip_on_empty) {tryCatch(expr, error = function(e) { skip_empty() call <- conditionCall(e) } if (!is.null(call)) {}, expectation = handle_expectation, packageNotFoundError = function(e) { if (identical(call[[1L]], quote(doTryCatch))) call <- sys.call(-4L) if (on_cran()) { skip(paste0("{", e$package, "} is not installed.")) dcall <- deparse(call, nlines = 1L) } prefix <- paste("Error in", dcall, ": ")}, snapshot_on_cran = function(cnd) { LONG <- 75L snapshot_skipped <<- TRUE sm <- strsplit(conditionMessage(e), "\n")[[1L]] w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w") invokeRestart("muffle_cran_snapshot")}, skip = handle_skip, warning = handle_warning, message = handle_message, if (is.na(w)) error = handle_error, interrupt = handle_interrupt) w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L],
type = "b")21: if (w > LONG) doTryCatch(return(expr), name, parentenv, handler)
22: prefix <- paste0(prefix, "\n ")tryCatchOne(expr, names, parentenv, handlers[[1L]]) }
else prefix <- "Error : "23: msg <- paste0(prefix, conditionMessage(e), "\n")tryCatchList(expr, classes, parentenv, handlers) .Internal(seterrmessage(msg[1L]))
if (!silent && isTRUE(getOption("show.error.messages"))) {24: cat(msg, file = outFile)tryCatch(withCallingHandlers({ .Internal(printDeferredWarnings()) eval(code, test_env) } new_expectations <- the$test_expectations > starting_expectations invisible(structure(msg, class = "try-error", condition = e)) if (snapshot_skipped) {}) skip("On CRAN")
} 8: else if (!new_expectations && skip_on_empty) { skip_empty()try(lapply(X = S, FUN = FUN, ...), silent = TRUE) }
}, expectation = handle_expectation, packageNotFoundError = function(e) { 9: if (on_cran()) {sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE))
skip(paste0("{", e$package, "} is not installed.")) }10: }, snapshot_on_cran = function(cnd) {FUN(X[[i]], ...) snapshot_skipped <<- TRUE
invokeRestart("muffle_cran_snapshot")11: }, skip = handle_skip, warning = handle_warning, message = handle_message, lapply(seq_len(cores), inner.do) error = handle_error, interrupt = handle_interrupt), error = handle_fatal)
12: 25: parallel::mclapply(X, FUN, ..., mc.cores = mc.cores, mc.set.seed = FALSE, doWithOneRestart(return(expr), restart) mc.silent = TRUE)
26:
withOneRestart(expr, restarts[[1L]])13: parallel_lapply(inits, .self$do_one_estim, mc.cores = ncores,
verbose = (verbosity > 4))27:
withRestarts(tryCatch(withCallingHandlers({14: eval(code, test_env).self$do_with_inits(inits, Q, reinitialization_effort)
new_expectations <- the$test_expectations > starting_expectations15: if (snapshot_skipped) {.self$estim_ascend(reinitialization_effort, changing_effort) skip("On CRAN")
}16: private$BMobject$estimate() else if (!new_expectations && skip_on_empty) {
skip_empty()17: }mySBM_sbm$optimize(estimOptions = list(verbosity = 0, plot = FALSE))
}, expectation = handle_expectation, packageNotFoundError = function(e) { if (on_cran()) {18: skip(paste0("{", e$package, "} is not installed."))eval(code, test_env) }
19: }, snapshot_on_cran = function(cnd) {eval(code, test_env) snapshot_skipped <<- TRUE invokeRestart("muffle_cran_snapshot")
}, skip = handle_skip, warning = handle_warning, message = handle_message, 20: error = handle_error, interrupt = handle_interrupt), error = handle_fatal), end_test = function() {withCallingHandlers({ }) eval(code, test_env)
new_expectations <- the$test_expectations > starting_expectations28: test_code(code, parent.frame()) if (snapshot_skipped) {
skip("On CRAN") }29: test_that("SimpleSBM_fit 'Bernoulli' model, directed, no covariate", else if (!new_expectations && skip_on_empty) { { sampler_directed_nocov$rNetwork(store = TRUE) skip_empty() mySBM_sbm <- sbm::SimpleSBM_fit$new(sampler_directed_nocov$networkData, }}, expectation = handle_expectation, packageNotFoundError = function(e) { "bernoulli", TRUE) if (on_cran()) { mySBM_sbm$optimize(estimOptions = list(verbosity = 0, skip(paste0("{", e$package, "} is not installed.")) }}, snapshot_on_cran = function(cnd) { plot = FALSE)) snapshot_skipped <<- TRUE invokeRestart("muffle_cran_snapshot")}, skip = handle_skip, warning = handle_warning, message = handle_message, mySBM_sbm$setModel(3) error = handle_error, interrupt = handle_interrupt)
net <- missSBM:::partlyObservedNetwork$new(sampler_directed_nocov$networkData)21: cl <- net$clustering(3)[[1]]doTryCatch(return(expr), name, parentenv, handler) mySBM_missSBM <- missSBM:::SimpleSBM_fit_noCov$new(sampler_directed_nocov$networkData,
clusterInit = cl)22: tryCatchOne(expr, names, parentenv, handlers[[1L]]) mySBM_missSBM$doVEM()
expect_lt(rmse(mySBM_missSBM$connectParam$mean, mySBM_sbm$connectParam$mean), 0.1)23: expect_gt(ARI(mySBM_missSBM$memberships, mySBM_sbm$memberships), tryCatchList(expr, classes, parentenv, handlers) 0.95)
expect_lt(rmse(mySBM_missSBM$loglik, mySBM_sbm$loglik), 24: tryCatch(withCallingHandlers({ eval(code, test_env) new_expectations <- the$test_expectations > starting_expectations 0.01) expect_lt(rmse(mySBM_missSBM$connectParam$mean, sampler_directed_nocov$connectParam$mean), if (snapshot_skipped) { 0.1) skip("On CRAN") expect_lt(rmse(mySBM_missSBM$covarParam, sampler_directed_cov$covarParam), } 0.2) else if (!new_expectations && skip_on_empty) { expect_gt(ARI(mySBM_missSBM$memberships, sampler_directed_nocov$memberships), skip_empty() 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 <<- TRUE31: 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)32:
withCallingHandlers({25: eval(code, test_env)doWithOneRestart(return(expr), restart) new_expectations <- the$test_expectations > starting_expectations
if (snapshot_skipped) {26: skip("On CRAN")withOneRestart(expr, restarts[[1L]]) }
else if (!new_expectations && skip_on_empty) {27: skip_empty()withRestarts(tryCatch(withCallingHandlers({ eval(code, test_env) } new_expectations <- the$test_expectations > starting_expectations}, expectation = handle_expectation, packageNotFoundError = function(e) { if (snapshot_skipped) { if (on_cran()) { skip(paste0("{", e$package, "} is not installed.")) skip("On CRAN") } }}, snapshot_on_cran = function(cnd) { else if (!new_expectations && skip_on_empty) { skip_empty() }}, expectation = handle_expectation, packageNotFoundError = function(e) { snapshot_skipped <<- TRUE if (on_cran()) { invokeRestart("muffle_cran_snapshot") skip(paste0("{", e$package, "} is not installed."))}, skip = handle_skip, warning = handle_warning, message = handle_message, } error = handle_error, interrupt = handle_interrupt)}, snapshot_on_cran = function(cnd) { snapshot_skipped <<- TRUE
invokeRestart("muffle_cran_snapshot")33: }, skip = handle_skip, warning = handle_warning, message = handle_message, doTryCatch(return(expr), name, parentenv, handler) error = handle_error, interrupt = handle_interrupt), error = handle_fatal),
end_test = function() {34: tryCatchOne(expr, names, parentenv, handlers[[1L]]) })
35: 28: tryCatchList(expr, classes, parentenv, handlers)
test_code(code, parent.frame())36:
29: tryCatch(withCallingHandlers({ eval(code, test_env)test_that("SimpleSBM_fit 'Bernoulli' model, directed, no covariate", new_expectations <- the$test_expectations > starting_expectations { if (snapshot_skipped) { skip("On CRAN") sampler_directed_nocov$rNetwork(store = TRUE) } mySBM_sbm <- sbm::SimpleSBM_fit$new(sampler_directed_nocov$networkData, else if (!new_expectations && skip_on_empty) { "bernoulli", TRUE) mySBM_sbm$optimize(estimOptions = list(verbosity = 0, skip_empty() plot = FALSE)) } mySBM_sbm$setModel(3)}, expectation = handle_expectation, packageNotFoundError = function(e) { net <- missSBM:::partlyObservedNetwork$new(sampler_directed_nocov$networkData) 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) { expect_lt(rmse(mySBM_missSBM$connectParam$mean, mySBM_sbm$connectParam$mean), snapshot_skipped <<- TRUE 0.1) invokeRestart("muffle_cran_snapshot") expect_gt(ARI(mySBM_missSBM$memberships, mySBM_sbm$memberships), }, skip = handle_skip, warning = handle_warning, message = handle_message, 0.95) error = handle_error, interrupt = handle_interrupt), error = handle_fatal) expect_lt(rmse(mySBM_missSBM$loglik, mySBM_sbm$loglik),
0.01) expect_lt(rmse(mySBM_missSBM$connectParam$mean, sampler_directed_nocov$connectParam$mean), 37: 0.1) expect_lt(rmse(mySBM_missSBM$covarParam, sampler_directed_cov$covarParam), doWithOneRestart(return(expr), restart) 0.2)
expect_gt(ARI(mySBM_missSBM$memberships, sampler_directed_nocov$memberships), 38: withOneRestart(expr, restarts[[1L]]) 0.95)
})39:
withRestarts(tryCatch(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) 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}, 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), error = handle_fatal), } end_test = function() {}, snapshot_on_cran = function(cnd) { }) snapshot_skipped <<- TRUE
invokeRestart("muffle_cran_snapshot")40: }, skip = handle_skip, warning = handle_warning, message = handle_message, test_code(code = exprs, env = env, reporter = get_reporter() %||% error = handle_error, interrupt = handle_interrupt) StopReporter$new())
33: 41: doTryCatch(return(expr), name, parentenv, handler)source_file(path, env = env(env), desc = desc, shuffle = shuffle,
error_call = error_call)34:
tryCatchOne(expr, names, parentenv, handlers[[1L]])42:
FUN(X[[i]], ...)35:
tryCatchList(expr, classes, parentenv, handlers)43:
lapply(test_paths, test_one_file, env = env, desc = desc, shuffle = shuffle, 36: tryCatch(withCallingHandlers({ error_call = error_call) eval(code, test_env)
44: new_expectations <- the$test_expectations > starting_expectationsdoTryCatch(return(expr), name, parentenv, handler) if (snapshot_skipped) {
skip("On CRAN")45: }tryCatchOne(expr, names, parentenv, handlers[[1L]]) else if (!new_expectations && skip_on_empty) {
skip_empty()46: }tryCatchList(expr, classes, parentenv, handlers)
}, expectation = handle_expectation, packageNotFoundError = function(e) {47: if (on_cran()) {tryCatch(code, testthat_abort_reporter = function(cnd) { skip(paste0("{", e$package, "} is not installed.")) cat(conditionMessage(cnd), "\n") }}, snapshot_on_cran = function(cnd) { NULL 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)48:
with_reporter(reporters$multi, lapply(test_paths, test_one_file, 37: env = env, desc = desc, shuffle = shuffle, error_call = error_call))doWithOneRestart(return(expr), restart)
49: 38: test_files_serial(test_dir = test_dir, test_package = test_package, withOneRestart(expr, restarts[[1L]]) 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, 39: error_call = error_call)withRestarts(tryCatch(withCallingHandlers({
eval(code, test_env)50: new_expectations <- the$test_expectations > starting_expectationstest_files(test_dir = path, test_paths = test_paths, test_package = package, if (snapshot_skipped) { reporter = reporter, load_helpers = load_helpers, env = env, skip("On CRAN") stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning, } load_package = load_package, parallel = parallel, shuffle = shuffle) else if (!new_expectations && skip_on_empty) {
skip_empty()51: test_dir("testthat", package = package, reporter = reporter, } ..., load_package = "installed")
}, expectation = handle_expectation, packageNotFoundError = function(e) {52: if (on_cran()) {test_check("missSBM")
skip(paste0("{", e$package, "} is not installed."))An irrecoverable exception occurred. R is aborting now ...
}}, snapshot_on_cran = function(cnd) { snapshot_skipped <<- TRUE invokeRestart("muffle_cran_snapshot")}, skip = handle_skip, warning = handle_warning, message = handle_message, error = handle_error, interrupt = handle_interrupt), 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