Last updated on 2026-09-28 01:50:18 CEST.
| Flavor | Version | Tinstall | Tcheck | Ttotal | Status | Flags |
|---|---|---|---|---|---|---|
| r-devel-linux-x86_64-debian-clang | 1.1.0 | 89.36 | 356.78 | 446.14 | OK | |
| r-devel-linux-x86_64-debian-gcc | 1.1.0 | 57.18 | 245.32 | 302.50 | OK | |
| r-devel-linux-x86_64-fedora-clang | 1.1.0 | 59.00 | 243.15 | 302.15 | OK | |
| r-devel-linux-x86_64-fedora-gcc | 1.1.0 | 64.00 | 248.05 | 312.05 | OK | |
| r-devel-windows-x86_64 | 1.1.0 | 91.00 | 450.00 | 541.00 | OK | |
| r-patched-linux-x86_64 | 1.1.0 | 83.11 | 346.95 | 430.06 | OK | |
| r-release-linux-x86_64 | 1.1.0 | 80.87 | 341.38 | 422.25 | 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 | 98.00 | 361.00 | 459.00 | OK | |
| r-oldrel-macos-arm64 | 1.1.0 | 18.00 | 113.00 | 131.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 | 115.00 | 501.00 | 616.00 | OK |
Version: 1.1.0
Check: tests
Result: ERROR
Running ‘spelling.R’ [0s/0s]
Running ‘testthat.R’ [37s/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.")) }}, 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")
Traceback:
}, skip = handle_skip, warning = handle_warning, message = handle_message, 1: error = handle_error, interrupt = handle_interrupt), error = handle_fatal)
dispatcher(membership_name, membership_init$to_cc(), model_name, 37: .self$network_to_cc(), TRUE)doWithOneRestart(return(expr), restart)
2: 38: FUN(X[[i]], ...)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: else if (!new_expectations && skip_on_empty) {tryCatchOne(expr, names, parentenv, handlers[[1L]]) skip_empty()
} 6: }, expectation = handle_expectation, packageNotFoundError = function(e) {tryCatchList(expr, classes, parentenv, handlers) if (on_cran()) {
skip(paste0("{", e$package, "} is not installed.")) 7: }}, snapshot_on_cran = function(cnd) {tryCatch(expr, error = function(e) { snapshot_skipped <<- TRUE call <- conditionCall(e) invokeRestart("muffle_cran_snapshot") if (!is.null(call)) {}, skip = handle_skip, warning = handle_warning, message = handle_message, if (identical(call[[1L]], quote(doTryCatch))) error = handle_error, interrupt = handle_interrupt), error = handle_fatal), call <- sys.call(-4L) end_test = function() { dcall <- deparse(call, nlines = 1L) }) prefix <- paste("Error in", dcall, ": ")
LONG <- 75L sm <- strsplit(conditionMessage(e), "\n")[[1L]]40: w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w")test_code(code = exprs, env = env, reporter = get_reporter() %||% if (is.na(w)) StopReporter$new()) w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L],
type = "b")41: if (w > LONG) prefix <- paste0(prefix, "\n ")source_file(path, env = env(env), desc = desc, shuffle = shuffle, } error_call = error_call) else prefix <- "Error : "
msg <- paste0(prefix, conditionMessage(e), "\n")42: .Internal(seterrmessage(msg[1L]))FUN(X[[i]], ...) if (!silent && isTRUE(getOption("show.error.messages"))) {
cat(msg, file = outFile)43: .Internal(printDeferredWarnings())lapply(test_paths, test_one_file, env = env, desc = desc, shuffle = shuffle, } 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")
NULL11: lapply(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: private$BMobject$estimate() stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning,
load_package = load_package, parallel = parallel, shuffle = shuffle)17:
mySBM_sbm$optimize(estimOptions = list(verbosity = 0, plot = FALSE))51:
test_dir("testthat", package = package, reporter = reporter, 18: ..., load_package = "installed")eval(code, test_env)
52: 19: test_check("missSBM")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 ")
Traceback:
} 1: else prefix <- "Error : "dispatcher(membership_name, membership_init$to_cc(), model_name, msg <- paste0(prefix, conditionMessage(e), "\n") .self$network_to_cc(), TRUE) .Internal(seterrmessage(msg[1L]))
if (!silent && isTRUE(getOption("show.error.messages"))) { 2: cat(msg, file = outFile)FUN(X[[i]], ...)
.Internal(printDeferredWarnings()) 3: }lapply(X = S, FUN = FUN, ...)
invisible(structure(msg, class = "try-error", condition = e)) 4: })doTryCatch(return(expr), name, parentenv, handler)
8: 5: try(lapply(X = S, FUN = FUN, ...), silent = TRUE)
tryCatchOne(expr, names, parentenv, handlers[[1L]]) 9:
sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE)) 6:
tryCatchList(expr, classes, parentenv, handlers)10:
FUN(X[[i]], ...) 7:
tryCatch(expr, error = function(e) {11: call <- conditionCall(e)lapply(seq_len(cores), inner.do) if (!is.null(call)) {
if (identical(call[[1L]], quote(doTryCatch))) 12: call <- sys.call(-4L)parallel::mclapply(X, FUN, ..., mc.cores = mc.cores, mc.set.seed = FALSE, dcall <- deparse(call, nlines = 1L) mc.silent = TRUE) prefix <- paste("Error in", dcall, ": ") LONG <- 75L
sm <- strsplit(conditionMessage(e), "\n")[[1L]] w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w")13: if (is.na(w)) parallel_lapply(inits, .self$do_one_estim, mc.cores = ncores, w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L], verbose = (verbosity > 4))
type = "b")14: .self$do_with_inits(inits, Q, reinitialization_effort) if (w > LONG)
prefix <- paste0(prefix, "\n ")15: .self$estim_ascend(reinitialization_effort, changing_effort) }
16: private$BMobject$estimate() else prefix <- "Error : "
msg <- paste0(prefix, conditionMessage(e), "\n")17: .Internal(seterrmessage(msg[1L]))mySBM_sbm$optimize(estimOptions = list(verbosity = 0, plot = FALSE)) if (!silent && isTRUE(getOption("show.error.messages"))) {
cat(msg, file = outFile) .Internal(printDeferredWarnings())18: }eval(code, test_env) invisible(structure(msg, class = "try-error", condition = e))
})19:
eval(code, test_env) 8:
try(lapply(X = S, FUN = FUN, ...), silent = TRUE)20:
9: withCallingHandlers({ eval(code, test_env)sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE)) new_expectations <- the$test_expectations > starting_expectations
if (snapshot_skipped) {10: skip("On CRAN")FUN(X[[i]], ...)
}11: else if (!new_expectations && skip_on_empty) { skip_empty()lapply(seq_len(cores), inner.do) }
}, expectation = handle_expectation, packageNotFoundError = function(e) {12: if (on_cran()) {parallel::mclapply(X, FUN, ..., mc.cores = mc.cores, mc.set.seed = FALSE, skip(paste0("{", e$package, "} is not installed.")) } mc.silent = TRUE)}, snapshot_on_cran = function(cnd) {
snapshot_skipped <<- TRUE13: invokeRestart("muffle_cran_snapshot")parallel_lapply(inits, .self$do_one_estim, mc.cores = ncores, }, skip = handle_skip, warning = handle_warning, message = handle_message, error = handle_error, interrupt = handle_interrupt) verbose = (verbosity > 4))
21: doTryCatch(return(expr), name, parentenv, handler)14:
.self$do_with_inits(inits, Q, reinitialization_effort)22:
tryCatchOne(expr, names, parentenv, handlers[[1L]])15:
.self$estim_ascend(reinitialization_effort, changing_effort)23:
tryCatchList(expr, classes, parentenv, handlers)16:
24: private$BMobject$estimate()tryCatch(withCallingHandlers({
eval(code, test_env)17: new_expectations <- the$test_expectations > starting_expectationsmySBM_sbm$optimize(estimOptions = list(verbosity = 0, plot = FALSE)) if (snapshot_skipped) {
skip("On CRAN")18: }eval(code, test_env) else if (!new_expectations && skip_on_empty) {
skip_empty()19: }eval(code, test_env)}, expectation = handle_expectation, packageNotFoundError = function(e) {
if (on_cran()) { skip(paste0("{", e$package, "} is not installed."))20: }withCallingHandlers({}, snapshot_on_cran = function(cnd) { eval(code, test_env) snapshot_skipped <<- TRUE new_expectations <- the$test_expectations > starting_expectations invokeRestart("muffle_cran_snapshot")}, skip = handle_skip, warning = handle_warning, message = handle_message, if (snapshot_skipped) { error = handle_error, interrupt = handle_interrupt), error = handle_fatal) skip("On CRAN")
}25: else if (!new_expectations && skip_on_empty) { skip_empty()doWithOneRestart(return(expr), restart) }
26: withOneRestart(expr, restarts[[1L]])}, expectation = handle_expectation, packageNotFoundError = function(e) {
27: if (on_cran()) {withRestarts(tryCatch(withCallingHandlers({ skip(paste0("{", e$package, "} is not installed.")) eval(code, test_env) } new_expectations <- the$test_expectations > starting_expectations}, snapshot_on_cran = function(cnd) { if (snapshot_skipped) { snapshot_skipped <<- TRUE skip("On CRAN") } invokeRestart("muffle_cran_snapshot") else if (!new_expectations && skip_on_empty) {}, skip = handle_skip, warning = handle_warning, message = handle_message, skip_empty() error = handle_error, interrupt = handle_interrupt) }
}, expectation = handle_expectation, packageNotFoundError = function(e) {21: if (on_cran()) {doTryCatch(return(expr), name, parentenv, handler) skip(paste0("{", e$package, "} is not installed.")) }
22: tryCatchOne(expr, names, parentenv, handlers[[1L]])}, snapshot_on_cran = function(cnd) {
snapshot_skipped <<- TRUE23: tryCatchList(expr, classes, parentenv, handlers) invokeRestart("muffle_cran_snapshot")
24: }, skip = handle_skip, warning = handle_warning, message = handle_message, tryCatch(withCallingHandlers({ eval(code, test_env) error = handle_error, interrupt = handle_interrupt), error = handle_fatal), end_test = function() { }) new_expectations <- the$test_expectations > starting_expectations
if (snapshot_skipped) {28: skip("On CRAN")test_code(code, parent.frame())
}29: else if (!new_expectations && skip_on_empty) {test_that("SimpleSBM_fit 'Bernoulli' model, directed, one covariate", skip_empty() { }}, expectation = handle_expectation, packageNotFoundError = function(e) { sampler_directed_cov$rNetwork(store = TRUE) if (on_cran()) { mySBM_sbm <- sbm::SimpleSBM_fit$new(sampler_directed_cov$networkData, skip(paste0("{", e$package, "} is not installed.")) "bernoulli", TRUE, covarList = covarList_directed) } mySBM_sbm$optimize(estimOptions = list(verbosity = 0, plot = FALSE))}, snapshot_on_cran = function(cnd) { mySBM_sbm$setModel(Q) snapshot_skipped <<- TRUE net <- missSBM:::partlyObservedNetwork$new(sampler_directed_cov$networkData, invokeRestart("muffle_cran_snapshot") covariates = covarList_directed)}, skip = handle_skip, warning = handle_warning, message = handle_message, cls <- net$clustering(1:(2 * Q)) error = handle_error, interrupt = handle_interrupt), error = handle_fatal) cl <- cls[[Q]]
mySBM_missSBM <- missSBM:::SimpleSBM_fit_withCov$new(net, 25: clusterInit = cl, covarList = covarList_directed)doWithOneRestart(return(expr), restart) mySBM_missSBM$doVEM(trace = TRUE)
expect_lt(rmse(mySBM_missSBM$connectParam$mean, mySBM_sbm$connectParam$mean), 26: 0.1)withOneRestart(expr, restarts[[1L]]) expect_gt(ARI(mySBM_missSBM$memberships, mySBM_sbm$memberships),
0.8)27: expect_lt(rmse(mySBM_missSBM$loglik, mySBM_sbm$loglik), withRestarts(tryCatch(withCallingHandlers({ 0.05) eval(code, test_env) expect_lt(rmse(mySBM_missSBM$connectParam$mean, sampler_directed_cov$connectParam$mean), new_expectations <- the$test_expectations > starting_expectations 0.1) if (snapshot_skipped) { expect_gt(ARI(mySBM_missSBM$memberships, sampler_directed_cov$memberships), skip("On CRAN") 0.85) } }) else if (!new_expectations && skip_on_empty) {
30: skip_empty()eval(code, test_env) }
}, expectation = handle_expectation, packageNotFoundError = function(e) {31: if (on_cran()) {eval(code, test_env) skip(paste0("{", e$package, "} is not installed."))
}}, snapshot_on_cran = function(cnd) {32: snapshot_skipped <<- TRUEwithCallingHandlers({ invokeRestart("muffle_cran_snapshot") eval(code, test_env)}, skip = handle_skip, warning = handle_warning, message = handle_message, new_expectations <- the$test_expectations > starting_expectations error = handle_error, interrupt = handle_interrupt), error = handle_fatal), if (snapshot_skipped) { end_test = function() { skip("On CRAN") }) }
else if (!new_expectations && skip_on_empty) {28: skip_empty() }test_code(code, parent.frame())
}, expectation = handle_expectation, packageNotFoundError = function(e) { if (on_cran()) {29: skip(paste0("{", e$package, "} is not installed."))test_that("SimpleSBM_fit 'Bernoulli' model, directed, one covariate", } {}, snapshot_on_cran = function(cnd) { sampler_directed_cov$rNetwork(store = TRUE) mySBM_sbm <- sbm::SimpleSBM_fit$new(sampler_directed_cov$networkData, snapshot_skipped <<- TRUE "bernoulli", TRUE, covarList = covarList_directed) invokeRestart("muffle_cran_snapshot") mySBM_sbm$optimize(estimOptions = list(verbosity = 0, }, skip = handle_skip, warning = handle_warning, message = handle_message, plot = FALSE)) error = handle_error, interrupt = handle_interrupt) mySBM_sbm$setModel(Q)
net <- missSBM:::partlyObservedNetwork$new(sampler_directed_cov$networkData, 33: covariates = covarList_directed)doTryCatch(return(expr), name, parentenv, handler) cls <- net$clustering(1:(2 * Q))
cl <- cls[[Q]]34: mySBM_missSBM <- missSBM:::SimpleSBM_fit_withCov$new(net, tryCatchOne(expr, names, parentenv, handlers[[1L]]) clusterInit = cl, covarList = covarList_directed)
mySBM_missSBM$doVEM(trace = TRUE)35: expect_lt(rmse(mySBM_missSBM$connectParam$mean, mySBM_sbm$connectParam$mean), tryCatchList(expr, classes, parentenv, handlers) 0.1)
expect_gt(ARI(mySBM_missSBM$memberships, mySBM_sbm$memberships), 36: tryCatch(withCallingHandlers({ eval(code, test_env) 0.8) new_expectations <- the$test_expectations > starting_expectations expect_lt(rmse(mySBM_missSBM$loglik, mySBM_sbm$loglik), if (snapshot_skipped) { 0.05) skip("On CRAN") expect_lt(rmse(mySBM_missSBM$connectParam$mean, sampler_directed_cov$connectParam$mean), } 0.1) else if (!new_expectations && skip_on_empty) { expect_gt(ARI(mySBM_missSBM$memberships, sampler_directed_cov$memberships), 0.85) skip_empty() }) }
}, expectation = handle_expectation, packageNotFoundError = function(e) {30: if (on_cran()) {eval(code, test_env)
skip(paste0("{", e$package, "} is not installed."))31: }}, snapshot_on_cran = function(cnd) {eval(code, test_env) snapshot_skipped <<- TRUE
invokeRestart("muffle_cran_snapshot")32: }, skip = handle_skip, warning = handle_warning, message = handle_message, withCallingHandlers({ error = handle_error, interrupt = handle_interrupt), error = handle_fatal) eval(code, test_env)
new_expectations <- the$test_expectations > starting_expectations37: doWithOneRestart(return(expr), restart) if (snapshot_skipped) {
skip("On CRAN")38: }withOneRestart(expr, restarts[[1L]]) else if (!new_expectations && skip_on_empty) {
39: skip_empty()withRestarts(tryCatch(withCallingHandlers({ } eval(code, test_env)}, expectation = handle_expectation, packageNotFoundError = function(e) { new_expectations <- the$test_expectations > starting_expectations if (on_cran()) { if (snapshot_skipped) { skip(paste0("{", e$package, "} is not installed.")) skip("On CRAN") } }}, snapshot_on_cran = function(cnd) { else if (!new_expectations && skip_on_empty) { skip_empty() 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) }
33: }, snapshot_on_cran = function(cnd) { snapshot_skipped <<- TRUEdoTryCatch(return(expr), name, parentenv, handler) invokeRestart("muffle_cran_snapshot")
}, skip = handle_skip, warning = handle_warning, message = handle_message, 34: error = handle_error, interrupt = handle_interrupt), error = handle_fatal), end_test = function() {tryCatchOne(expr, names, parentenv, handlers[[1L]])
})35: tryCatchList(expr, classes, parentenv, handlers)
40: 36: test_code(code = exprs, env = env, reporter = get_reporter() %||% tryCatch(withCallingHandlers({ StopReporter$new()) eval(code, test_env)
new_expectations <- the$test_expectations > starting_expectations41: source_file(path, env = env(env), desc = desc, shuffle = shuffle, if (snapshot_skipped) { error_call = error_call) skip("On CRAN")
}42: else if (!new_expectations && skip_on_empty) {FUN(X[[i]], ...) skip_empty() }
}, expectation = handle_expectation, packageNotFoundError = function(e) {43: lapply(test_paths, test_one_file, env = env, desc = desc, shuffle = shuffle, if (on_cran()) { error_call = error_call) skip(paste0("{", e$package, "} is not installed."))
}}, snapshot_on_cran = function(cnd) { snapshot_skipped <<- TRUE44: 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)
37: doWithOneRestart(return(expr), restart)
45: 38: tryCatchOne(expr, names, parentenv, handlers[[1L]])withOneRestart(expr, restarts[[1L]])
46:
tryCatchList(expr, classes, parentenv, handlers)39:
withRestarts(tryCatch(withCallingHandlers({47: tryCatch(code, testthat_abort_reporter = function(cnd) { eval(code, test_env) cat(conditionMessage(cnd), "\n") new_expectations <- the$test_expectations > starting_expectations if (snapshot_skipped) { NULL skip("On CRAN") }}) else if (!new_expectations && skip_on_empty) { skip_empty()
}}, expectation = handle_expectation, packageNotFoundError = function(e) {48: with_reporter(reporters$multi, lapply(test_paths, test_one_file, if (on_cran()) { env = env, desc = desc, shuffle = shuffle, error_call = error_call)) skip(paste0("{", e$package, "} is not installed."))
49: }test_files_serial(test_dir = test_dir, test_package = test_package, }, snapshot_on_cran = function(cnd) { snapshot_skipped <<- TRUE test_paths = test_paths, load_helpers = load_helpers, reporter = reporter, invokeRestart("muffle_cran_snapshot")}, skip = handle_skip, warning = handle_warning, message = handle_message, env = env, stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning, error = handle_error, interrupt = handle_interrupt), error = handle_fatal), desc = desc, load_package = load_package, shuffle = shuffle, end_test = function() { }) error_call = error_call)
40: test_code(code = exprs, env = env, reporter = get_reporter() %||%
StopReporter$new())
50: 41: test_files(test_dir = path, test_paths = test_paths, test_package = package, source_file(path, env = env(env), desc = desc, shuffle = shuffle, reporter = reporter, load_helpers = load_helpers, env = env, error_call = error_call) stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning,
load_package = load_package, parallel = parallel, shuffle = shuffle)42:
FUN(X[[i]], ...)51:
test_dir("testthat", package = package, reporter = reporter, ..., load_package = "installed")
43: lapply(test_paths, test_one_file, env = env, desc = desc, shuffle = shuffle, 52: error_call = error_call)test_check("missSBM")
44: An irrecoverable exception occurred. R is aborting now ...
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) { snapshot_skipped <<- TRUE invokeRestart("muffle_cran_snapshot")}, skip = handle_skip, warning = handle_warning, message = handle_message, error = handle_error, interrupt = handle_interrupt)
21: doTryCatch(return(expr), name, parentenv, handler)
22: tryCatchOne(expr, names, parentenv, handlers[[1L]])
23: tryCatchList(expr, classes, parentenv, handlers)
24: tryCatch(withCallingHandlers({ eval(code, test_env) new_expectations <- the$test_expectations > starting_expectations if (snapshot_skipped) { skip("On CRAN") } else if (!new_expectations && skip_on_empty) { skip_empty() }}, expectation = handle_expectation, packageNotFoundError = function(e) { if (on_cran()) { skip(paste0("{", e$package, "} is not installed.")) }}, snapshot_on_cran = function(cnd) { snapshot_skipped <<- TRUE invokeRestart("muffle_cran_snapshot")}, skip = handle_skip, warning = handle_warning, message = handle_message, error = handle_error, interrupt = handle_interrupt), error = handle_fatal)
25: doWithOneRestart(return(expr), restart)
26: withOneRestart(expr, restarts[[1L]])
27: withRestarts(tryCatch(withCallingHandlers({ eval(code, test_env) new_expectations <- the$test_expectations > starting_expectations if (snapshot_skipped) { skip("On CRAN") } else if (!new_expectations && skip_on_empty) { skip_empty() }
Traceback:
}, expectation = handle_expectation, packageNotFoundError = function(e) { 1: if (on_cran()) {dispatcher(membership_name, membership_init$to_cc(), model_name, skip(paste0("{", e$package, "} is not installed.")) } .self$network_to_cc(), TRUE)}, snapshot_on_cran = function(cnd) { snapshot_skipped <<- TRUE
invokeRestart("muffle_cran_snapshot") 2: }, skip = handle_skip, warning = handle_warning, message = handle_message, FUN(X[[i]], ...) error = handle_error, interrupt = handle_interrupt), error = handle_fatal), end_test = function() {
}) 3:
lapply(X = S, FUN = FUN, ...)28:
test_code(code, parent.frame()) 4:
doTryCatch(return(expr), name, parentenv, handler)29:
test_that("SimpleSBM_fit 'Bernoulli' model, undirected, no covariate", 5: {tryCatchOne(expr, names, parentenv, handlers[[1L]]) sampler_undirected_nocov$rNetwork(store = TRUE)
mySBM_sbm <- sbm::SimpleSBM_fit$new(sampler_undirected_nocov$networkData, 6: "bernoulli", FALSE)tryCatchList(expr, classes, parentenv, handlers) mySBM_sbm$optimize(estimOptions = list(verbosity = 0,
plot = FALSE)) mySBM_sbm$setModel(3) 7: net <- missSBM:::partlyObservedNetwork$new(sampler_undirected_nocov$networkData) cl <- net$clustering(3)[[1]]tryCatch(expr, error = function(e) { mySBM_missSBM <- missSBM:::SimpleSBM_fit_noCov$new(net, call <- conditionCall(e) clusterInit = cl) if (!is.null(call)) { mySBM_missSBM$doVEM() expect_lt(rmse(mySBM_missSBM$connectParam$mean, mySBM_sbm$connectParam$mean), if (identical(call[[1L]], quote(doTryCatch))) 0.05) expect_gt(ARI(mySBM_missSBM$memberships, mySBM_sbm$memberships), call <- sys.call(-4L) 0.95) dcall <- deparse(call, nlines = 1L) expect_lt(rmse(mySBM_missSBM$loglik, mySBM_sbm$loglik), prefix <- paste("Error in", dcall, ": ") 0.01) LONG <- 75L expect_lt(rmse(mySBM_missSBM$connectParam$mean, sampler_undirected_nocov$connectParam$mean), sm <- strsplit(conditionMessage(e), "\n")[[1L]] 0.05) expect_gt(ARI(mySBM_missSBM$memberships, sampler_undirected_nocov$memberships), 0.95) }) w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w")
30: eval(code, test_env) if (is.na(w)) w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L],
type = "b")31: if (w > LONG) eval(code, test_env) prefix <- paste0(prefix, "\n ")
32: }withCallingHandlers({ else prefix <- "Error : " eval(code, test_env) msg <- paste0(prefix, conditionMessage(e), "\n") .Internal(seterrmessage(msg[1L])) 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()) { 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)11:
lapply(seq_len(cores), inner.do)33:
doTryCatch(return(expr), name, parentenv, handler)12:
parallel::mclapply(X, FUN, ..., mc.cores = mc.cores, mc.set.seed = FALSE, 34: mc.silent = TRUE)tryCatchOne(expr, names, parentenv, handlers[[1L]])
13:
parallel_lapply(inits, .self$do_one_estim, mc.cores = ncores, verbose = (verbosity > 4))35:
tryCatchList(expr, classes, parentenv, handlers)
14: 36: .self$do_with_inits(inits, Q, reinitialization_effort)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: }private$BMobject$estimate()
else if (!new_expectations && skip_on_empty) {17: skip_empty()mySBM_sbm$optimize(estimOptions = list(verbosity = 0, plot = FALSE)) }
}, expectation = handle_expectation, packageNotFoundError = function(e) {18: if (on_cran()) {eval(code, test_env) skip(paste0("{", e$package, "} is not installed."))
}19: }, snapshot_on_cran = function(cnd) {eval(code, test_env)
snapshot_skipped <<- TRUE20: invokeRestart("muffle_cran_snapshot")}, skip = handle_skip, warning = handle_warning, message = handle_message, withCallingHandlers({ error = handle_error, interrupt = handle_interrupt), error = handle_fatal) 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]]) else if (!new_expectations && skip_on_empty) {
skip_empty()39: }withRestarts(tryCatch(withCallingHandlers({}, expectation = handle_expectation, packageNotFoundError = function(e) { if (on_cran()) { eval(code, test_env) skip(paste0("{", e$package, "} is not installed.")) } new_expectations <- the$test_expectations > starting_expectations}, snapshot_on_cran = function(cnd) { 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) skip_empty()
}21: }, expectation = handle_expectation, packageNotFoundError = function(e) {doTryCatch(return(expr), name, parentenv, handler) if (on_cran()) {
skip(paste0("{", e$package, "} is not installed."))22: }tryCatchOne(expr, names, parentenv, handlers[[1L]])}, snapshot_on_cran = function(cnd) {
snapshot_skipped <<- TRUE23: 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), 24: end_test = function() {tryCatch(withCallingHandlers({ }) eval(code, test_env)
new_expectations <- the$test_expectations > starting_expectations40: if (snapshot_skipped) {test_code(code = exprs, env = env, reporter = get_reporter() %||% StopReporter$new()) skip("On CRAN")
}41: else if (!new_expectations && skip_on_empty) {source_file(path, env = env(env), desc = desc, shuffle = shuffle, skip_empty() } error_call = error_call)}, expectation = handle_expectation, packageNotFoundError = function(e) {
if (on_cran()) {42: skip(paste0("{", e$package, "} is not installed."))FUN(X[[i]], ...) }
}, snapshot_on_cran = function(cnd) {43: snapshot_skipped <<- TRUElapply(test_paths, test_one_file, env = env, desc = desc, shuffle = shuffle, invokeRestart("muffle_cran_snapshot") error_call = error_call)}, skip = handle_skip, warning = handle_warning, message = handle_message,
error = handle_error, interrupt = handle_interrupt), error = handle_fatal)44:
doTryCatch(return(expr), name, parentenv, handler)25:
doWithOneRestart(return(expr), restart)45:
tryCatchOne(expr, names, parentenv, handlers[[1L]])26:
withOneRestart(expr, restarts[[1L]])46:
tryCatchList(expr, classes, parentenv, handlers)
27: 47: tryCatch(code, testthat_abort_reporter = function(cnd) {withRestarts(tryCatch(withCallingHandlers({ cat(conditionMessage(cnd), "\n") 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, test_paths = test_paths, load_helpers = load_helpers, reporter = reporter, if (on_cran()) { env = env, stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning, skip(paste0("{", e$package, "} is not installed.")) } desc = desc, load_package = load_package, shuffle = shuffle, error_call = error_call)}, snapshot_on_cran = function(cnd) {
snapshot_skipped <<- TRUE50: invokeRestart("muffle_cran_snapshot")test_files(test_dir = path, test_paths = test_paths, test_package = package, }, skip = handle_skip, warning = handle_warning, message = handle_message, reporter = reporter, load_helpers = load_helpers, env = env, error = handle_error, interrupt = handle_interrupt), error = handle_fatal), stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning, end_test = function() { load_package = load_package, parallel = parallel, shuffle = shuffle) })
51: test_dir("testthat", package = package, reporter = reporter, 28: ..., load_package = "installed")test_code(code, parent.frame())
52: 29: test_check("missSBM")test_that("SimpleSBM_fit 'Bernoulli' model, undirected, no covariate", {
sampler_undirected_nocov$rNetwork(store = TRUE)An irrecoverable exception occurred. R is aborting now ...
mySBM_sbm <- sbm::SimpleSBM_fit$new(sampler_undirected_nocov$networkData, "bernoulli", FALSE) mySBM_sbm$optimize(estimOptions = list(verbosity = 0, plot = FALSE)) mySBM_sbm$setModel(3) net <- missSBM:::partlyObservedNetwork$new(sampler_undirected_nocov$networkData) cl <- net$clustering(3)[[1]] mySBM_missSBM <- missSBM:::SimpleSBM_fit_noCov$new(net, clusterInit = cl) mySBM_missSBM$doVEM() expect_lt(rmse(mySBM_missSBM$connectParam$mean, mySBM_sbm$connectParam$mean), 0.05) expect_gt(ARI(mySBM_missSBM$memberships, mySBM_sbm$memberships), 0.95) expect_lt(rmse(mySBM_missSBM$loglik, mySBM_sbm$loglik), 0.01) expect_lt(rmse(mySBM_missSBM$connectParam$mean, sampler_undirected_nocov$connectParam$mean), 0.05) expect_gt(ARI(mySBM_missSBM$memberships, sampler_undirected_nocov$memberships), 0.95) })
30: eval(code, test_env)
31: eval(code, test_env)
32: withCallingHandlers({ eval(code, test_env) new_expectations <- the$test_expectations > starting_expectations if (snapshot_skipped) { skip("On CRAN") } else if (!new_expectations && skip_on_empty) { skip_empty() }}, expectation = handle_expectation, packageNotFoundError = function(e) { if (on_cran()) { skip(paste0("{", e$package, "} is not installed.")) }}, snapshot_on_cran = function(cnd) { snapshot_skipped <<- TRUE invokeRestart("muffle_cran_snapshot")}, skip = handle_skip, warning = handle_warning, message = handle_message, error = handle_error, interrupt = handle_interrupt)
33: doTryCatch(return(expr), name, parentenv, handler)
34: tryCatchOne(expr, names, parentenv, handlers[[1L]])
35: tryCatchList(expr, classes, parentenv, handlers)
36: tryCatch(withCallingHandlers({ eval(code, test_env) new_expectations <- the$test_expectations > starting_expectations if (snapshot_skipped) { skip("On CRAN") } else if (!new_expectations && skip_on_empty) { skip_empty() }}, expectation = handle_expectation, packageNotFoundError = function(e) { if (on_cran()) { skip(paste0("{", e$package, "} is not installed.")) }}, snapshot_on_cran = function(cnd) { snapshot_skipped <<- TRUE invokeRestart("muffle_cran_snapshot")}, skip = handle_skip, warning = handle_warning, message = handle_message, error = handle_error, interrupt = handle_interrupt), error = handle_fatal)
37: doWithOneRestart(return(expr), restart)
38: withOneRestart(expr, restarts[[1L]])
39: withRestarts(tryCatch(withCallingHandlers({ eval(code, test_env) new_expectations <- the$test_expectations > starting_expectations if (snapshot_skipped) { skip("On CRAN") } else if (!new_expectations && skip_on_empty) { skip_empty() }}, expectation = handle_expectation, packageNotFoundError = function(e) { if (on_cran()) { skip(paste0("{", e$package, "} is not installed.")) }}, snapshot_on_cran = function(cnd) { snapshot_skipped <<- TRUE invokeRestart("muffle_cran_snapshot")}, skip = handle_skip, warning = handle_warning, message = handle_message, error = handle_error, interrupt = handle_interrupt), error = handle_fatal), end_test = function() { })
40: test_code(code = exprs, env = env, reporter = get_reporter() %||% StopReporter$new())
41: source_file(path, env = env(env), desc = desc, shuffle = shuffle, error_call = error_call)
42: FUN(X[[i]], ...)
43: lapply(test_paths, test_one_file, env = env, desc = desc, shuffle = shuffle, error_call = error_call)
44: doTryCatch(return(expr), name, parentenv, handler)
45: tryCatchOne(expr, names, parentenv, handlers[[1L]])
46: tryCatchList(expr, classes, parentenv, handlers)
47: tryCatch(code, testthat_abort_reporter = function(cnd) { cat(conditionMessage(cnd), "\n") NULL})
48: with_reporter(reporters$multi, lapply(test_paths, test_one_file, env = env, desc = desc, shuffle = shuffle, error_call = error_call))
49: test_files_serial(test_dir = test_dir, test_package = test_package, test_paths = test_paths, load_helpers = load_helpers, reporter = reporter, env = env, stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning, desc = desc, load_package = load_package, shuffle = shuffle, error_call = error_call)
50: test_files(test_dir = path, test_paths = test_paths, test_package = package, reporter = reporter, load_helpers = load_helpers, env = env, stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning, load_package = load_package, parallel = parallel, shuffle = shuffle)
51: test_dir("testthat", package = package, reporter = reporter, ..., load_package = "installed")
52: test_check("missSBM")
An irrecoverable exception occurred. R is aborting now ...
Saving _problems/test-sbm-bernoulli-without-covariate-16.R
*** caught segfault ***
address 0x110, cause 'invalid permissions'
*** caught segfault ***
address 0x110, cause 'invalid permissions'
Traceback:
1: dispatcher(membership_name, membership_init$to_cc(), model_name, .self$network_to_cc(), TRUE)
2: FUN(X[[i]], ...)
3: lapply(X = S, FUN = FUN, ...)
4: doTryCatch(return(expr), name, parentenv, handler)
5: tryCatchOne(expr, names, parentenv, handlers[[1L]])
6: tryCatchList(expr, classes, parentenv, handlers)
7: tryCatch(expr, error = function(e) { call <- conditionCall(e) if (!is.null(call)) { if (identical(call[[1L]], quote(doTryCatch))) call <- sys.call(-4L) dcall <- deparse(call, nlines = 1L) prefix <- paste("Error in", dcall, ": ") LONG <- 75L sm <- strsplit(conditionMessage(e), "\n")[[1L]] w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w") if (is.na(w)) w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L], type = "b") if (w > LONG) prefix <- paste0(prefix, "\n ") } else prefix <- "Error : " msg <- paste0(prefix, conditionMessage(e), "\n") .Internal(seterrmessage(msg[1L])) if (!silent && isTRUE(getOption("show.error.messages"))) { cat(msg, file = outFile) .Internal(printDeferredWarnings()) } invisible(structure(msg, class = "try-error", condition = e))})
8: try(lapply(X = S, FUN = FUN, ...), silent = TRUE)
9: sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE))
10: FUN(X[[i]], ...)
11: lapply(seq_len(cores), inner.do)
12: parallel::mclapply(X, FUN, ..., mc.cores = mc.cores, mc.set.seed = FALSE, mc.silent = TRUE)
13: parallel_lapply(inits, .self$do_one_estim, mc.cores = ncores, verbose = (verbosity > 4))
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") }
Traceback:
else if (!new_expectations && skip_on_empty) { 1: skip_empty()dispatcher(membership_name, membership_init$to_cc(), model_name, } .self$network_to_cc(), TRUE)}, expectation = handle_expectation, packageNotFoundError = function(e) {
if (on_cran()) { 2: skip(paste0("{", e$package, "} is not installed."))FUN(X[[i]], ...) }
}, snapshot_on_cran = function(cnd) { 3: snapshot_skipped <<- TRUElapply(X = S, FUN = FUN, ...) invokeRestart("muffle_cran_snapshot")
}, skip = handle_skip, warning = handle_warning, message = handle_message, error = handle_error, interrupt = handle_interrupt) 4:
doTryCatch(return(expr), name, parentenv, handler)21:
doTryCatch(return(expr), name, parentenv, handler) 5:
22: tryCatchOne(expr, names, parentenv, handlers[[1L]])tryCatchOne(expr, names, parentenv, handlers[[1L]])
23: 6: tryCatchList(expr, classes, parentenv, handlers)tryCatchList(expr, classes, parentenv, handlers)
24:
tryCatch(withCallingHandlers({ 7: eval(code, test_env)tryCatch(expr, error = function(e) { new_expectations <- the$test_expectations > starting_expectations call <- conditionCall(e) if (snapshot_skipped) { if (!is.null(call)) { skip("On CRAN") if (identical(call[[1L]], quote(doTryCatch))) } call <- sys.call(-4L) else if (!new_expectations && skip_on_empty) { skip_empty() dcall <- deparse(call, nlines = 1L) }}, expectation = handle_expectation, packageNotFoundError = function(e) { prefix <- paste("Error in", dcall, ": ") if (on_cran()) { LONG <- 75L skip(paste0("{", e$package, "} is not installed.")) sm <- strsplit(conditionMessage(e), "\n")[[1L]] } w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w")}, snapshot_on_cran = function(cnd) { if (is.na(w)) snapshot_skipped <<- TRUE w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L], invokeRestart("muffle_cran_snapshot") type = "b")}, skip = handle_skip, warning = handle_warning, message = handle_message, if (w > LONG) prefix <- paste0(prefix, "\n ") error = handle_error, interrupt = handle_interrupt), error = handle_fatal) }
else prefix <- "Error : "25: msg <- paste0(prefix, conditionMessage(e), "\n")doWithOneRestart(return(expr), restart)
.Internal(seterrmessage(msg[1L]))26: if (!silent && isTRUE(getOption("show.error.messages"))) {withOneRestart(expr, restarts[[1L]]) cat(msg, file = outFile)
.Internal(printDeferredWarnings()) }27: invisible(structure(msg, class = "try-error", condition = e))withRestarts(tryCatch(withCallingHandlers({}) eval(code, test_env)
new_expectations <- the$test_expectations > starting_expectations 8: if (snapshot_skipped) {try(lapply(X = S, FUN = FUN, ...), silent = TRUE) skip("On CRAN")
} 9: else if (!new_expectations && skip_on_empty) {sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE)) skip_empty()
}10: }, expectation = handle_expectation, packageNotFoundError = function(e) {FUN(X[[i]], ...) if (on_cran()) {
skip(paste0("{", e$package, "} is not installed."))11: }lapply(seq_len(cores), inner.do)}, snapshot_on_cran = function(cnd) {
snapshot_skipped <<- TRUE12: invokeRestart("muffle_cran_snapshot")parallel::mclapply(X, FUN, ..., mc.cores = mc.cores, mc.set.seed = FALSE, }, skip = handle_skip, warning = handle_warning, message = handle_message, error = handle_error, interrupt = handle_interrupt), error = handle_fatal), mc.silent = TRUE) end_test = function() {
})13:
parallel_lapply(inits, .self$do_one_estim, mc.cores = ncores, verbose = (verbosity > 4))28:
test_code(code, parent.frame())14:
.self$do_with_inits(inits, Q, reinitialization_effort)29:
test_that("SimpleSBM_fit 'Bernoulli' model, directed, no covariate", {15: sampler_directed_nocov$rNetwork(store = TRUE).self$estim_ascend(reinitialization_effort, changing_effort) mySBM_sbm <- sbm::SimpleSBM_fit$new(sampler_directed_nocov$networkData, "bernoulli", TRUE)
mySBM_sbm$optimize(estimOptions = list(verbosity = 0, 16: plot = FALSE))private$BMobject$estimate() mySBM_sbm$setModel(3)
net <- missSBM:::partlyObservedNetwork$new(sampler_directed_nocov$networkData)17: cl <- net$clustering(3)[[1]]mySBM_sbm$optimize(estimOptions = list(verbosity = 0, plot = FALSE)) mySBM_missSBM <- missSBM:::SimpleSBM_fit_noCov$new(sampler_directed_nocov$networkData, clusterInit = cl)
mySBM_missSBM$doVEM()18: expect_lt(rmse(mySBM_missSBM$connectParam$mean, mySBM_sbm$connectParam$mean), 0.1) expect_gt(ARI(mySBM_missSBM$memberships, mySBM_sbm$memberships), eval(code, test_env) 0.95)
expect_lt(rmse(mySBM_missSBM$loglik, mySBM_sbm$loglik), 19: 0.01)eval(code, test_env) expect_lt(rmse(mySBM_missSBM$connectParam$mean, sampler_directed_nocov$connectParam$mean),
0.1)20: expect_lt(rmse(mySBM_missSBM$covarParam, sampler_directed_cov$covarParam), withCallingHandlers({ 0.2) eval(code, test_env) new_expectations <- the$test_expectations > starting_expectations expect_gt(ARI(mySBM_missSBM$memberships, sampler_directed_nocov$memberships), if (snapshot_skipped) { 0.95) skip("On CRAN") } }) else if (!new_expectations && skip_on_empty) {
skip_empty()30: }eval(code, test_env)
}, expectation = handle_expectation, packageNotFoundError = function(e) {31: if (on_cran()) {eval(code, test_env) skip(paste0("{", e$package, "} is not installed."))
}32: }, snapshot_on_cran = function(cnd) {withCallingHandlers({ snapshot_skipped <<- TRUE eval(code, test_env) new_expectations <- the$test_expectations > starting_expectations invokeRestart("muffle_cran_snapshot") if (snapshot_skipped) {}, skip = handle_skip, warning = handle_warning, message = handle_message, skip("On CRAN") error = handle_error, interrupt = handle_interrupt) }
else if (!new_expectations && skip_on_empty) {21: skip_empty()doTryCatch(return(expr), name, parentenv, handler) }
}, expectation = handle_expectation, packageNotFoundError = function(e) {22: if (on_cran()) {tryCatchOne(expr, names, parentenv, handlers[[1L]]) skip(paste0("{", e$package, "} is not installed.")) }
}, snapshot_on_cran = function(cnd) {23: tryCatchList(expr, classes, parentenv, handlers) snapshot_skipped <<- TRUE
invokeRestart("muffle_cran_snapshot")24: }, skip = handle_skip, warning = handle_warning, message = handle_message, tryCatch(withCallingHandlers({ error = handle_error, interrupt = handle_interrupt) eval(code, test_env)
new_expectations <- the$test_expectations > starting_expectations33: if (snapshot_skipped) {doTryCatch(return(expr), name, parentenv, handler) skip("On CRAN")
}34: else if (!new_expectations && skip_on_empty) {tryCatchOne(expr, names, parentenv, handlers[[1L]]) skip_empty()
}35: }, expectation = handle_expectation, packageNotFoundError = function(e) {tryCatchList(expr, classes, parentenv, handlers) if (on_cran()) {
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) { 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()) { skip(paste0("{", e$package, "} is not installed."))withOneRestart(expr, restarts[[1L]])
}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() }
}, expectation = handle_expectation, packageNotFoundError = function(e) {38: if (on_cran()) {withOneRestart(expr, restarts[[1L]]) skip(paste0("{", e$package, "} is not installed."))
}39: }, snapshot_on_cran = function(cnd) {withRestarts(tryCatch(withCallingHandlers({ snapshot_skipped <<- TRUE eval(code, test_env) new_expectations <- the$test_expectations > starting_expectations invokeRestart("muffle_cran_snapshot") if (snapshot_skipped) {}, skip = handle_skip, warning = handle_warning, message = handle_message, skip("On CRAN") error = handle_error, interrupt = handle_interrupt), error = handle_fatal), } end_test = function() { else if (!new_expectations && skip_on_empty) { }) skip_empty()
}28: }, expectation = handle_expectation, packageNotFoundError = function(e) {test_code(code, parent.frame())
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 invokeRestart("muffle_cran_snapshot") mySBM_sbm <- sbm::SimpleSBM_fit$new(sampler_directed_nocov$networkData, }, skip = handle_skip, warning = handle_warning, message = handle_message, "bernoulli", TRUE) error = handle_error, interrupt = handle_interrupt), error = handle_fatal), mySBM_sbm$optimize(estimOptions = list(verbosity = 0, end_test = function() { plot = FALSE)) }) mySBM_sbm$setModel(3)
net <- missSBM:::partlyObservedNetwork$new(sampler_directed_nocov$networkData)40: cl <- net$clustering(3)[[1]]test_code(code = exprs, env = env, reporter = get_reporter() %||% mySBM_missSBM <- missSBM:::SimpleSBM_fit_noCov$new(sampler_directed_nocov$networkData, StopReporter$new()) clusterInit = cl)
mySBM_missSBM$doVEM()41: expect_lt(rmse(mySBM_missSBM$connectParam$mean, mySBM_sbm$connectParam$mean), source_file(path, env = env(env), desc = desc, shuffle = shuffle, 0.1) error_call = error_call) expect_gt(ARI(mySBM_missSBM$memberships, mySBM_sbm$memberships),
0.95)42: expect_lt(rmse(mySBM_missSBM$loglik, mySBM_sbm$loglik), FUN(X[[i]], ...) 0.01)
expect_lt(rmse(mySBM_missSBM$connectParam$mean, sampler_directed_nocov$connectParam$mean), 43: 0.1)lapply(test_paths, test_one_file, env = env, desc = desc, shuffle = shuffle, expect_lt(rmse(mySBM_missSBM$covarParam, sampler_directed_cov$covarParam), error_call = error_call) 0.2)
expect_gt(ARI(mySBM_missSBM$memberships, sampler_directed_nocov$memberships), 44: 0.95)doTryCatch(return(expr), name, parentenv, handler) })
45: 30: tryCatchOne(expr, names, parentenv, handlers[[1L]])eval(code, test_env)
46: 31: tryCatchList(expr, classes, parentenv, handlers)eval(code, test_env)
32: 47: withCallingHandlers({tryCatch(code, testthat_abort_reporter = function(cnd) { eval(code, test_env) cat(conditionMessage(cnd), "\n") new_expectations <- the$test_expectations > starting_expectations NULL if (snapshot_skipped) {}) skip("On CRAN")
}48: else if (!new_expectations && skip_on_empty) {with_reporter(reporters$multi, lapply(test_paths, test_one_file, skip_empty() env = env, desc = desc, shuffle = shuffle, error_call = error_call)) }
}, expectation = handle_expectation, packageNotFoundError = function(e) {49: if (on_cran()) {test_files_serial(test_dir = test_dir, test_package = test_package, skip(paste0("{", e$package, "} is not installed.")) 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, snapshot_skipped <<- TRUE error_call = error_call) invokeRestart("muffle_cran_snapshot")}, skip = handle_skip, warning = handle_warning, message = handle_message,
error = handle_error, interrupt = handle_interrupt)
50: 33: test_files(test_dir = path, test_paths = test_paths, test_package = package, doTryCatch(return(expr), name, parentenv, handler) reporter = reporter, load_helpers = load_helpers, env = env,
stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning, 34: load_package = load_package, parallel = parallel, shuffle = shuffle)tryCatchOne(expr, names, parentenv, handlers[[1L]])
51: 35: test_dir("testthat", package = package, reporter = reporter, tryCatchList(expr, classes, parentenv, handlers) ..., load_package = "installed")
36: 52: 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)
37: doWithOneRestart(return(expr), restart)
38: withOneRestart(expr, restarts[[1L]])
39: withRestarts(tryCatch(withCallingHandlers({ eval(code, test_env) new_expectations <- the$test_expectations > starting_expectations if (snapshot_skipped) { skip("On CRAN") } else if (!new_expectations && skip_on_empty) { skip_empty() }}, expectation = handle_expectation, packageNotFoundError = function(e) { if (on_cran()) { skip(paste0("{", e$package, "} is not installed.")) }}, snapshot_on_cran = function(cnd) { snapshot_skipped <<- TRUE invokeRestart("muffle_cran_snapshot")}, skip = handle_skip, warning = handle_warning, message = handle_message, error = handle_error, interrupt = handle_interrupt), error = handle_fatal), end_test = function() { })
40: test_code(code = exprs, env = env, reporter = get_reporter() %||% StopReporter$new())
41: source_file(path, env = env(env), desc = desc, shuffle = shuffle, error_call = error_call)
42: FUN(X[[i]], ...)
43: lapply(test_paths, test_one_file, env = env, desc = desc, shuffle = shuffle, error_call = error_call)
44: doTryCatch(return(expr), name, parentenv, handler)
45: tryCatchOne(expr, names, parentenv, handlers[[1L]])
46: tryCatchList(expr, classes, parentenv, handlers)
47: tryCatch(code, testthat_abort_reporter = function(cnd) { cat(conditionMessage(cnd), "\n") NULL})
48: with_reporter(reporters$multi, lapply(test_paths, test_one_file, env = env, desc = desc, shuffle = shuffle, error_call = error_call))
49: test_files_serial(test_dir = test_dir, test_package = test_package, test_paths = test_paths, load_helpers = load_helpers, reporter = reporter, env = env, stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning, desc = desc, load_package = load_package, shuffle = shuffle, error_call = error_call)
50: test_files(test_dir = path, test_paths = test_paths, test_package = package, reporter = reporter, load_helpers = load_helpers, env = env, stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning, load_package = load_package, parallel = parallel, shuffle = shuffle)
51: test_dir("testthat", package = package, reporter = reporter, ..., load_package = "installed")
52: test_check("missSBM")
An irrecoverable exception occurred. R is aborting now ...
Saving _problems/test-sbm-bernoulli-without-covariate-44.R
[ FAIL 4 | WARN 4 | SKIP 3 | PASS 531 ]
══ Skipped tests (3) ═══════════════════════════════════════════════════════════
• On CRAN (3): 'test-explore-block-count.R:4:3',
'test-missSBM_collection-degenerate.R:80:3',
'test-missSBM_collection-estimate_chain.R:64:3'
══ Failed tests ════════════════════════════════════════════════════════════════
── Error ('test-sbm-bernoulli-with-covariates.R:16:3'): SimpleSBM_fit 'Bernoulli' model, undirected, one covariate ──
Error: invalid assignment for reference class field 'Z', should be from class "matrix" or a subclass (was class "NULL")
Backtrace:
▆
1. ├─mySBM_sbm$optimize(estimOptions = list(verbosity = 0, plot = FALSE)) at test-sbm-bernoulli-with-covariates.R:16:3
2. │ └─private$BMobject$estimate()
3. │ └─.self$estim_ascend(reinitialization_effort, changing_effort)
4. │ └─.self$do_with_inits(inits, Q, reinitialization_effort)
5. │ └─base::sapply(...)
6. │ └─base::lapply(X = X, FUN = FUN, ...)
7. │ └─blockmodels (local) FUN(X[[i]], ...)
8. │ └─getRefClass(membership_name)(from_cc = r$membership)
9. │ └─methods::new(`<chr>`, ...)
10. │ ├─methods::initialize(value, ...)
11. │ └─methods::initialize(value, ...)
12. │ └─.Object$initialize(...)
13. └─blockmodels (local) `<dfltBndF>`(base::quote(NULL))
14. └─methods:::.setDummyField(...)
── Error ('test-sbm-bernoulli-with-covariates.R:46:3'): SimpleSBM_fit 'Bernoulli' model, directed, one covariate ──
Error: invalid assignment for reference class field 'Z', should be from class "matrix" or a subclass (was class "NULL")
Backtrace:
▆
1. ├─mySBM_sbm$optimize(estimOptions = list(verbosity = 0, plot = FALSE)) at test-sbm-bernoulli-with-covariates.R:46:3
2. │ └─private$BMobject$estimate()
3. │ └─.self$estim_ascend(reinitialization_effort, changing_effort)
4. │ └─.self$do_with_inits(inits, Q, reinitialization_effort)
5. │ └─base::sapply(...)
6. │ └─base::lapply(X = X, FUN = FUN, ...)
7. │ └─blockmodels (local) FUN(X[[i]], ...)
8. │ └─getRefClass(membership_name)(from_cc = r$membership)
9. │ └─methods::new(`<chr>`, ...)
10. │ ├─methods::initialize(value, ...)
11. │ └─methods::initialize(value, ...)
12. │ └─.Object$initialize(...)
13. └─blockmodels (local) `<dfltBndF>`(base::quote(NULL))
14. └─methods:::.setDummyField(...)
── Error ('test-sbm-bernoulli-without-covariate.R:16:3'): SimpleSBM_fit 'Bernoulli' model, undirected, no covariate ──
Error: invalid assignment for reference class field 'Z', should be from class "matrix" or a subclass (was class "NULL")
Backtrace:
▆
1. ├─mySBM_sbm$optimize(estimOptions = list(verbosity = 0, plot = FALSE)) at test-sbm-bernoulli-without-covariate.R:16:3
2. │ └─private$BMobject$estimate()
3. │ └─.self$estim_ascend(reinitialization_effort, changing_effort)
4. │ └─.self$do_with_inits(inits, Q, reinitialization_effort)
5. │ └─base::sapply(...)
6. │ └─base::lapply(X = X, FUN = FUN, ...)
7. │ └─blockmodels (local) FUN(X[[i]], ...)
8. │ └─getRefClass(membership_name)(from_cc = r$membership)
9. │ └─methods::new(`<chr>`, ...)
10. │ ├─methods::initialize(value, ...)
11. │ └─methods::initialize(value, ...)
12. │ └─.Object$initialize(...)
13. └─blockmodels (local) `<dfltBndF>`(base::quote(NULL))
14. └─methods:::.setDummyField(...)
── Error ('test-sbm-bernoulli-without-covariate.R:44:3'): SimpleSBM_fit 'Bernoulli' model, directed, no covariate ──
Error: invalid assignment for reference class field 'Z', should be from class "matrix" or a subclass (was class "NULL")
Backtrace:
▆
1. ├─mySBM_sbm$optimize(estimOptions = list(verbosity = 0, plot = FALSE)) at test-sbm-bernoulli-without-covariate.R:44:3
2. │ └─private$BMobject$estimate()
3. │ └─.self$estim_ascend(reinitialization_effort, changing_effort)
4. │ └─.self$do_with_inits(inits, Q, reinitialization_effort)
5. │ └─base::sapply(...)
6. │ └─base::lapply(X = X, FUN = FUN, ...)
7. │ └─blockmodels (local) FUN(X[[i]], ...)
8. │ └─getRefClass(membership_name)(from_cc = r$membership)
9. │ └─methods::new(`<chr>`, ...)
10. │ ├─methods::initialize(value, ...)
11. │ └─methods::initialize(value, ...)
12. │ └─.Object$initialize(...)
13. └─blockmodels (local) `<dfltBndF>`(base::quote(NULL))
14. └─methods:::.setDummyField(...)
[ FAIL 4 | WARN 4 | SKIP 3 | PASS 531 ]
Error:
! Test failures.
Execution halted
Flavor: r-oldrel-macos-arm64