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